PHP Code:
#include <sourcemod>
#include <sdktools>
#include <clientprefs>
#pragma semicolon 1
#define HudTick 1.2
#define DefaultSpeed 190.0
#define DefaultClass "None"
#define MoneyTimer 600.0
#define bits_SUIT_DEVICE_SPRINT 0x00000001
static String:Team[32];
static String:Class[32][32];
static String:AFK[32];
static String:God[32];
new Handle:cookie;
new Money[MAXPLAYERS+1];
public Plugin:myinfo =
{
name = "Deathmatch Mod",
author = "SirTiggs",
description = "A simple, fun deathmatch mod",
version = "1.1.0"
};
public OnPluginStart()
{
RegConsoleCmd("sm_class", Command_Class, "Usage: sm_class <class name>");
RegConsoleCmd("sm_chelp", Command_cHelp, "Usage: sm_chelp");
RegConsoleCmd("sm_afk", Command_Afk, "Usage: sm_afk <0/1>");
RegConsoleCmd("sm_changeteam", Command_ChangeTeam, "Usage: sm_changeteam");
RegConsoleCmd("sm_cmds", Command_Cmds, "Usage: sm_cmds");
RegConsoleCmd("kill", Command_Commit);
RegConsoleCmd("explode", Command_Commit);
RegAdminCmd("sm_god", Command_God, ADMFLAG_ROOT, "Usage: sm_god <0/1>");
RegAdminCmd("sm_rape", Command_Rape, ADMFLAG_ROOT, "Usage: sm_rape <player name>");
RegAdminCmd("sm_model", Command_Model, ADMFLAG_ROOT, "Usage: sm_model <model name>");
RegAdminCmd("sm_ip", Command_IP, ADMFLAG_ROOT, "Usage: sm_ip <player name>");
RegAdminCmd("sm_heal", Command_Heal, ADMFLAG_ROOT, "Usage: sm_heal <player name>");
RegAdminCmd("sm_setmoney", Command_SetMoney, ADMFLAG_ROOT, "Usage: sm_setmoney");
GetConVarInt(FindConVar("mp_teamplay"));
RegClientCookie("Money", "players' Money", CookieAccess_Private);
}
public OnClientCookiesCached(Client)
{
decl String:buffer[8];
GetClientCookie(Client, cookie, buffer, 8);
Money[Client] = StringToInt(buffer);
}
SetClientMoney(client, amount){
decl String:buffer[8];
IntToString(amount, buffer, 8);
SetClientCookie(Client, cookie, buffer);
Money[Client] = amount;
}
AddClientMoney(Client, amount)
{
SetClientMoney(Client, Money[Client] + amount);
}
public OnMapStart()
{
PrecacheModel("models/alyx.mdl", true);
PrecacheModel("models/gman.mdl", true);
PrecacheModel("models/barney.mdl", true);
PrecacheModel("models/combine_super_soldier.mdl", true);
PrecacheModel("models/breen.mdl", true);
PrecacheModel("models/monk.mdl", true);
PrecacheModel("models/humans/Group01/Male_01.mdl", true);
PrecacheModel("models/humans/Group01/Female_01.mdl", true);
PrecacheModel("models/humans/Group01/Male_02.mdl", true);
PrecacheModel("models/humans/Group01/Female_02.mdl", true);
PrecacheModel("models/humans/Group01/Male_03.mdl", true);
PrecacheModel("models/humans/Group01/Female_03.mdl", true);
PrecacheModel("models/humans/Group01/Male_04.mdl", true);
PrecacheModel("models/humans/Group01/Female_04.mdl", true);
PrecacheModel("models/humans/Group01/Male_05.mdl", true);
PrecacheModel("models/humans/Group01/Male_06.mdl", true);
PrecacheModel("models/humans/Group01/Female_06.mdl", true);
PrecacheModel("models/humans/Group01/Male_07.mdl", true);
PrecacheModel("models/humans/Group01/Female_07.mdl", true);
PrecacheModel("models/humans/Group01/Male_08.mdl", true);
PrecacheModel("models/humans/Group01/Female_08.mdl", true);
PrecacheModel("models/humans/Group03/Male_02.mdl", true);
PrecacheModel("models/humans/Group03/Female_01.mdl", true);
HookEvent("player_spawn", EventSpawn, EventHookMode_Pre);
}
public OnMapEnd()
{
}
public OnClientPutInServer(Client)
{
decl String:Player[32];
GetClientName(Client, Player, sizeof(Player));
if(GetUserAdmin(Client))
{
PrintToChatAll("[Tigg] Admin: %s has joined us!", Player);
}
else if(!GetUserAdmin(Client))
{
PrintToChatAll("[Tigg] Player: %s has joined the game!", Player);
}
CreateTimer(0.5, DisplayHud, Client, TIMER_REPEAT);
PrintToChat(Client, "[Tigg] Welcome to Deathmatch mod by SirTiggs");
Class[Client] = DefaultClass;
}
public OnClientDisconnect(Client)
{
}
public EventSpawn(Handle:Event, const String:Name[], bool:Broadcast)
{
decl Client;
Client = GetClientOfUserId(GetEventInt(Event, "userid"));
CreateTimer(1.5, ClassPresets, Client);
}
public Action:DisplayHud(Handle:Timer, any:Client)
{
new PlayerTeam = GetClientTeam(Client);
new Kills = GetClientFrags(Client);
new Deaths = GetClientDeaths(Client);
new Combine = GetTeamScore(2);
new Rebel = GetTeamScore(3);
new cTotalTeam = GetTeamClientCount(2);
new rTotalTeam = GetTeamClientCount(3);
new Health = GetClientHealth(Client);
decl String:PlayerName[32];
GetClientName(Client, PlayerName, sizeof(PlayerName));
if(IsClientAuthorized(Client) && IsClientInGame(Client))
{
if(IsClientConnected(Client) && IsPlayerAlive(Client))
{
if(PlayerTeam == 1)
{
Team = "Spectate";
}
else if(PlayerTeam == 2)
{
if(Combine < 1)
{
Combine = 0;
}
Team = "Combine";
SetHudTextParams(-1.0, 0.050, HudTick, 0, 0, 255, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "Team Members %d: R %d | C %d", cTotalTeam, Rebel, Combine);
ClientCommand(Client, "r_screenoverlay effects/combine_binocoverlay.vmt");
}
else if(PlayerTeam == 3)
{
if(Rebel < 1)
{
Rebel = 0;
}
Team = "Rebel";
SetHudTextParams(-1.0, 0.050, HudTick, 255, 0, 0, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "Team Members %d: R %d | C %d", rTotalTeam, Rebel, Combine);
if(Health <= 15)
{
ClientCommand(Client, "r_screenoverlay debug/yuv.vmt");
}
else
{
ClientCommand(Client, "r_screenoverlay 0");
}
}
else
{
return Plugin_Handled;
}
if(Kills < 1)
{
Kills = 0;
}
//Main Hud
SetHudTextParams(0.015, 0.30, HudTick, 0, 250, 30, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "Kills: %d\nDeaths: %d\nClass: %s\nMoney: £%d", Kills, Deaths, Class[Client], Money[Client]);
SetHudTextParams(0.015, 0.25, HudTick, 255, 0, 0, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "-Info-");
if(StrEqual(Class[Client], "None"))
{
SetHudTextParams(-1.0, 0.015, HudTick, 30, 255, 0, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "|%s Of Team %s|", PlayerName, Team);
SetHudTextParams(-1.0, 1.0, HudTick, 30, 255, 0, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "Type [/class <class>] To Choose A Class");
}
else
{
SetHudTextParams(-1.0, 0.015, HudTick, 30, 255, 0, 255, 0, 6.0, 0.1, 0.2);
ShowHudText(Client, -1, "|%s Of Class %s In Team %s|", PlayerName, Class[Client], Team);
}
}
}
return Plugin_Handled;
}
public Action:Command_God(Client, args)
{
decl String:arg1[32];
GetCmdArg(1, arg1, sizeof(arg1));
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_god <0/1>");
return Plugin_Handled;
}
if(IsPlayerAlive(Client))
{
if(StrEqual(arg1, "1"))
{
if(StrEqual(God, "1"))
{
PrintToChat(Client, "[Tigg] You're already in god mode!");
return Plugin_Handled;
}
else
{
God = "1";
SetEntProp(Client, Prop_Data, "m_takedamage", 0, 1);
PrintToChat(Client, "[Tigg] You're now god!");
ClientCommand(Client, "play buttons/blip1.wav");
SetEntityRenderColor(Client, 255, 0, 0, 255);
}
}
else if(StrEqual(arg1, "0"))
{
if(StrEqual(God, "0"))
{
PrintToChat(Client, "[Tigg] You're not in god mode!");
return Plugin_Handled;
}
else
{
God = "0";
SetEntProp(Client, Prop_Data, "m_takedamage", 2, 1);
PrintToChat(Client, "[Tigg] You're now mortal!");
ClientCommand(Client, "play buttons/blip1.wav");
SetEntityRenderColor(Client, 0, 0, 0, 255);
}
}
else
{
PrintToChat(Client, "[Tigg] Error in arg: sm_god <0/1>");
return Plugin_Handled;
}
}
else
{
PrintToChat(Client, "[Tigg] You need to be alive to be god");
}
return Plugin_Handled;
}
public Action:Command_Class(Client, args)
{
decl String:arg1[32];
GetCmdArg(1, arg1, sizeof(arg1));
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_class <class name>");
return Plugin_Handled;
}
if(IsClientInGame(Client) && IsPlayerAlive(Client))
{
if(StrEqual(arg1, "Assault") || (StrEqual(arg1, "assault")))
{
if(StrEqual(Class[Client], "Assault"))
{
PrintToChat(Client, "[Tigg] You're already that class!");
return Plugin_Handled;
}
else
{
Class[Client] = "Assault";
PrintToChat(Client, "[Tigg] You've selected Assault class!");
ClientCommand(Client, "play buttons/blip1.wav");
}
}
else if(StrEqual(arg1, "Assassin") || (StrEqual(arg1, "assassin")))
{
if(StrEqual(Class[Client], "Assassin"))
{
PrintToChat(Client, "[Tigg] You're already that class!");
return Plugin_Handled;
}
else
{
Class[Client] = "Assassin";
PrintToChat(Client, "[Tigg] You've selected Assassin class!");
ClientCommand(Client, "play buttons/blip1.wav");
}
}
else if(StrEqual(arg1, "Support") || (StrEqual(arg1, "support")))
{
if(StrEqual(Class[Client], "Support"))
{
PrintToChat(Client, "[Tigg] You're already that class!");
return Plugin_Handled;
}
else
{
Class[Client] = "Support";
PrintToChat(Client, "[Tigg] You've selected Support class!");
ClientCommand(Client, "play buttons/blip1.wav");
}
}
else if(StrEqual(arg1, "Sniper") || (StrEqual(arg1, "sniper")))
{
if(StrEqual(Class[Client], "Sniper"))
{
PrintToChat(Client, "[Tigg] You're already that class!");
return Plugin_Handled;
}
else
{
Class[Client] = "Sniper";
PrintToChat(Client, "[Tigg] You've selected Sniper class!");
ClientCommand(Client, "play buttons/blip1.wav");
}
}
else if(StrEqual(arg1, "None") || (StrEqual(arg1, "none")))
{
if(StrEqual(Class[Client], "None"))
{
PrintToChat(Client, "[Tigg] You don't have a class!");
return Plugin_Handled;
}
else
{
Class[Client] = "None";
PrintToChat(Client, "[Tigg] You've quit your current class!");
ClientCommand(Client, "play buttons/blip1.wav");
}
}
else
{
PrintToChat(Client, "[Tigg] Sorry but that is a unknown class. Please type /chelp for more information.");
return Plugin_Handled;
}
}
return Plugin_Handled;
}
public Action:Command_cHelp(Client, args)
{
PrintToChat(Client, "=====Class Lists=====");
PrintToChat(Client, "1) -Assault- [/class assault] Tough");
PrintToChat(Client, "2) -Assassin- [/class assassin] Quick");
PrintToChat(Client, "3) -Support- [/class support] Heavly-Weaponed");
PrintToChat(Client, "4) -Sniper- [/class sniper] Hard To Detect");
return Plugin_Handled;
}
public Action:Command_Cmds(Client, args)
{
if(IsClientConnected(Client) && IsClientInGame(Client))
{
PrintToChat(Client, "-===Command List===");
PrintToChat(Client, "1) Usage: sm_class <class name> *Select a Class*");
PrintToChat(Client, "2) Usage: sm_chelp *Displays Class Help*");
PrintToChat(Client, "3) Usage: sm_afk <0/1> *Go AFK*");
PrintToChat(Client, "4) Usage: sm_changeteam *Change Your Team*");
PrintToChat(Client, "==========================");
}
return Plugin_Handled;
}
public Action:Command_Model(Client, args)
{
if(IsClientConnected(Client) && IsClientInGame(Client) && IsPlayerAlive(Client))
{
decl String:arg1[32];
GetCmdArg(1, arg1, sizeof(arg1));
if(StrEqual(arg1, "alyx") || (StrEqual(arg1, "Alyx")))
{
SetEntityModel(Client, "models/alyx.mdl");
ClientCommand(Client, "play buttons/blip1.wav");
PrintToChat(Client, "[Tigg] You've changed to model Alyx!");
return Plugin_Handled;
}
else if(StrEqual(arg1, "gman") || (StrEqual(arg1, "Gman")))
{
SetEntityModel(Client, "models/gman.mdl");
ClientCommand(Client, "play buttons/blip1.wav");
PrintToChat(Client, "[Tigg] You've changed to model Gman!");
return Plugin_Handled;
}
else if(StrEqual(arg1, "gordon") || (StrEqual(arg1, "Gordon")))
{
SetEntityModel(Client, "models/player/gordon_classic.mdl");
ClientCommand(Client, "play buttons/blip1.wav");
PrintToChat(Client, "[Tigg] You've changed to model Gordon Freeman");
return Plugin_Handled;
}
else if(StrEqual(arg1, "breen") || (StrEqual(arg1, "Breen")))
{
SetEntityModel(Client, "models/breen.mdl");
ClientCommand(Client, "play buttons/blip1.wav");
PrintToChat(Client, "[Tigg] You've changed to model Breen");
return Plugin_Handled;
}
else
{
PrintToChat(Client, "[Tigg] Error in arg: sm_model <model name>");
return Plugin_Handled;
}
}
return Plugin_Handled;
}
public Action:Command_Afk(Client, args)
{
new Health = GetClientHealth(Client);
decl String:arg1[32];
decl String:PlayerName[32];
GetCmdArg(1, arg1, sizeof(arg1));
GetClientName(Client, PlayerName, sizeof(PlayerName));
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_afk <0/1>");
return Plugin_Handled;
}
if(IsPlayerAlive(Client))
{
if(StrEqual(arg1, "1"))
{
if(StrEqual(AFK, "1"))
{
PrintToChat(Client, "[Tigg] You're already in AFK mode.");
return Plugin_Handled;
}
else
{
if(Health < 100)
{
PrintToChat(Client, "[Tigg] You can't go AFK with lower than 100HP");
return Plugin_Handled;
}
else if(Health == 100)
{
AFK = "1";
ClientCommand(Client, "play buttons/blip1.wav");
SetEntProp(Client, Prop_Data, "m_takedamage", 0, 1);
PrintToChat(Client, "[Tigg] You're now in AFK mode. You'll be frozen while in AFK mode.");
PrintToChatAll("[Tigg] Player: %s has gone in AFK mode.", PlayerName);
SetEntityRenderColor(Client, 0, 255, 0, 255);
SetEntityMoveType(Client, MOVETYPE_NONE);
RemoveWeapons(Client);
}
}
}
else if(StrEqual(arg1, "0"))
{
if(StrEqual(AFK, "0"))
{
PrintToChat(Client, "[Tigg] You're not in AFK mode.");
return Plugin_Handled;
}
else
{
AFK = "0";
ClientCommand(Client, "play buttons/blip1.wav");
PrintToChatAll("[Tigg] Player: %s has come out of AFK mode.", PlayerName);
PrintToChat(Client, "[Tigg] You come out of AFK mode!");
SetEntProp(Client, Prop_Data, "m_takedamage", 2, 1);
SetEntityRenderColor(Client, 255, 255, 255, 255);
SetEntityMoveType(Client, MOVETYPE_WALK);
WeaponsPrefix(Client);
return Plugin_Handled;
}
}
}
return Plugin_Handled;
}
stock SetSpeed(Client, Float:Speed)
{
decl SpeedOffset;
SpeedOffset = FindSendPropOffs("CHL2MP_Player", "m_flMaxspeed");
if(SpeedOffset > 0) SetEntData(Client, SpeedOffset, Speed, 4, true);
}
public Action:Command_Commit(Client, args)
{
PrintToChat(Client, "[Tigg] Suicide is disabled.");
return Plugin_Handled;
}
public Action:Command_Rape(Client, args)
{
decl Player;
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_rape <player name>");
return Plugin_Handled;
}
if(args == 1)
{
decl String:PlayerName[32];
decl MaxPlayers;
decl String:Name[32];
GetCmdArg(1, PlayerName, sizeof(PlayerName));
MaxPlayers = GetMaxClients();
for(new X = 1; X <= MaxPlayers; X++)
{
if(!IsClientConnected(X)) continue;
GetClientName(X, Name, sizeof(Name));
if(StrContains(Name, PlayerName, false) != -1) Player = X;
}
if(Player == -1)
{
PrintToChat(Client, "[Tigg] Could not find client: %s", PlayerName);
return Plugin_Handled;
}
if(IsPlayerAlive(Player))
{
GetClientName(Client, Name, sizeof(Name));
GetClientName(Player, PlayerName, sizeof(PlayerName));
PrintToChat(Player, "[Tigg] You got raped :(");
PrintToChat(Client, "[Tigg] You rapped %s", PlayerName);
ClientCommand(Player, "play vo/npc/Alyx/hurt05.wav", 1);
ClientCommand(Player, "play vo/npc/female01/pain06.wav", 2);
ClientCommand(Player, "play vo/npc/female01/ow02.wav", 3);
SlapPlayer(Player, 50, false);
}
if(GetClientHealth(Player) < 10)
{
PrintToChatAll("[Tigg] Player: %s got killed by rape :(", PlayerName);
ForcePlayerSuicide(Player);
return Plugin_Handled;
}
}
return Plugin_Handled;
}
public Action:Command_ChangeTeam(Client, args)
{
new PlayerTeam = GetClientTeam(Client);
decl String:Name[32];
GetClientName(Client, Name, sizeof(Name));
if(IsClientConnected(Client) && IsClientInGame(Client) && IsPlayerAlive(Client))
{
if(PlayerTeam == 2)
{
PrintToChatAll("[Tigg] Player: %s is switching to team Rebels!", Name);
ChangeClientTeam(Client, 3);
}
else if(PlayerTeam == 3)
{
PrintToChatAll("[Tigg] Player: %s is switching to team Combine!", Name);
ChangeClientTeam(Client, 2);
}
else
{
PrintToChat(Client, "[Tigg] Something wierd happend ^.-");
return Plugin_Handled;
}
}
return Plugin_Handled;
}
public Action:ClassPresets(Handle:timer, any:Client)
{
if(StrEqual(Class[Client], "Assault"))
{
SetSpeed(Client, 180.0);
SetEntityHealth(Client, 450);
GivePlayerItem(Client, "weapon_smg1");
GivePlayerItem(Client, "weapon_ar2");
SetEntityModel(Client, "models/combine_super_soldier.mdl");
SetEntityRenderColor(Client, 255, 255, 255, 255);
}
else if(StrEqual(Class[Client], "Assassin"))
{
SetSpeed(Client, 300.0);
SetEntityHealth(Client, 80);
GivePlayerItem(Client, "weapon_crowbar");
GivePlayerItem(Client, "weapon_stunstick");
SetEntityModel(Client, "models/alyx.mdl");
SetEntityRenderColor(Client, 0, 0, 0, 255);
}
else if(StrEqual(Class[Client], "Support"))
{
SetSpeed(Client, 150.0);
SetEntityHealth(Client, 350);
GivePlayerItem(Client, "weapon_rpg");
GivePlayerItem(Client, "weapon_shotgun");
SetEntityModel(Client, "models/monk.mdl");
SetEntityRenderColor(Client, 255, 255, 255, 255);
}
else if(StrEqual(Class[Client], "Sniper"))
{
SetEntityHealth(Client, 120);
SetEntityRenderColor(Client, 255, 0, 0, 255);
SetEntityRenderMode(Client, RENDER_GLOW);
GivePlayerItem(Client, "weapon_crossbow");
GivePlayerItem(Client, "weapon_crowbar");
GivePlayerItem(Client, "item_ammo_crossbow");
SetEntityModel(Client, "models/barney.mdl");
}
else if(StrEqual(Class[Client], "None"))
{
SetEntityModel(Client, "models/humans/Group01/Male_03.mdl");
}
return Plugin_Handled;
}
public Action:RemoveWeapons(Client)
{
decl Offset;
decl Weapon;
Offset = FindSendPropOffs("CHL2MP_Player", "m_hMyWeapons");
for(new X = 0; X < 20; X = (X + 4))
{
Weapon = GetEntDataEnt2(Client, Offset + X);
if(Weapon > 0)
{
RemovePlayerItem(Client, Weapon);
RemoveEdict(Weapon);
}
}
}
public Action:Command_IP(Client, args)
{
decl Player;
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_ip <player name>");
return Plugin_Handled;
}
if(args == 1)
{
decl String:PlayerName[32];
decl MaxPlayers;
decl String:IP[15];
decl String:Name[32];
GetCmdArg(1, PlayerName, sizeof(PlayerName));
MaxPlayers = GetMaxClients();
for(new X = 1; X <= MaxPlayers; X++)
{
if(!IsClientConnected(X)) continue;
GetClientName(X, Name, sizeof(Name));
if(StrContains(Name, PlayerName, false) != -1) Player = X;
}
if(Player == -1)
{
PrintToChat(Client, "[Tigg] Could not find client: %s", PlayerName);
return Plugin_Handled;
}
if(IsClientConnected(Client) && IsClientInGame(Client))
{
GetClientName(Client, Name, sizeof(Name));
GetClientName(Player, PlayerName, sizeof(PlayerName));
GetClientIP(Player, IP, sizeof(IP));
PrintToChat(Client, "[Tigg] IP of %s = %s", PlayerName, IP);
}
}
return Plugin_Handled;
}
stock MoneyMod(Client)
{
new Kills = GetClientFrags(Client);
if(Kills >= 1 || Kills <= 10)
{
AddClientMoney(Client, GetRandomInt(1, 100));
}
else if(Kills >= 11 || Kills <= 20)
{
AddClientMoney(Client, GetRandomInt(101, 500));
}
else if(Kills >= 21 || Kills <= 30)
{
AddClientMoney(Client, GetRandomInt(400, 1000));
}
return Plugin_Handled;
}
public Action:Command_SetMoney(Client, args)
{
if(IsClientInGame(Client))
{
Money[Client] += 60;
PrintToChat(Client, "[Tigg] You added £%d to your bank!", Money[Client]);
}
return Plugin_Handled;
}
public Action:Command_Heal(Client, args)
{
decl Player;
if(args == 0)
{
PrintToChat(Client, "[Tigg] Error in arg: sm_heal <player name>");
return Plugin_Handled;
}
if(args == 1)
{
decl String:PlayerName[32];
decl String:Name[32];
decl MaxPlayers;
GetClientName(Player, PlayerName, sizeof(PlayerName));
GetClientName(Client, Name, sizeof(Name));
GetCmdArg(1, PlayerName, sizeof(PlayerName));
new Health = GetClientHealth(Client);
MaxPlayers = GetMaxClients();
for(new X = 1; X <= MaxPlayers; X++)
{
if(!IsClientConnected(X)) continue;
GetClientName(X, Name, sizeof(Name));
if(StrContains(Name, PlayerName, false) != -1) Player = X;
}
if(Player == -1)
{
PrintToChat(Client, "[Tigg] Could not find client: %s", PlayerName);
return Plugin_Handled;
}
if(IsClientConnected(Player) && IsClientInGame(Player) && IsPlayerAlive(Player))
{
if(Health >= 100)
{
PrintToChat(Client, "[Tigg] Player: %s has full health", PlayerName);
return Plugin_Handled;
}
else if(Health <= 99)
{
PrintToChat(Client, "[Tigg] You heal %s for full health", PlayerName);
PrintToChat(Player, "[Tigg] You've been healed to full health by %s", Name);
SetEntityHealth(Player, 100);
}
}
else if(!IsPlayerAlive(Player))
{
PrintToChat(Client, "[Tigg] Player is not alive!");
return Plugin_Handled;
}
else
{
PrintToChat(Client, "[Tigg] Could not find client: %s", PlayerName);
return Plugin_Handled;
}
}
else
{
PrintToChat(Client, "[Tigg] Something wierd happend ^.-");
return Plugin_Handled;
}
return Plugin_Handled;
}
public Action:WeaponsPrefix(Client)
{
new Combine = GetClientTeam(Client);
new Rebel = GetClientTeam(Client);
if(IsPlayerAlive(Client))
{
if(Combine == 2)
{
GivePlayerItem(Client, "weapon_stunstick");
GivePlayerItem(Client, "weapon_pistol");
GivePlayerItem(Client, "weapon_smg1");
GivePlayerItem(Client, "weapon_frag");
GivePlayerItem(Client, "weapon_physcannon");
return Plugin_Handled;
}
else if(Rebel == 3)
{
GivePlayerItem(Client, "weapon_crowbar");
GivePlayerItem(Client, "weapon_pistol");
GivePlayerItem(Client, "weapon_smg1");
GivePlayerItem(Client, "weapon_frag");
GivePlayerItem(Client, "weapon_physcannon");
return Plugin_Handled;
}
}
return Plugin_Handled;
}