SA-MP Forums Archive
Making Gas System - 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: Making Gas System (/showthread.php?tid=97783)



Making Gas System - almighty - 16.09.2009

Hi... im making a Gas system but it seems that the value of the "Gas" variable for each vehicle wont get setted with any value.... i have this
Код:
public OnVehicleSpawn(vehicleid)
{
 Engine[vehicleid] = false;
 Gas[vehicleid] = 50;
 return 1;
}
but the Gas[vehicleid] = 50; wont get that value... why is that


Re: Making Gas System - Chaprnks - 16.09.2009

This isn't called when the vehicle spawns, only when it respawns after being blown up or script-side respawned.


Re: Making Gas System - Redirect Left - 17.09.2009

At OnGameModeInit, after all the vehicles have spawned, loop through them all, and install the gas there.