Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

Basic Sourcemod Plugin


Burnt
 Share

Recommended Posts

Just something I have been working on for a few days, and one thing blue made while I was afk on collabedit huehue. Not fully complete but its something and works lol. I have been learning with the help of icon :P

 

//Nothing is tabbed because the forum removed all my spaces ):
//Forums don't like 4 spaced tabs bonbon - Icon
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#define HG "[\x04HG\x01]\x04 "
#define HGJB "[\x04HG JB\x01]\x04 "
#define HGBANS "[\x04HG Bans\x01]\x04 "
#pragma newdecls required // Making sure it is written in SM 1.7 syntax

Handle hZTimer = null; //Using this instead of the variable - Icon
Handle hDTimer = null;

public Plugin myinfo =
{
name = "Donger",
author = "HG BURNT and Icon lol",
description = "Some dumb plugin by some dumb guy",
version = "1.1",
url = "none"
}
public void OnPluginStart()
{
LoadTranslations("common.phrases"); //Needed for FindTarget()
RegAdminCmd("sm_zombie", Zombie_Command, ADMFLAG_UNBAN, "sm_zombie #userid|name");
RegAdminCmd("sm_donger", Donger_Command, ADMFLAG_UNBAN, "sm_donger #userid|name");
RegAdminCmd("sm_fatkid", Fatkid_Command, ADMFLAG_UNBAN, "sm_fatkid #userid|name");
// Removed the other commands while testing, got too lazy to readd them - Icon
}
public Action Zombie_Command(int client, int arg)
{
if(hZTimer != null)
{
ReplyToCommand(client, "%sThe command is already in use",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_zombie <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s%N has become a Zombie, kill him for a bonus next round!",HGJB,target);
PrintToChat(target, "%sYou will slowly die over the next 45 seconds, defend yourself with a knife!",HGJB);
hZTimer = CreateTimer(1.0, ZombieTimer, target, TIMER_REPEAT);
return Plugin_Handled;
}

public Action ZombieTimer(Handle timer, int target)
{
static int times = 0
times ++;

// Moved these out of the individual cases, since this is passed every time anyway - Icon
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
hZTimer = null;
times = 0;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
hZTimer = null;
times = 0;
return Plugin_Stop
}
switch(times)
{
//Each case check if Zombie has been killed or has disconnected
case 5:
{
PrintToChatAll("%s%N Will slowly die over the next 45 seconds",HGJB,target);
SetEntProp(target, Prop_Data, "m_iHealth", 400);
}
case 10:
{
ZSetHealth(target,350); // Using a function, makes it cleaner - Icon
}
case 15:
{
ZSetHealth(target,300);
}
case 20:
{
ZSetHealth(target,250);
}
case 25:
{
ZSetHealth(target,200);
}
case 30:
{
ZSetHealth(target,150);
}
case 35:
{
ZSetHealth(target,100);
}
case 40:
{
ZSetHealth(target,50);
}
case 45:
{
PrintToChat(target, "%sYou died from deteriorating",HGJB);
PrintToChatAll("%sThe Zombie has died from deterioration. No Bonus",HGJB);
//Do check !IsPlayerAlive == return Plugin_Stop, done = 1;
ForcePlayerSuicide(target);
hZTimer = null; // Everytime you are going to stop the timer
times = 0; // These two need to be reset
return Plugin_Stop;
}
}
return Plugin_Continue;
}

void ZSetHealth(int client, int health)
{
PrintToChat(client, "%sYou are deteriorating you now have %d HP",HGJB,health);
SetEntProp(client, Prop_Data, "m_iHealth", health);
}

public Action Donger_Command(int client, int args)
{
if(hDTimer != null)
{
ReplyToCommand(client, "%sThe command is already in use",HG);
return Plugin_Handled;
}
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%sYou are not the \x03All Knowing Donger",HG);
return Plugin_Handled;
}
if(args != 1){
ReplyToCommand(client, "[sM] Usage: sm_donger <target>");
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sIncorrect Target",HG);
return Plugin_Handled;
}
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%s %s is a \x03False Donger",HG,steamid);
return Plugin_Handled;
}

