Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] Vehicles isn't spawning

 
  • 0 Vote(s) - 0 Average
Pawn Vehicles isn't spawning
MrVegas
Offline

Burgershot Member
Posts: 3
Threads: 2
Joined: May 2019
Reputation: 0
Location: Israel
#1
2019-05-05, 07:21 PM
Well factions/jobs etc...Vehicles isn't spawning also, CMD that create vehicles isn't spawning them.

PHP Code:
stock LoadStaticVehicles()
{

    // DMV Vehicles
Plane[0] = AddStaticVehicle(592,1922.0416,-2258.0427,14.7435,182.1580,1,1);
Plane[1] = AddStaticVehicle(592,1871.4792,-2285.5344,14.7054,269.9822,1,1);
    DMVCar[0] = CreateVehicle(445,961.0397,-1424.1102,13.4219,40.3043,50,92,300); //
    DMVCar[1] = CreateVehicle(445,961.9089,-1420.3315,13.4219,39.0286,50,92,300); //
    DMVCar[2] = CreateVehicle(445,962.1738,-1416.4852,13.3276,38.6078,50,92,300); //
/*CreateVehicle(404,2052.8206,-1903.9745,13.3249,359.6511-180,182,1,300); // Car1
CreateVehicle(404,2056.1641,-1903.9946,13.3470,359.6512-180,182,1,300); // Car2
CreateVehicle(404,2059.3220,-1904.0138,13.3470,359.6512-180,182,1,300); // Car3
CreateVehicle(404,2062.5098,-1904.0331,13.3470,359.6512-180,182,1,300); // Car4
CreateVehicle(404,2065.6597,-1904.0526,13.3470,359.6512-180,182,1,300); // Car5*/
// Police Vehicles
FacInfo[1][fCars][0] = CreateVehicle(596,1601.9502,-1683.9442,5.5580,90.0662,0,1,0); // Crusier1
FacInfo[1][fCars][1] = CreateVehicle(596,1601.9349,-1688.1353,5.5585,89.8182,0,1,0); // Crusier2
FacInfo[1][fCars][2] = CreateVehicle(596,1602.0319,-1691.9169,5.5580,90.1704,0,1,0); // Crusier3
FacInfo[1][fCars][3] = CreateVehicle(596,1602.1292,-1695.9916,5.5580,88.9515,0,1,0); // Crusier4
FacInfo[1][fCars][4] = CreateVehicle(596,1602.1547,-1700.2701,5.5580,89.4748,0,1,0); // Crusier5
FacInfo[1][fCars][5] = CreateVehicle(596,1602.0511,-1704.3525,5.5580,88.4754,0,1,0); // Crusier6
FacInfo[1][fCars][6] = CreateVehicle(599,1585.2120,-1667.6892,6.1291,270.2057,0,1,0); // Ranger1
FacInfo[1][fCars][7] = CreateVehicle(599,1585.1547,-1671.9965,6.1323,271.1247,0,1,0); // Ranger2
FacInfo[1][fCars][8] = CreateVehicle(523,1530.0715,-1688.0465,5.4559,267.5331,1,0,0); // Bike1
FacInfo[1][fCars][9] = CreateVehicle(523,1526.7520,-1688.0627,5.4582,268.2188,1,0,0); // Bike2
FacInfo[1][fCars][10] = CreateVehicle(523,1529.9504,-1683.8184,5.4578,271.5452,1,0,0); // Bike3
FacInfo[1][fCars][11] = CreateVehicle(523,1526.6595,-1683.8164,5.4625,271.1716,1,0,0); // Bike4
FacInfo[1][fCars][12] = CreateVehicle(411,1545.3519,-1680.2714,5.6263,88.9375,0,1,0); // Speed1Infernus
FacInfo[1][fCars][13] = CreateVehicle(411,1545.3575,-1676.2065,5.6263,90.4601,0,1,0); // Speed2Infernus
FacInfo[1][fCars][14] = CreateVehicle(541,1545.1260,-1672.0992,5.5249,90.8087,0,1,0); // Speed3Bullet
FacInfo[1][fCars][15] = CreateVehicle(541,1545.1002,-1667.9021,5.5249,90.8901,0,1,0); // Speed4Bullet
FacInfo[1][fCars][16] = CreateVehicle(601,1545.0055,-1662.9552,5.6769,88.8576,0,0,0); // Splashy1
FacInfo[1][fCars][17] = CreateVehicle(601,1544.9072,-1658.9329,5.6780,88.7145,0,0,0); // Splashy2
FacInfo[1][fCars][18] = CreateVehicle(601,1545.0282,-1655.0873,5.6767,89.4033,0,0,0); // Splashy3
FacInfo[1][fCars][19] = CreateVehicle(601,1545.0804,-1651.2063,5.6920,90.5362,0,0,0); // Splashy4
FacInfo[1][fCars][20] = CreateVehicle(427,1538.9954,-1644.9917,6.0463,180.4178,0,1,0); // Enforcer1
FacInfo[1][fCars][21] = CreateVehicle(427,1534.8733,-1644.9760,6.0481,179.3436,0,1,0); // Enforcer2
FacInfo[1][fCars][22] = CreateVehicle(427,1531.0992,-1645.0317,6.0463,179.9259,0,1,0); // Enforcer3
FacInfo[1][fCars][23] = CreateVehicle(427,1526.8904,-1645.1100,6.0463,180.7001,0,1,0); // Enforcer4
FacInfo[1][fCars][24] = CreateVehicle(497,1550.4070,-1707.7499,28.6315,90.2970,0,1,0); // MAV 1
FacInfo[1][fCars][25] = CreateVehicle(497,1550.4070,-1644.1296,28.6315,90.2970,0,1,0); // MAV 2 




and under GameModeInit


PHP Code:
LoadStaticVehicles(); 
Southclaws
Offline

Administrator

Posts: 71
Threads: 13
Joined: Feb 2019
Reputation: 15
#2
2019-05-06, 07:23 AM
A command to spawn vehicles should use CreateVehicle instead of AddStaticVehicle.

As for why they aren't spawning on OnGameModeInit, I'm not entirely sure. The code is as simple as it gets so all I can think of is either you have some dodgy library hooking the create vehicle functions and breaking functionality or `LoadStaticVehicles` just isn't being called for whatever reason. Log out calls and try and strip back your code to isolate the problem.
MrVegas
Offline

Burgershot Member
Posts: 3
Threads: 2
Joined: May 2019
Reputation: 0
Location: Israel
#3
2019-05-06, 07:26 AM (This post was last modified: 2019-05-06, 07:28 AM by MrVegas.)
(2019-05-06, 07:23 AM)Southclaws Wrote: A command to spawn vehicles should use CreateVehicle instead of AddStaticVehicle.

As for why they aren't spawning on OnGameModeInit, I'm not entirely sure. The code is as simple as it gets so all I can think of is either you have some dodgy library hooking the create vehicle functions and breaking functionality or `LoadStaticVehicles` just isn't being called for whatever reason. Log out calls and try and strip back your code to isolate the problem.

Well function isn't getting called, I tried to comment everything and that's giving me that.
Also I'm using CreateVehicle too but they ain't spawning.
PHP Code:
Static vehicles loaded.

Static 
objects loaded. 
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode