#2

Код:
CMD:slap(playerid, params[])
{
  if(PlayerInfo[playerid][pAdmin] < 1)
  {
     new id,Float:x,Float:y,Float:z,name[MAX_PLAYER_NAME],msg[128], reason[64], string[128], idname[MAX_PLAYER_NAME];
     if(sscanf(params,"us[32]",id, reason)) return SendClientMessage(playerid,-1,"Usage: /slap [id] [reason]");
     else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Player is not connected anymore!");
     else
     {
         GetPlayerName(id, name, MAX_PLAYER_NAME);
         format(string, sizeof(string), "AdmCmd: You have successfully slapped %s, reason: %s",  name, reason);
         SendClientMessage(playerid,-1,string); 
         GetPlayerPos(id,x,y,z);
         SetPlayerPos(id,x,y,z+10); 
         GetPlayerName(playerid,name,sizeof(name)); 
         format(msg,sizeof(msg),"AdmCmd: You have been slapped by Admin %s, reason: %s",name, reason); 
         SendClientMessage(id,-1,msg); /
         GetPlayerName(id, idname, MAX_PLAYER_NAME);
         format(string, sizeof(string), "AdmCmd: Admin %s has slapped %s, reason: %s", name, idname, reason);
         SendMessageToAdmins(0xFF6347FF, string, 1);
     }
     }
     else
     {
         SendClientMessage(playerid,0x800000FF,"You are not authorized to use this command!");
  }

  return 1;
}
Reply


Messages In This Thread
slap - by Deny1 - 31.01.2016, 11:56
Re: slap - by Tamy - 31.01.2016, 12:06
Re: slap - by Prostilov - 31.01.2016, 12:10
Re: slap - by Crystallize - 31.01.2016, 12:11
Re: slap - by Deny1 - 31.01.2016, 12:11
Re: slap - by Deny1 - 31.01.2016, 12:15
Re: slap - by Crystallize - 31.01.2016, 12:22
Re: slap - by Deny1 - 31.01.2016, 12:29
Re: slap - by Crystallize - 31.01.2016, 12:34
Re: slap - by Darkwood17 - 31.01.2016, 12:40

Forum Jump:


Users browsing this thread: 3 Guest(s)