if(!IsPlayerAlive(target))
{
ReplyToCommand(client, "%sDead Target",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x05The Donger Story has been initiated by the \x03All Knowing Donger",HG);
PrintToChat(target, "%sYou are the One True Raised Donger!",HGJB);
hDTimer = CreateTimer(1.0, DongerTimer, target, TIMER_REPEAT);
return Plugin_Handled;
}

public Action DongerTimer(Handle timer, int target)
{
static int times = 0;
times ++;
if(!IsPlayerAlive(target) && (times <= 20 || times >= 31)) // Moved this out of the individual cases
{
hDTimer = null;
times = 0;
return Plugin_Stop;
}
switch(times)
{
case 5:
{
PrintToChatAll("%sThis is the story...of a donger",HGJB);
}
case 10:
{
PrintToChatAll("%sThis donger was not ordinary, it was \x03raised",HGJB);
}
case 15:
{
PrintToChatAll("%sDue to the fact that their were differences between dongers, riots began",HGJB);
PrintToChatAll("%sSo much riots, that the \x03Donger Gods\x04 had to intervene",HGJB);
}
case 20:
{
PrintToChatAll("%sThe \x03Donger Gods\x04 asked the \x03One True Raised Donger\x04 to sacrafice himself!",HGJB);
ForcePlayerSuicide(target);
PrintToChatAll("%s%N has been sacraficed to the \x03Donger Gods",HGJB,target);
}
case 25:
{
PrintToChatAll("%sDoing so angered the \x03Fig Lords\x04 and thus they decided to do something outrageous",HGJB);
}
case 30:
{
if(!DoDonger(target)){ // Using the function's return in order to see if the player is alive when respawning, so that you don't have to check in the case. - Icon
LogError("Something went wrong in case 30, DongerTimer");
times = 0
hDTimer = null;
return Plugin_Stop;
}
PrintToChatAll("%sThe \x03Fig Lords\x04 have respawned \x03%N\x04 With /x05MORE POWER",HGJB,target);
}
case 35:
{
PrintToChatAll("%sThe \x03Fig Lords\x04 have done something terrible, \x03%N\x04 will now deteriorate due to issues with the resurrection!",HGJB,target);
PrintToChat(target, "%sYou are deteriorating and lose 100 HP every 5 seconds, you can still die from weapons!",HGJB);
DSetHealth(target,400) // Yay function - Icon
}
case 40:
{
DSetHealth(target,300)
}
case 45:
{
DSetHealth(target,200)
}
case 50:
{
DSetHealth(target,100)
}
case 55:
{
ForcePlayerSuicide(target);
times = 0
hDTimer = null;
return Plugin_Stop;
}
}
return Plugin_Continue;
}

bool DoDonger (int client)
{
if(!IsClientInGame(client))
return false;
if(IsPlayerAlive(client))
return false;
CS_RespawnPlayer(client);
DSetHealth(client,500);
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 2.0);
return true;
}
void DSetHealth(int client, int health){
SetEntProp(client, Prop_Data, "m_iHealth", health);
}

public Action Fatkid_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_donger <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%sThe server has exceeded weight limit as \x03%N has joined",HG,target);
return Plugin_Handled;
}

bool IsValidID(char steamid [32]) // Added my steamid cus testing also yay function - Icon
{
if(StrContains(steamid, "1:56852003") == -1 && StrContains(steamid, "0:36595580") == -1 )
return false;
else
return true;
}


//* Did not do much below this *//
//* Did not do much below this *//
//* Did not do much below this *//
//* Did not do much below this *//
//* Did not do much below this *//
//* Did not do much below this *//

public Action Vac_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_vac <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("Player %N left the game (VAC banned from secure server)",target);
return Plugin_Handled;
}
public Action Rebel_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_rebel <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x03%N\x04 is a rebel for \x0320.0\x04 seconds",HGJB,target);
return Plugin_Handled;
}

