Problem with vehicle :(
#1

Ok guys the problem is when I get out of vehicle after 5 seconds or so it dissapears and spawns at its spawn place, but explodes How can I make vehicle stay in the same position after exit

-------------------

-------------------
Reply
#2

change the createvehicle https://sampwiki.blast.hk/wiki/CreateVehicle to addstaticvehicle https://sampwiki.blast.hk/wiki/AddStaticVehicle
Reply
#3

It`s addstaticvehicle already
Reply
#4

its AddStaticVehicle or AddStaticVehicleEx?
Reply
#5

AddStaticVehicle
Reply
#6

show me the code where you have it.
Reply
#7

It`s in filterscript:
Код:
////////////////////////////////////////////////////////////////////////////////
#include <a_samp>
////////////////////////////////////////////////////////////////////////////////
#if defined FILTERSCRIPT
////////////////////////////////////////////////////////////////////////////////
#endif
////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
 	AddStaticVehicle(413,-85.55000305,-1135.68395996,1.22812498,335.00000000,-1,-1); //Pony
	AddStaticVehicle(440,-82.28694153,-1137.19702148,1.29081440,335.00000000,-1,-1); //Rumpo
	AddStaticVehicle(482,-78.22471619,-1111.73400879,1.33468771,251.00000000,-1,-1); //Burrito
	AddStaticVehicle(482,-79.41491699,-1115.54821777,1.33468771,251.00000000,-1,-1); //Burrito
	AddStaticVehicle(414,-63.85312653,-1110.72229004,1.22812510,69.59997559,-1,-1); //Mule
	AddStaticVehicle(456,-74.42855835,-1106.76171875,1.32812500,251.00000000,-1,-1); //Yankee
	AddStaticVehicle(499,-67.29054260,-1119.88061523,1.17812490,69.59997559,-1,-1); //Benson
	AddStaticVehicle(515,-46.89300919,-1153.95642090,2.23184586,65.00000000,32,32); //Roadtrain
	AddStaticVehicle(515,-60.00893021,-1147.72937012,2.23184586,65.00000000,-1,1); //Roadtrain
	AddStaticVehicle(426,-74.53862000,-1153.47558594,1.56999969,152.00000000,40,1); //Premier
	AddStaticVehicle(445,-68.75630951,-1156.29797363,1.73999989,152.00000000,3,1); //Admiral
	AddStaticVehicle(516,-65.89076233,-1157.87426758,1.64999998,152.00000000,-1,-1); //Nebula
	AddStaticVehicle(551,-60.55296326,-1160.99316406,1.62999988,152.00000000,-1,-1); //Merit
	AddStaticVehicle(405,-90.27293396,-1196.46423340,2.33579850,345.00000000,-1,-1); //Sentinel
	AddStaticVehicle(405,-81.05262756,-1198.77416992,2.33615589,344.99816895,19,1); //Sentinel
	AddStaticVehicle(413,-2750.87011719,207.76269531,7.16647959,90.00000000,0,0); //Pony
	AddStaticVehicle(405,-2665.01147461,268.50009155,4.33593750,0.00000000,16,1); //Sentinel
	AddStaticVehicle(582,-2496.96142578,153.69758606,7.52150249,109.00000000,1,40); //Newsvan
	AddStaticVehicle(419,-2076.97363281,-83.74218750,35.12406158,0.00000000,-1,-1); //Esperanto
	AddStaticVehicle(419,-2089.59326172,-83.66125488,35.09406281,0.00000000,-1,-1); //Esperanto
	AddStaticVehicle(405,-2072.46289062,-108.68359375,35.32219696,180.00000000,1,1); //Sentinel
	AddStaticVehicle(525,-1914.29382324,291.14169312,41.03687668,90.00000000,3,1); //Tow Truck
	AddStaticVehicle(525,-1914.25244141,296.86694336,41.03687668,90.00000000,3,1); //Tow Truck
	AddStaticVehicle(407,-2022.06201172,92.57596588,28.41817284,270.00000000,3,1); //Firetruck
	AddStaticVehicle(407,-2022.12792969,84.08750916,28.40962601,270.00000000,3,1); //Firetruck
	AddStaticVehicle(407,-2022.27294922,75.28049469,28.44254875,270.00000000,3,1); //Firetruck
	AddStaticVehicle(544,-2053.91992188,92.65429688,28.79062653,270.00000000,3,1); //Firetruck LA
	AddStaticVehicle(544,-2053.80151367,75.51110840,28.76062584,270.00000000,3,1); //Firetruck LA
	AddStaticVehicle(544,-2053.85546875,84.37402344,28.79768181,270.00000000,3,1); //Firetruck LA
	AddStaticVehicle(597,-1606.04833984,673.91967773,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1600.24768066,673.90905762,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1588.54760742,673.92797852,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1594.24792480,673.91870117,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1582.46740723,673.93676758,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1611.94885254,673.80444336,7.05749989,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1576.45983887,673.87371826,7.06012249,0.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(490,-1572.86779785,706.20751953,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.05688477,718.23803711,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.08166504,722.60076904,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.10437012,726.43334961,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.18542480,730.53198242,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.24414062,734.80065918,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.09082031,738.66833496,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(490,-1573.21936035,742.53857422,-4.92206097,90.00000000,-1,-1); //FBI Rancher
	AddStaticVehicle(528,-1600.09802246,677.63830566,-5.05718756,0.00000000,-1,-1); //FBI Truck
	AddStaticVehicle(528,-1596.28674316,677.58129883,-5.05718756,0.00000000,-1,-1); //FBI Truck
	AddStaticVehicle(597,-1634.38122559,651.41809082,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1628.70825195,651.33978271,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1622.78906250,651.23638916,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1616.79321289,651.20849609,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1610.65417480,651.18023682,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1604.92224121,651.15325928,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1599.52221680,651.12817383,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1593.52209473,651.10034180,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1587.07189941,651.07049561,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1581.67187500,651.04541016,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(597,-1575.84045410,651.09039307,7.05749989,180.00000000,-1,1); //Police Car (SFPD)
	AddStaticVehicle(497,-1682.71008301,706.10363770,30.86656189,90.00000000,-1,1); //Police Maverick
	AddStaticVehicle(519,-1271.27185059,-609.40368652,15.14850998,0.00000000,-1,-1); //Shamal
	AddStaticVehicle(519,-1334.81921387,-608.90002441,15.14850998,0.00000000,-1,-1); //Shamal
	AddStaticVehicle(519,-1396.21667480,-608.41345215,15.14850998,0.00000000,-1,-1); //Shamal
	AddStaticVehicle(519,-1458.51477051,-607.92016602,15.14850998,0.00000000,-1,-1); //Shamal
	AddStaticVehicle(593,-1430.77929688,-506.90859985,14.72205734,160.00000000,-1,-1); //Dodo
	AddStaticVehicle(593,-1462.64550781,-523.08813477,14.72778988,250.00000000,-1,-1); //Dodo
	AddStaticVehicle(511,-1357.73303223,-473.41671753,15.68777275,160.00000000,-1,-1); //Beagle
	AddStaticVehicle(511,-1382.56604004,-487.62133789,15.68777275,250.00000000,-1,-1); //Beagle
	AddStaticVehicle(485,-1368.18493652,-261.14270020,13.84396553,0.00000000,-1,-1); //Baggage
	AddStaticVehicle(485,-1364.34863281,-264.94293213,13.84843731,0.00000000,-1,-1); //Baggage
	AddStaticVehicle(485,-1360.51574707,-268.74658203,13.84843731,0.00000000,-1,-1); //Baggage
	AddStaticVehicle(417,-1224.62646484,-10.14802170,13.14844131,0.00000000,-1,-1); //Leviathan
	AddStaticVehicle(417,-1186.14709473,27.04519653,13.14843750,0.00000000,-1,-1); //Leviathan
	AddStaticVehicle(553,-1333.57507324,-273.95645142,16.38343811,300.00000000,-1,-1); //Nevada
	AddStaticVehicle(553,-1390.96691895,-218.04081726,16.38343811,330.00000000,-1,-1); //Nevada
	AddStaticVehicle(428,-1623.62194824,649.49035645,-4.99239731,90.00000000,-1,-1); //Securicar
	AddStaticVehicle(428,-1623.51464844,653.83923340,-4.99239731,90.00000000,-1,-1); //Securicar
	AddStaticVehicle(419,-2068.70141602,-83.74626160,35.09406281,0.00000000,-1,76); //Esperanto
	AddStaticVehicle(405,-2082.38012695,-108.58303070,35.32031250,180.00000000,1,1); //Sentinel
	AddStaticVehicle(405,-2091.99365234,-108.68238831,35.32031250,180.00000000,1,1); //Sentinel
	AddStaticVehicle(405,-2062.51879883,-108.45168304,35.32551193,180.00000000,1,1); //Sentinel
	AddStaticVehicle(416,-2639.11083984,632.98901367,14.75412750,180.00000000,1,3); //Ambulance
	AddStaticVehicle(416,-2647.26098633,633.05340576,14.75412750,180.00000000,1,3); //Ambulance
	AddStaticVehicle(416,-2657.44360352,633.16589355,14.75270081,180.00000000,1,3); //Ambulance
	AddStaticVehicle(416,-2667.40258789,633.18890381,14.75270081,180.00000000,1,3); //Ambulance
	AddStaticVehicle(419,-2583.75146484,626.21490479,27.74250031,0.00000000,-1,-1); //Esperanto
	AddStaticVehicle(419,-2557.94213867,626.23046875,27.73620415,0.00000000,-1,-1); //Esperanto
	AddStaticVehicle(419,-2588.88964844,622.13989258,14.38919640,270.00000000,-1,-1); //Esperanto
	AddStaticVehicle(419,-2588.72827148,637.81195068,14.38312531,270.00000000,-1,-1); //Esperanto
	AddStaticVehicle(419,-2592.05078125,650.49841309,27.74250031,270.00000000,-1,-1); //Esperanto
	AddStaticVehicle(405,-2545.50854492,649.02325439,27.81250000,90.00000000,-1,-1); //Sentinel
	AddStaticVehicle(405,-2545.73754883,627.27227783,14.45312500,90.00000000,-1,-1); //Sentinel
	AddStaticVehicle(426,-2571.02661133,638.32324219,14.27919579,270.00000000,-1,-1); //Premier
	AddStaticVehicle(426,-2544.06884766,592.69244385,14.27312469,90.00000000,-1,-1); //Premier
	AddStaticVehicle(426,-2544.01196289,604.10882568,14.27312469,90.00000000,-1,-1); //Premier
	AddStaticVehicle(535,-2795.87792969,205.57617188,7.02750015,90.00000000,6,1); //Slamvan
	AddStaticVehicle(567,-2796.16406250,79.97772980,7.16584158,90.00000000,-1,-1); //Savanna
	AddStaticVehicle(474,-2752.95996094,375.00683594,4.04112244,180.00000000,-1,-1); //Hermes
	AddStaticVehicle(545,-2265.01342773,204.54881287,35.11406326,270.00000000,-1,1); //Hustler
	AddStaticVehicle(475,-2265.18139648,212.39642334,35.06406403,270.00000000,-1,-1); //Sabre
	AddStaticVehicle(439,-2265.22900391,208.57020569,35.16406250,270.00000000,-1,-1); //Stallion
	AddStaticVehicle(526,-2337.35913086,-125.33800507,35.16249847,0.00000000,-1,-1); //Fortune
	AddStaticVehicle(517,-2348.72021484,-125.27037048,35.24816513,0.00000000,-1,-1); //Majestic
	AddStaticVehicle(461,-2460.72802734,-26.53816986,32.47919083,270.00000000,-1,-1); //PCJ-600
	AddStaticVehicle(522,-2460.72583008,-2.52964020,27.60504723,270.00000000,-1,-1); //NRG-500
	AddStaticVehicle(461,-2099.37963867,-116.24784088,34.99481583,0.00000000,-1,-1); //PCJ-600
	AddStaticVehicle(585,-2413.03320312,540.05932617,29.62661362,270.00000000,-1,-1); //Emperor
	AddStaticVehicle(421,-2425.52050781,518.04260254,29.92968750,222.00000000,-1,-1); //Washington
	AddStaticVehicle(426,-2418.84838867,524.76348877,29.74968719,229.00000000,-1,-1); //Premier
	AddStaticVehicle(466,-2414.50488281,531.77001953,29.84968758,246.00000000,-1,-1); //Glendale
	AddStaticVehicle(467,-2586.45922852,307.63369751,4.72736740,90.00000000,6,1); //Oceanic
	AddStaticVehicle(580,-2498.43798828,370.56777954,27.66547012,60.00000000,-1,-1); //Stafford
	AddStaticVehicle(492,-2521.32128906,315.72393799,27.66562462,71.00000000,-1,-1); //Greenwood
	AddStaticVehicle(440,-2659.12084961,374.94616699,4.35397673,0.00000000,-1,-1); //Rumpo
	return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}
////////////////////////////////////////////////////////////////////////////////
public OnPlayerExitVehicle(playerid, vehicleid)
{

	return 1;
}
////////////////////////////////////////////////////////////////////////////////
Reply
#8

first of all its wrong. if you make a filterscript you dont put them inder public OnGameModeInit()
but under public OnFilterScriptInit() and delete the OnGameModeInit(). try this and tell me if works. sry for bad english
Reply
#9

Thanks I`ll try
Reply
#10

Everything worked fine Thanks to Billiout
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)