Fac Veh Respawn URGENT** - 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)
+--- Thread: Fac Veh Respawn URGENT** (
/showthread.php?tid=477327)
Fac Veh Respawn URGENT** -
DamonD - 23.11.2013
I have this to respawn LSPD vehicle's:
for(new i = 0; i < sizeof(LSPDVehicles); i++) {
SetVehicleToRespawn(LSPDVehicles[i]);
But I want it to only respawn vehicles that people ARE NOT in. This respawns every vehicle even if its being used.
Re: Fac Veh Respawn URGENT** -
Spydah - 23.11.2013
pawn Код:
for(new i = 0; i < sizeof(LSPDVehicles); i++) {
SetVehicleToRespawn(LSPDVehicles[i]);
else if IsPlayerInAnyVehicle);
SetVehicleToStay(LSPDVehicles[i]);
Not sure if it will work.
BTW: you have to define SetVehicleToStay if you're gonna try this.
Re: Fac Veh Respawn URGENT** -
Wayland - 23.11.2013
Try this
pawn Код:
for(new i = 0; i < sizeof(LSPDVehicles); i++) {
if(LSPDVehicles[i] > 0 && IsVehicleOccupied(LSPDVehicles[i]) == INVALID_VEHICLE_ID)
SetVehicleToRespawn(LSPDVehicles[i]);