03.11.2017, 19:09
I want to create /hp <id> with ZCMD.
Please help
Please help
CMD:hp(playerid, params[])
{
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;
}