Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Some vehicles doesnt load

$
0
0
Hello some of my vehicles doesnt load, I mean I can see them but the vehicles doesnt go towards OnVehicleSpawn
on server start
Photos:

The Problem: https://gyazo.com/c2b6279425ae928a47dfdd00259d5aa0

The vehicles that doesnt go towards OnVehicleSpawn callback when server starts:

PHP Code:

//Vehicles
    
TruckerVehicles[0] = AddStaticVehicleEx(414,-1572.34008789,129.09317017,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[1] = AddStaticVehicleEx(414,-1575.85583496,125.90543365,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[2] = AddStaticVehicleEx(414,-1578.88806152,122.54198456,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[3] = AddStaticVehicleEx(414,-1581.52319336,119.51720428,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[4] = AddStaticVehicleEx(414,-1584.36132812,116.68750000,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[5] = AddStaticVehicleEx(414,-1569.55114746,131.97119141,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Mule
    
TruckerVehicles[6] = AddStaticVehicleEx(456,-1587.84814453,113.03244019,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[7] = AddStaticVehicleEx(456,-1591.30224609,109.38220215,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[8] = AddStaticVehicleEx(456,-1595.57812500,105.83326721,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[9] = AddStaticVehicleEx(456,-1599.55334473,102.00447845,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[10] = AddStaticVehicleEx(456,-1603.49829102,98.16529083,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[11] = AddStaticVehicleEx(456,-1606.95983887,94.76251984,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[12] = AddStaticVehicleEx(456,-1610.01025391,91.14582062,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Yankee
    
TruckerVehicles[13] = AddStaticVehicleEx(443,-1614.05834961,87.06182861,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Packer
    
TruckerVehicles[14] = AddStaticVehicleEx(443,-1617.96765137,83.13320160,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Packer
    
TruckerVehicles[15] = AddStaticVehicleEx(443,-1621.37426758,79.81375122,3.79948235,225.00000000,-1,-1,VEHICLE_RESPAWN); //Packer
    
TruckerVehicles[16] = AddStaticVehicleEx(514,-1625.06359863,75.71626282,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Tank truck
    
TruckerVehicles[17] = AddStaticVehicleEx(514,-1628.41735840,72.35322571,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Tank truck
    
TruckerVehicles[18] = AddStaticVehicleEx(514,-1631.25317383,69.12777710,3.69948244,225.00000000,-1,-1,VEHICLE_RESPAWN); //Tank truck

    
PizzaVehicles[0] = AddStaticVehicleEx(448,2095.5000000,-1795.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[1] = AddStaticVehicleEx(448,2095.5000000,-1793.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[2] = AddStaticVehicleEx(448,2095.5000000,-1797.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[3] = AddStaticVehicleEx(448,2095.5000000,-1799.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[4] = AddStaticVehicleEx(448,2095.5000000,-1801.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[5] = AddStaticVehicleEx(448,2095.5000000,-1813.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[6] = AddStaticVehicleEx(448,2095.5000000,-1821.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[7] = AddStaticVehicleEx(448,2095.5000000,-1815.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[8] = AddStaticVehicleEx(448,2095.5000000,-1817.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy
    
PizzaVehicles[9] = AddStaticVehicleEx(448,2095.5000000,-1819.0000000,13.1000000,267.9950000,3,6,VEHICLE_RESPAWN); //Pizzaboy 

BTW I could fix it by doing
PHP Code:

    for(new x;x<sizeof(TruckerVehicles);x++)
    {
        
SetVehicleToRespawn(TruckerVehicles[x]);
    } 

But i dont want to do looping over it, is there any other way to fix it?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>