Get all spawned cars - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Get all spawned cars (
/showthread.php?tid=78001)
Get all spawned cars -
Blt950 - 16.05.2009
Hi i just need that piece of script that does like
Код:
..../command...
{
get all vehicles that are spawned
-do something with them-
.......
I dont need the piece of /command, just that with vehs
Thanks
Re: Get all spawned cars -
MenaceX^ - 16.05.2009
What do you want to do with them?
Respawn them?
Re: Get all spawned cars -
Blt950 - 16.05.2009
Quote:
Originally Posted by MenaceX^
What do you want to do with them?
Respawn them?
|
No, refuel with command: VehicleGas[c] = MAX_GAS;
Re: Get all spawned cars -
ICECOLDKILLAK8 - 16.05.2009
pawn Код:
if(strcmp(cmdtext,"/command",true) == 0)
{
for(new v; v < MAX_VEHICLES; v++)
{
VehicleGas[v] = MAX_GAS;
}
return 1;
}
Re: Get all spawned cars -
MenaceX^ - 16.05.2009
pawn Код:
new cmd[128];
if(!strcmp(cmd,"/command",true))
{
for(new v=1;v<MAX_VEHICLES;v++) // loop for all the vehicles.
VehicleGas[v]=MAX_GAS;
return 1;
}