SA-MP Forums Archive
I need help. - 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: I need help. (/showthread.php?tid=644082)



I need help. - zZzTGTzZz - 03.11.2017

I want to create /hp <id> with ZCMD.
Please help


Re: I need help. - Lokii - 03.11.2017

PHP код:
CMD:hp(playeridparams[])
{
    new 
Float:hp;
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"not authorized");
    if(
sscanf(params"%i%f"strval(params), hp)) return SendClientMessage(playerid, -1"Usage /hp [id] [amount]");
    if(!
IsPlayerConnected(strval(params) || IsPlayerNPC(strval(params)))) return SendClientMessage(playerid, -1"Invalid player id");
    else
    {
        
SetPlayerHealth(strval(params), hp);
        
SendClientMessage(playerid, -1"Health set");
    }
    return 
1;




Re: I need help. - zZzTGTzZz - 04.11.2017

Thank you!