04.08.2014, 23:11
This is how a sethp cmd can look like with zcmd and sscanf
Looks pretty easy when you think about it right?
pawn Код:
CMD:sethp(playerid, params[])
{
new id,name[MAX_PLAYER_NAME+1],string[128],Float:hp;
if(sscanf(params,"ui",id,hp)) return SentClientMessage(playerid, -1, "SYNTAX: /sethp [player] [health]");
SetPlayerHealth(id, hp);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"%s has set your health to %i",name, hp);
SendClientMessage(id, -1, string);
return true;
}