public Action Fakeban_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(!IsValidID(steamid))
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_fakeban <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid));
if (!IsClientInGame(target))
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x03Console\x04 banned \x03%N\x04 for \x030 minutes)",HGBANS,target);
PrintToChatAll(" \x01Player \x04%N \x01[\x03%s\x01] disconnected You are banned. Visit hellsgamers.com/hgbans for more info",target,steamid)
return Plugin_Handled;
}

// blue  ... i'm just testing some things lol

/* Just testing if any of this would work, just trying to learn C++ syntax as well -blue 
* client - t?
* arg - mandatory parameter for it to work?
* steamid - steamid of said person*/

public Action FakeAdminRoom_Command(int client, int arg) { // Just a test of what this might do?
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid)); // No idea what it does, taken from Burnt's other functions
if (StrContains(steamid, "0:42051882") == -1) {
ReplyToCommand(client, "%sDode is chode", HG); // So if the steamID is mine.. it prints out Dode is a chode?
return Plugin_Handled;
}

if (arg != 1) { // What does this do?
ReplyToCommand(client, "%sUsage: sm_fakeadminroom <target>", HG);
return Plugin_Handled;
}

char targetname[MAX_NAME_LENGTH] // All this shit compiled from previous ones
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true); // Man-page would be useful
GetClientName(target, targetname, sizeof(targetname)); // If you could provide the man-page of this, it would be nice
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid)); // Same with this, man-page is nice

if (!IsClientInGame(target)) { // If target is not found?
ReplyToCommand(client, "%sNope.", HG);
return Plugin_Handled;
}

PrintToChatAll("%s%N\x04 has teleported to the admin room!", HGJB, target); // Would this work?
return Plugin_Handled;
}

 

v1

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#define HG "[\x04HG\x01]\x04 "
#define HGJB "[\x04HG JB\x01]\x04 "
#define HGBANS "[\x04HG Bans\x01]\x04 "

int done = 1;

public Plugin:myinfo =
{
name = "Donger",
author = "HG BURNT and Icon lol",
description = "Some dumb plugin by some dumb guy",
version = "1.0",
url = "none"
}
public void OnPluginStart()
{
LoadTranslations("common.phrases"); //Needed for FindTarget()
RegAdminCmd("sm_zombie", Zombie_Command, ADMFLAG_UNBAN, "sm_zombie #userid|name");
RegAdminCmd("sm_donger", Donger_Command, ADMFLAG_UNBAN, "sm_donger #userid|name");
RegAdminCmd("sm_fatkid", Fatkid_Command, ADMFLAG_UNBAN, "sm_fatkid #userid|name");
RegAdminCmd("sm_vac", Vac_Command, ADMFLAG_UNBAN, "sm_vac #userid|name");
RegAdminCmd("sm_rebel", Rebel_Command, ADMFLAG_UNBAN, "sm_rebel #userid|name");
RegAdminCmd("sm_fakeban", Fakeban_Command, ADMFLAG_UNBAN, "sm_fakeban #userid|name");
RegAdminCmd("sm_fakeadminroom", FakeAdminRoom_Command, ADMFLAG_CUSTOM2, "sm_fakeadminroom #userid|name"); // blue  here, just testing sometings
}
/*Make a command that turns a player into a zombie, this command will slowly turn the player slower and blinder also cannot pick up weapons, the zombie can only be CT. If someone kills zombie = bonus HP
the zombie will have a menu that pops up after 30 seconds asking if they want to take the easy way out. Yes == kill self, No == Stay alive until death. After 60 seconds player loses control and dies
*/
//Nightvision????
public Action Zombie_Command(int client, int arg)
{
if(done != 1)
{
ReplyToCommand(client, "%sThe command is already in use",HG);
return Plugin_Handled;
}
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
/*if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}*/
//Commented for testing purposes
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_zombie <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (target == -1)
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s%N has become a Zombie, kill him for a bonus next round!",HGJB,target);
PrintToChat(target, "%sYou will slowly die over the next 45 seconds, defend yourself with a knife!",HGJB);
CreateTimer(1.0, ZombieTimer, target, TIMER_REPEAT);
return Plugin_Handled;
}

