How do I dertermine the size of an integar.
#5

Oh yes, I usually do use "u", but I wrote that command so fast I didn't realise my mistake.

I changed it to this:

pawn Код:
dcmd_sethealth(playerid,params[])
{
    new id, health;
    sscanf(params,"ui",id,health);
    if(sscanf(params,"u",id))
    {
        SetPlayerHealth(playerid,health);
    }
    else
    {
        SetPlayerHealth(id,health);
    }
    return 1;
}
When I type /sethealth 50, nothing happens but if I type /sethealth 0 50 (0 being my ID), my health gets set to 50
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)