Question regarding zcmd and sscanf.
#4

pawn Код:
CMD:vpaint(playerid, params[])
{
    if(PlayerInfo[playerid][pVip] >=1 )
    {
        new paintjob;
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED, "ERROR: You're not in a vehicle.");
        if(sscanf(params, "i",paintjob)) return SendClientMessage(playerid,COLOR_WHITE, "USAGE: /vpaint [1-3]");
        ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), paintjob);
    }
    else return SendClientMessage(playerid,COLOR_GREY, ERROR);
    return 1;
}
Something like this, not tested.
Reply


Messages In This Thread
Question regarding zcmd and sscanf. - by rangerxxll - 15.03.2013, 18:48
Re: Question regarding zcmd and sscanf. - by mrtms - 15.03.2013, 18:55
Re: Question regarding zcmd and sscanf. - by rangerxxll - 15.03.2013, 18:55
Re: Question regarding zcmd and sscanf. - by Denying - 15.03.2013, 18:59
Re: Question regarding zcmd and sscanf. - by rangerxxll - 15.03.2013, 19:06
Re: Question regarding zcmd and sscanf. - by Denying - 15.03.2013, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)