26.02.2014, 04:11
pawn Код:
CMD:slap(playerid,params[])
{
new targetid; new Float:x, Float:y, Float:z;
if(IsPlayerAdmin(playerid) || if(PInfo[playerid][AdminLevel] >= 1);
{
if(sscanf(params,"u",targetid)) return SendClientMessage(playerid,COLOR_YELLOW,"Usage: /slap [player id]");
{
GetPlayerPos(targetid,x,y,z);
SetPlayerPos(targetid,x,y,z+20);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(targetid,PlayerName,MAX_PLAYER_NAME);
new string[128];
format(string,sizeof(string),"You have slapped %s.",PlayerName);
SendClientMessage(playerid,COLOR_MESSAGE,string);
SendClientMessage(targetid,COLOR_YELLOW,"You got slapped by someone.");
}
}
else SendClientMessage(playerid,COLOR_YELLOW,notknown);
return 1;
}