/sethp command not working
#10

This is how a sethp cmd can look like with zcmd and sscanf
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;
}
Looks pretty easy when you think about it right?
Reply


Messages In This Thread
/sethp command not working - by arad55 - 04.08.2014, 22:07
Respuesta: /sethp command not working - by Cepillado - 04.08.2014, 22:24
Re: /sethp command not working - by ViniBorn - 04.08.2014, 22:26
Re: /sethp command not working - by arad55 - 04.08.2014, 22:37
Respuesta: /sethp command not working - by Cepillado - 04.08.2014, 22:45
Re: /sethp command not working - by arad55 - 04.08.2014, 22:55
Re: /sethp command not working - by TLN - 04.08.2014, 22:59
Respuesta: /sethp command not working - by Cepillado - 04.08.2014, 23:04
Re: /sethp command not working - by arad55 - 04.08.2014, 23:05
Re: /sethp command not working - by Don_Cage - 04.08.2014, 23:11

Forum Jump:


Users browsing this thread: 2 Guest(s)