Command /a slap [id]
#4

PHP код:
CMD:slap(playeridparams[]) 
{
  if(
IsPlayerAdmin(playerid))
  {
    
     new 
id,Float:x,Float:y,Float:z,name[MAX_PLAYER_NAME],msg[128];
     if(
sscanf(params,"u",id)) return SendClientMessage(playerid,-1,"Usage: /slap [id]");
     else if(
id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Player is not connected anymore!");
     else
     {
         
SendClientMessage(playerid,-1,"You have been successful slapped that player!"); 
         
GetPlayerPos(id,x,y,z); 
         
SetPlayerPos(id,x,y,z+4); 
         
GetPlayerName(playerid,name,sizeof(name)); 
         
format(msg,sizeof(msg),"AdmCmd: You have been slapped by Admin %s",name); 
         
SendClientMessage(id,-1,msg); 
     } 
 }
 else
 {
         
         
SendClientMessage(playerid,0x800000FF,"You are not authorized to use this command!");
  }
  return 
1;

try those
Reply


Messages In This Thread
Command /a slap [id] - by Luicy. - 21.05.2016, 14:11
Re: Command /a slap [id] - by SyS - 21.05.2016, 14:13
Re: Command /a slap [id] - by Luicy. - 21.05.2016, 14:19
Re: Command /a slap [id] - by SyS - 21.05.2016, 14:26
Re: Command /a slap [id] - by maximthepain - 21.05.2016, 14:29
Re: Command /a slap [id] - by Sjn - 21.05.2016, 14:51
Re: Command /a slap [id] - by GhostHacker - 21.05.2016, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)