12.03.2011, 14:08
pawn Код:
CMD:slap( playerid, params[ ] )
{
new ID,string[128],reason[66],Name[MAX_PLAYER_NAME],IdName[MAX_PLAYER_NAME],Float:x,Float:y,Float:z,Float:Health;
if(sscanf(params, "uS(Not Specified)[65]", ID, reason)) return SendClientMessage(playerid, -1, "USAGE: /slap [PlayerID] [Reason]");
else if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "[*] Enter a valid player ID/name!");
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(ID, IdName, sizeof(IdName));
GetPlayerHealth(ID,Health);
SetPlayerHealth(ID,Health-25);
GetPlayerPos(ID,x,y,z);
SetPlayerPos(ID,x,y,z+5);
PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
PlayerPlaySound(ID,1190,0.0,0.0,0.0);
format(string,sizeof(string),"You have been Slapped by Administrator %s | Reason: %s",IdName,reason);
SendClientMessage(ID,-1,string);
format(string,sizeof(string),"You have slapped %s | Reason: %s",IdName,reason);
SendClientMessage(playerid,-1,string);
return 1;
}