Cars dissappear...
#1

Hi!

I added some vehicles into my GM, and I made it with AddStaticVehicleEx, so they respawn after 3 minutes!

Now the problem: I enter a car and drive it to a point! Then, I come out of it! After this, it dissappears!

Here my codes:

PHP код:
        AddStaticVehicleEx(549,2508.7458,-1673.4332,13.1328,331.4908,86,86,3); // cargrove
        
AddStaticVehicleEx(461,2495.9478,-1647.8547,13.1115,174.6859,86,86,3); // cargrove
        
AddStaticVehicleEx(461,2496.7610,-1648.1541,13.1086,175.2251,86,86,3); // cargrove
        
AddStaticVehicleEx(461,2497.9375,-1648.4659,13.1111,184.0388,86,86,3); // cargrove
        
AddStaticVehicleEx(461,2498.7876,-1648.4427,13.1132,179.6918,86,86,3); // cargrove
        
AddStaticVehicleEx(461,2494.7192,-1648.0718,13.1086,193.0852,86,86,3); // cargrove
        
AddStaticVehicleEx(541,2465.1980,-1654.4144,13.0095,88.7352,86,86,3); // cargrove
        
AddStaticVehicleEx(541,2470.9324,-1654.4078,13.0283,89.9616,86,86,3); // cargrove
        
AddStaticVehicleEx(506,2447.8159,-1663.1962,13.1339,93.0353,86,86,3); // cargrove
        
AddStaticVehicleEx(506,2441.1489,-1654.0162,13.0894,92.8239,86,86,3); // cargrove
        
AddStaticVehicleEx(466,2448.3896,-1654.2817,13.0672,86.8232,86,86,3); // cargrove
        
AddStaticVehicleEx(451,2477.6624,-1654.1115,13.1015,88.7006,86,86,3); // cargrove
        
AddStaticVehicleEx(451,2461.1284,-1662.8060,13.0111,87.2712,86,86,3); // cargrove
        
AddStaticVehicleEx(429,2498.1091,-1654.5010,13.0973,69.7624,86,86,3); // cargrove
        
AddStaticVehicleEx(429,2468.5850,-1670.2916,13.0728,8.9769,86,86,3); // cargrove
        
        
AddStaticVehicleEx(521,1996.7722,-1274.0494,23.5127,348.8091,85,85,3); // carballas
        
AddStaticVehicleEx(521,1999.4027,-1274.0170,23.5134,351.8618,85,85,3); // carballas
        
AddStaticVehicleEx(521,2002.3900,-1274.3181,23.5184,355.9186,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.7637,-1243.2600,23.6552,1.1703,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.8879,-1234.3453,23.6550,359.6620,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.7661,-1224.2953,23.6552,359.5769,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.4126,-1214.7169,23.6424,2.6988,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.3826,-1205.5782,23.6035,1.8917,85,85,3); // carballas
        
AddStaticVehicleEx(518,2057.3799,-1197.5027,23.5449,2.8582,85,85,3); // carballas
        
AddStaticVehicleEx(541,2036.2377,-1140.9662,24.0156,258.3013,85,85,3); // carballas
        
AddStaticVehicleEx(541,2026.9613,-1141.3065,24.2767,270.2179,85,85,3); // carballas
        
AddStaticVehicleEx(541,2018.5743,-1141.0833,24.5089,266.3834,85,85,3); // carballas
        
        
AddStaticVehicleEx(521,2662.3623,-1077.7656,69.2199,170.9427,6,6,3); // carvagos
        
AddStaticVehicleEx(521,2659.9753,-1077.8984,69.2625,185.0592,6,6,3); // carvagos
        
AddStaticVehicleEx(521,2664.2871,-1077.7148,69.1897,180.3845,6,6,3); // carvagos
        
AddStaticVehicleEx(521,2666.2568,-1077.7443,69.1480,180.8469,6,6,3); // carvagos
        
AddStaticVehicleEx(521,2668.5830,-1077.4358,69.0949,192.0403,6,6,3); // carvagos
        
AddStaticVehicleEx(533,2673.1926,-1076.8588,68.9390,178.6290,6,6,3); // carvagos
        
AddStaticVehicleEx(533,2678.0232,-1077.2758,68.9189,181.3347,6,6,3); // carvagos
        
AddStaticVehicleEx(533,2682.6104,-1077.3187,68.9194,181.6092,6,6,3); // carvagos
        
AddStaticVehicleEx(533,2686.9731,-1077.1714,68.9206,179.8280,6,6,3); // carvagos
        
AddStaticVehicleEx(506,2629.6233,-1042.8337,69.2447,91.2413,6,6,3); // carvagos
        
AddStaticVehicleEx(506,2652.2642,-1042.5287,69.2438,91.1699,6,6,3); // carvagos
        
AddStaticVehicleEx(506,2657.3079,-1041.5808,69.3290,95.4773,6,6,3); // carvagos
        
AddStaticVehicleEx(491,2600.4133,-1052.0961,69.2475,91.4662,6,6,3); // carvagos
        
AddStaticVehicleEx(491,2593.7712,-1052.0981,69.2489,87.9437,6,6,3); // carvagos
        
AddStaticVehicleEx(491,2586.9419,-1052.2527,69.2794,90.2414,6,6,3); // carvagos
        
AddStaticVehicleEx(477,2550.0225,-1089.5205,64.2267,108.7047,6,6,3); // carvagos
        
AddStaticVehicleEx(477,2525.3289,-1086.6506,56.8538,91.2922,6,6,3); // carvagos
        
AddStaticVehicleEx(477,2565.8188,-1067.1219,68.9825,354.5157,6,6,3); // carvagos 
Reply
#2

AddStaticVehicleEx
Код:
Parameters:
modelid			The Model ID for the vehicle.
Float:spawn_X		The X-coordinate for the vehicle.
Float:spawn_Y		The Y-coordinate for the vehicle.
Float:spawn_Z		The Z-coordinate for the vehicle.
Float:angle		The facing - angle for the vehicle.
color1			The primary color ID.
color2			The secondary color ID.
respawn_delay		The delay until the car is respawned without a driver in minutes.

Returns			The vehicle ID of the vehicle created.
I believe it is in seconds instead of minutes, not sure thought but perhaps give it a try.


What you are looking for is the respawn_delay parameter, as you can see in your code's all your vehicle respawn within 3 seconds. Increase them to 60 and they will last for 1 minute (60 seconds).

Hope this helps.

Kind Regards,
Improvement™
Reply
#3

or -1 to disable respawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)