All cars have nitrous?
#4

If you want to do with command you should type this code
pawn Код:
if (!strcmp(cmdtext, "/nitro", true)) {
    if (!IsPlayerInAnyVehicle(playerid)) return 1;
    new vehicleid = GetPlayerVehicleID(playerid);
    AddVehicleComponent(vehicleid, 1010); // X10 nitro
    return 1;
}
But if you want to add nitro to the all vehicles you should write this in the end of OnGameModeInit
pawn Код:
for (new i = 0; i < MAX_VEHICLES; i++)
    AddVehicleComponent(i, 1010);
If you have a variable contains last vehicle id (for example, lastVehicleId) you can rewrite your loop as
for (new i = 0; i < lastVehicleId; i++)...
Reply


Messages In This Thread
All cars have nitrous? - by California_ - 14.01.2013, 17:43
Re: All cars have nitrous? - by Mr.Anonymous - 14.01.2013, 17:45
Re: All cars have nitrous? - by [CG]Milito - 14.01.2013, 17:48
Re: All cars have nitrous? - by anybox - 14.01.2013, 17:50
Re: All cars have nitrous? - by u3ber - 14.01.2013, 18:02
Re: All cars have nitrous? - by Mr.Anonymous - 14.01.2013, 18:06
Re: All cars have nitrous? - by u3ber - 14.01.2013, 18:08
Re: All cars have nitrous? - by Mr.Anonymous - 14.01.2013, 18:13
Re: All cars have nitrous? - by u3ber - 14.01.2013, 18:23

Forum Jump:


Users browsing this thread: 1 Guest(s)