Help with /carhealth
#6

pawn Код:
CMD:carhealth(playerid, params[])
{
    new string[128], id, Float:amount, name[MAX_PLAYER_NAME];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an RCON to use this command!");
    if(sscanf(params, "uf", id, amount)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /carhealth <id> <amount>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not connected!");
    GetPlayerName(id, name, sizeof(name));
    format(string, sizeof(string), "[CAR]:You have set %s's Car Health to %f!", name, amount);
    SendClientMessage(playerid, COLOR_RED, string);
    SetVehicleHealth(GetPlayerVehicleID(playerid), amount);
    return 1;
}
pawn Код:
CMD:carhealth(playerid, params[])
"params" is a string and strings must contain "[]" as a perfix.
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: 1 Guest(s)