public Action ZombieTimer(Handle timer, int target)
{
static int times = 0
times ++;
switch(times)
{
//Each case check if Zombie has been killed or has disconnected
case 5:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChatAll("%s%N Will slowly die over the next 45 seconds",HGJB,target);
SetEntProp(target, Prop_Data, "m_iHealth", 400);
}
case 10:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 350HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 350);
}
case 15:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 200 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 300);
}
case 20:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 250 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 250);
}
case 25:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 200 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 200);
}
case 30:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 150 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 150);
}
case 35:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 100 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 100);
}
case 40:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%s%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou are deteriorating you now have 50 HP",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 50);
}
case 45:
{
if(!IsClientInGame(target))
{
PrintToChatAll("%sThe Zombie left the server",HGJB);
done = 1;
return Plugin_Stop
}
if(!IsPlayerAlive(target))
{
PrintToChatAll("%sThe Zombie has died by causes not Zombie related",HGJB);
done = 1;
return Plugin_Stop
}
PrintToChat(target, "%sYou died from deteriorating",HGJB);
PrintToChatAll("%sThe Zombie has died from deterioration. No Bonus",HGJB);
//Do check !IsPlayerAlive == return Plugin_Stop, done = 1;
ForcePlayerSuicide(target);
done = 1;
return Plugin_Stop;
}
}
return Plugin_Handled;
}

public Action Donger_Command(int client, int args)
{
if(done != 1)
{
ReplyToCommand(client, "%sThe command is already in use",HG);
return Plugin_Handled;
}
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sYou are not the \x03All Knowing Donger",HG);
return Plugin_Handled;
}

if(args != 1){
ReplyToCommand(client, "[sM] Usage: sm_donger <target>");
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (target == -1)
{
ReplyToCommand(client, "%sIncorrect Target",HG);
return Plugin_Handled;
}
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid));

if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%s %s is a \x03False Donger",HG,steamid);
return Plugin_Handled;
}

if(!IsPlayerAlive(target))
{
ReplyToCommand(client, "%sDead Target",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x05The Donger Story has been initiated by the \x03All Knowing Donger",HG);
PrintToChat(target, "%sYou are the One True Raised Donger!",HGJB);
CreateTimer(1.0, DongerTimer, target, TIMER_REPEAT);
return Plugin_Handled;
}

public Action DongerTimer(Handle timer, int target)
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
static int times = 0
times ++;
done = 0;
switch(times)
{
case 5:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sThis is the story...of a donger",HGJB);
}
case 10:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sThis donger was not ordinary, it was \x03raised",HGJB);
}
case 15:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sDue to the fact that their were differences between dongers, riots began",HGJB);
PrintToChatAll("%sSo much riots, that the \x03Donger Gods\x04 had to intervene",HGJB);
}
case 20:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sThe \x03Donger Gods\x04 asked the \x03One True Raised Donger\x04 to sacrafice himself!",HGJB);
ForcePlayerSuicide(target);
PrintToChatAll("%s%N has been sacraficed to the \x03Donger Gods",HGJB,target);
}
case 25:
{
if(IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sDoing so angered the \x03Fig Lords\x04 and thus they decided to do something outrageous",HGJB);
}
case 30:
{
if(IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sThe \x03Fig Lords\x04 have respawned \x03%N\x04 With /x05MORE POWER",HGJB,target);
DoDonger(target)
}
case 35:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
PrintToChatAll("%sThe \x03Fig Lords\x04 have done something terrible, \x03%N\x04 will now deteriorate due to issues with the resurrection!",HGJB,target);
PrintToChat(target, "%sYou are deteriorating and lose 100 HP every 5 seconds, you can still die from weapons!",HGJB);
SetEntProp(target, Prop_Data, "m_iHealth", 400);
}
case 40:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
SetEntProp(target, Prop_Data, "m_iHealth", 300);
}
case 45:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
SetEntProp(target, Prop_Data, "m_iHealth", 200);
}
case 50:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
SetEntProp(target, Prop_Data, "m_iHealth", 100);
}
case 55:
{
if(!IsPlayerAlive(target))
{
done = 1;
return Plugin_Stop;
}
ForcePlayerSuicide(target);
done = 1;
}
}
return Plugin_Continue;
}

