How to respawn vehicles without trailer? - 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: How to respawn vehicles without trailer? (
/showthread.php?tid=658872)
How to respawn vehicles without trailer? -
Michatex - 14.09.2018
Hello everyone. I am asking you for help. I want to make spawn for all vehicles except for trailers that are attached to vehicles. What should I do to do this?
Re: How to respawn vehicles without trailer? -
Ciandlah - 14.09.2018
pawn Код:
forward RespawnCars();
public RespawnCars()
{
new bool:VehUsed[MAX_VEHICLES],vehID;
for(new playerid,g = GetMaxPlayers(); playerid != g; playerid++)
if(IsPlayerConnected(playerid))
{
vehID = GetPlayerVehicleID(playerid);
if(vehID > 0)
{
VehUsed[vehID] = true;
new vehMod = GetVehicleModel(vehID);
if(vehMod == 403 || vehMod == 514 || vehMod == 515 || vehMod == 525 || vehMod == 531 || vehMod == 572 || vehMod == 583) // Linerunner,Tanker,Roadtrain,Towtruck,Tractor,Mower,Tug
{
vehID = GetVehicleTrailer(vehID);
if(vehID > 0)
VehUsed[vehID] = true;
}
}
}
for(new vehicleid = 1; vehicleid != MAX_VEHICLES; vehicleid++)
if(!VehUsed[vehicleid] && IsValidVehicle(vehicleid))
SetVehicleToRespawn(vehicleid);
return;
}
Re: How to respawn vehicles without trailer? -
Calisthenics - 15.09.2018
You could have linked the thread link instead of just copy-pasting and 'claim it as yours'.
Reference:
https://sampforum.blast.hk/showthread.php?tid=420526
Re: How to respawn vehicles without trailer? -
Ciandlah - 15.09.2018
Quote:
Originally Posted by Calisthenics
|
I love how you assume I claimed it as my own 😂 did I state I made it for them.. noo so keep your 2 cents to yourself