Slap Command
#13

if(strcmp(cmd, "/slap", true) == 0)
{
cmd = strtok(cmdtext, idx);
giveplayerid = strval(cmd);
GetPlayerName(playerid, sendername, sizeof(sendername));
Level[playerid] = (dUserINT(PlayerName(playerid)).("Level"));
if(Level[playerid] >= 5)
{
if(!strlen(cmd))
return SendClientMessage(playerid, 0x887700AA, "* USAGE: /slap [playerid]");
if(!IsNumeric(cmd) || !IsPlayerConnected(strval(cmd)))
return SendClientMessage(playerid, 0x887700AA, "* That player is not connected!");
new Float:Pos[3];
GetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]);
SetPlayerPos(strval(cmd),Pos[0],Pos[1],Pos[2]+10);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string),"You slapped %s!",giveplayer);
SendClientMessage(playerid, 0x887700AA, string);
format(string, sizeof(string),"You have been slapped by Admin[%s]!",sendername);
SendClientMessage(giveplayerid, 0x887700AA, string);
format(string, sizeof(string), "Admin %s[%d] slapped player %s[%d]!", sendername, playerid, giveplayer, giveplayerid);
SendClientMessageToAll(0x887700AA, string);
}
return 1;
}
Reply


Messages In This Thread
Slap Command - by Michael_Cruise - 13.06.2012, 09:44
Re: Slap Command - by JaKe Elite - 13.06.2012, 09:57
Re: Slap Command - by Sanady - 13.06.2012, 09:58
Re: Slap Command - by Vince - 13.06.2012, 10:00
Re: Slap Command - by milanosie - 13.06.2012, 10:04
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:13
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:27
Re: Slap Command - by JaKe Elite - 13.06.2012, 10:41
Re: Slap Command - by Nuke547 - 13.06.2012, 10:50
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:04
Re: Slap Command - by -CaRRoT - 13.06.2012, 11:08
Re: Slap Command - by Nicks - 13.06.2012, 11:12
Re: Slap Command - by jop9888 - 13.06.2012, 11:29
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:41
Re: Slap Command - by WeCstoR - 09.12.2012, 10:38
Re: Slap Command - by mittukuttan - 22.01.2013, 12:01
Re: Slap Command - by PaulDinam - 22.01.2013, 12:19
AW: Slap Command - by Blackazur - 22.01.2013, 12:25
Re: Slap Command - by Threshold - 22.01.2013, 12:50
Re: Slap Command - by Coffeely - 16.03.2014, 14:42
Re: Slap Command - by iThePunisher - 16.03.2014, 14:57
Re: Slap Command - by Greaper - 16.03.2014, 15:02
Re: Slap Command - by Guest4390857394857 - 16.03.2014, 15:12

Forum Jump:


Users browsing this thread: 5 Guest(s)