Help with Command to supply all cars
#5

Yes, that way the loop will continue until c reaches MAX_VEHICLES-1.

Though as I told you before declaring a string with size of 256 2k times and also sending the message 2k times is not that good.
pawn Код:
new stringgas[60];
for ( new c = 0 ; c < MAX_VEHICLES ; c ++)  
{  
    carfuel[c] += quantity;
}
format(stringgas, sizeof(stringgas), "AdmCmd: You supplied %d liter on all cars of San Andreas", quantity);  
SendClientMessage(playerid, blue, stringgas);
Also vehicle IDs start from 1 so you may start the loop from 1 as well (unless you use index 0).
Reply


Messages In This Thread
Help with Command to supply all cars - by LucasDias - 09.06.2015, 14:02
Re: Help with Command to supply all cars - by Konstantinos - 09.06.2015, 14:04
Re: Help with Command to supply all cars - by LucasDias - 09.06.2015, 14:11
Re: Help with Command to supply all cars - by Richie© - 09.06.2015, 14:15
Re: Help with Command to supply all cars - by Konstantinos - 09.06.2015, 14:17
Re: Help with Command to supply all cars - by JaydenJason - 09.06.2015, 14:26
Re: Help with Command to supply all cars - by Threshold - 09.06.2015, 15:56
Re: Help with Command to supply all cars - by LucasDias - 09.06.2015, 17:00
Re: Help with Command to supply all cars - by Threshold - 09.06.2015, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)