SA-MP Forums Archive
slap - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: slap (/showthread.php?tid=599891)



[solved] slap - Deny1 - 31.01.2016

Код:
CMD:slap(playerid, params[])
{
  if(PlayerInfo[playerid][pAdmin] < 1)
  {
     new id,Float:x,Float:y,Float:z,targetid, name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],msg[128],reason[128],string[128];
     if(sscanf(params,"u",id,reason)) return SendClientMessage(playerid,-1,"SRW: /slap [id] [reason]");
     else
     {
         GetPlayerPos(id,x,y,z);
         SetPlayerPos(id,x,y,z+10);
         GetPlayerName(playerid,name,sizeof(name));
         format(msg,sizeof(msg),"srw: Admin slap you %s | Reason: %s",name,reason);
         SendClientMessage(id,-1,msg);
         GetPlayerName(targetid,name2,sizeof(name2));
    	 format(string, sizeof(string), "*"COL_RED"%s slapp %s | Reason %s",name,name2,reason);
         SendMessageToAdmins(0xFF6347FF, string, 1);
     }
  return 1;
}
Solved