Admin commands and other side-commands.
#2

try that:
pawn Код:
CMD:sethp(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
    new Health;
    new PID;
    if(sscanf(params, "ud", PID, Health)) return SendClientMessage(playerid, -1, "USAGE: /sethp [playerid] [health]");
    if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, -1, "Player is not connected");
    SetPlayerHealth(PID, Health);
    }
    else  if(!IsPlayerAdmin(playerid))
   {
   SendClientMessage(playerid, -1, "You are not authorized to use this command!");
   return 0;
   }
    return 1;
}
Reply


Messages In This Thread
Admin commands and other side-commands. - by mkmk - 17.10.2014, 23:04
Re: Admin commands and other side-commands. - by Eth - 18.10.2014, 06:36
Re: Admin commands and other side-commands. - by Neil. - 18.10.2014, 06:39
Re: Admin commands and other side-commands. - by DavidBilla - 18.10.2014, 06:41
Re: Admin commands and other side-commands. - by Kaperstone - 18.10.2014, 07:09
Re: Admin commands and other side-commands. - by mkmk - 18.10.2014, 10:31
Re: Admin commands and other side-commands. - by Eth - 18.10.2014, 10:39

Forum Jump:


Users browsing this thread: 1 Guest(s)