bool DoDonger (int client)
{
if(!IsClientInGame(client))
return false;
if(IsPlayerAlive(client))
return false;
CS_RespawnPlayer(client);
SetEntProp(client, Prop_Data, "m_iHealth", 500);
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 2.0);
return true;
}

public Action Fatkid_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_donger <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (target == -1)
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%sThe server has exceeded weight limit as \x03%N has joined",HG,target);
return Plugin_Handled;
}
public Action Vac_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_vac <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (target == -1)
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("Player %N left the game (VAC banned from secure server)",target);
return Plugin_Handled;
}
public Action Rebel_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_rebel <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
if (target == -1)
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x03%N\x04 is a rebel for \x0320.0\x04 seconds",HGJB,target);
return Plugin_Handled;
}

public Action Fakeban_Command(int client, int arg)
{
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
if(StrContains(steamid, "1:56852003") == -1)
{
ReplyToCommand(client, "%sHella Rip Fam",HG);
return Plugin_Handled;
}
if(arg != 1){
ReplyToCommand(client, "%sUsage: sm_fakeban <target>",HG);
return Plugin_Handled;
}
char targetname[MAX_NAME_LENGTH];
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true);
GetClientName(target, targetname, sizeof(targetname));
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid));
if (target == -1)
{
ReplyToCommand(client, "%sNope.",HG);
return Plugin_Handled;
}
PrintToChatAll("%s\x03Console\x04 banned \x03%N\x04 for \x030 minutes)",HGBANS,target);
PrintToChatAll(" \x01Player \x04%N \x01[\x03%s\x01] disconnected You are banned. Visit hellsgamers.com/hgbans for more info",target,steamid)
return Plugin_Handled;
}

// blue  ... i'm just testing some things lol

/* Just testing if any of this would work, just trying to learn C++ syntax as well -blue 
* client - t?
* arg - mandatory parameter for it to work?
* steamid - steamid of said person
*/
public Action FakeAdminRoom_Command(int client, int arg) { // Just a test of what this might do?
char steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid)); // No idea what it does, taken from Burnt's other functions
if (StrContains(steamid, "0:42051882") == -1) {
ReplyToCommand(client, "%sDode is chode", HG); // So if the steamID is mine.. it prints out Dode is a chode?
return Plugin_Handled;
}

if (arg != 1) { // What does this do?
ReplyToCommand(client, "%sUsage: sm_fakeadminroom <target>", HG);
return Plugin_Handled;
}

char targetname[MAX_NAME_LENGTH] // All this shit compiled from previous ones
GetCmdArg(1, targetname, sizeof(targetname));
int target = FindTarget(client, targetname, true, true); // Man-page would be useful
GetClientName(target, targetname, sizeof(targetname)); // If you could provide the man-page of this, it would be nice
GetClientAuthId(target, AuthId_Steam2, steamid, sizeof(steamid)); // Same with this, man-page is nice

if (target == -1) { // If target is not found?
ReplyToCommand(client, "%sNope.", HG);
return Plugin_Handled;
}

PrintToChatAll("%s%N\x04 has teleported to the admin room!", HGJB, target); // Would this work?
return Plugin_Handled;
}

Edited by Icon315
made it better
  • Like 2
Link to comment
Share on other sites

[quote name=blue :D' timestamp='1431004204' post='643440]

oh man exposed

i had no idea what i was doing considering it was the first time i saw C++, and it was only for like 30 minutes lol

 

but it's not c++ it's pawn aka c's autistic cousin

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share