Help with /carhealth
#2

"amount" must be a float.

pawn Код:
CMD:carhealth(playerid,params)
{
    new pid, ch = GetPlayerVehicleID(playerid), str[128], pidn[MAX_PLAYER_NAME], Float:amount;
    if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,"ERROR: You must be an RCON to use this command!");
    if(sscanf(params,"uf", pid, amount)) return SCM(playerid,COLOR_RED,"USAGE: /carhealth <id> <amount>");
    if(!IsPlayerConnected(pid)) return SCM(playerid,COLOR_RED,"ERROR: That player is not connected!");
    GPN(pid, pidn, MAX_PLAYER_NAME);
    FT(str, sizeof(str), "[CAR]:You have set %s's Car Health to %f!", pidn, amount);
    SCM(playerid, NICE_PINK, str);
    SetVehicleHealth(ch, amount);
    return 1;
}
Reply


Messages In This Thread
Help with /carhealth - by Snail - 24.08.2014, 04:03
Re: Help with /carhealth - by SickAttack - 24.08.2014, 04:29
Re: Help with /carhealth - by 1fret - 24.08.2014, 04:29
Re: Help with /carhealth - by Snail - 24.08.2014, 04:31
Re: Help with /carhealth - by 1fret - 24.08.2014, 04:35
Re: Help with /carhealth - by SickAttack - 24.08.2014, 04:37
Re: Help with /carhealth - by Snail - 24.08.2014, 04:37
Re: Help with /carhealth - by Snail - 24.08.2014, 04:39
Re: Help with /carhealth - by SickAttack - 24.08.2014, 04:41
Re: Help with /carhealth - by Snail - 24.08.2014, 04:47

Forum Jump:


Users browsing this thread: 2 Guest(s)