SA-MP Forums Archive
AddStaticVehicle bugging (?) - 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: AddStaticVehicle bugging (?) (/showthread.php?tid=320602)



AddStaticVehicle bugging (?) - Da' J' - 23.02.2012

Ok, so I made a few vehicle spawns IG with the correct vehicle using a vehicle spawner FS with /save. After done that, I check out the code in my savedlocations.txt (w/e it's real name is) and copypaste them into my gamemode, under OnGameModeInIt, as normally. Well, when I start my server up, and go check IG, it shows this:

I tried it after it did exactly same thing with MTA Map Editor. Wtf?

Code which is for the vehicles, under OnGameModeInIt:
pawn Код:
//-----------------[Vehicles]-----------------------//
    AddStaticVehicle(427,2227.8711,-1174.7787,25.8579,224.0016,1,1); // Enforcer
    AddStaticVehicle(427,2219.9546,-1146.4376,25.9243,88.8885,1,1); // Enforcer
    AddStaticVehicle(596,2212.7837,-1165.7687,25.4457,217.6911,1,0); // LSPD
    AddStaticVehicle(566,2217.1074,-1170.5350,25.5073,89.0963,1,1); // Ballas car
    AddStaticVehicle(566,2205.8096,-1157.4126,25.5181,270.3819,1,1); // Tahoma
    AddStaticVehicle(517,2205.8560,-1172.8031,25.5819,89.1400,1,1); // Ballas car
    AddStaticVehicle(490,2223.0313,-1164.0480,25.8624,155.8758,1,1); // FBI
    AddStaticVehicle(585,2229.7666,-1155.4158,25.4320,280.3953,1,1); // Ballas car
    AddStaticVehicle(596,2217.6023,-1159.0901,25.4491,122.0426,1,0); // LSPD
    AddStaticVehicle(601,2227.4294,-1149.4443,25.5982,113.8522,1,1); // SWAT tank



Re: AddStaticVehicle bugging (?) - calzo2011 - 23.02.2012

What are you using cause SA-MP Map Editor can make the cars respawn over and over again but MTA won't


Re: AddStaticVehicle bugging (?) - Da' J' - 23.02.2012

I tried MTA Editor AND via /save. None work, always that happen. Wtf.


Re: AddStaticVehicle bugging (?) - Vince - 23.02.2012

Your game is too slow. What happens is: if the area is not done loading by the time the cars are created, the cars will fall through the map. As with players, when vehicles fall into the void they respawn onto the nearest road. What might work is increasing the Z value of the spawns with 1.


Re: AddStaticVehicle bugging (?) - Da' J' - 23.02.2012

Thanks, now I got it working correctly. The vehicles, somehow, loaded to the game after someone came to it's world, near them. Problem fixed.