On players death, vehicles unspawn
#1

Hi,

I set all my vehicle spawns under public OnGameModeInit(), as I was advised to, but when the player dies, all vehicles seem to unspawn and dont know why..

anyone had this problem?
Reply
#2

If they're respawning from

pawn Код:
public OnPlayerDeath(playerid)
{
    return 1;
}
There must be something to do with player death somewhere in your GM, or even Filterscripts
Reply
#3

Well, turns out Its not from dying, I have no why what causes it, but after playing for abit, I just noticed they eventually all unspawn >.< - I will keep testing

Plus, people who join say they get "server lost the connection" after like 5 minutes >.<
Reply
#4

Well, if you want to change the respawn time for the cars. Are you using the AddStaticVehicle? Try

pawn Код:
AddStaticVehicleEx ( 520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 15 ); // "15" is the respawntime in seconds without a driver

// or you can try

CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60); // "60" seconds is the respawn time without a driver
Have you got a debugger for the "loosing connection" problem?
Reply
#5

You should not be using CreateVehicle under OnGameModeInit, this function is only recommended for vehicles that are being created during gameplay, where AddStaticVehicle is used for vehicles that are created when the server is started up... If at the least, can you please show us SOME of your code? We need to be able to see it to actually find an error for you...
Reply
#6

Public OnGameModeInit()

//========================VEHICLE SPAWN=====================================

//SAN FIERROR Police Vehicles
AddStaticVehicle(597,-1600.2013,748.7184,-5.4725,358.7856,0,1);// cop car1
AddStaticVehicle(597,-1592.0620,748.6961,-5.4729,359.7600,0,1); // copcar2
AddStaticVehicle(597,-1574.2046,738.4603,-5.4729,271.5572,0,1); // copcar3
AddStaticVehicle(597,-1600.1567,692.2396,-5.4728,0.7535,0,1); // copcar4
AddStaticVehicle(597,-1612.4904,692.8051,-5.4744,359.4017,0,1); // copcar5
AddStaticVehicle(597,-1624.7939,692.3304,-5.4731,359.9271,0,1); // copcar6
AddStaticVehicle(597,-1638.8918,678.3482,-5.4740,89.8555,0,1); // copcar 7
AddStaticVehicle(597,-1638.9130,649.5706,-5.4736,90.0284,0,1); // copcar8
AddStaticVehicle(597,-1588.0939,748.8084,-5.4734,359.2533,0,1); // copcar9
AddStaticVehicle(597,-1608.4883,749.3688,-5.4728,359.5216,0,1); // copcar10
AddStaticVehicle(597,-1612.4403,732.5405,-5.4738,359.5051,0,1); // copcar11
AddStaticVehicle(523,-1628.5919,692.0541,-5.6710,357.8084,0,0); // copbike1
AddStaticVehicle(523,-1632.8330,692.4888,-5.6778,352.4849,0,0); // copbike2
AddStaticVehicle(523,-1640.6925,686.0825,-5.6711,267.2890,0,0); // copbike3
AddStaticVehicle(523,-1640.6813,682.1529,-5.6718,267.4442,0,0); // copbike4
AddStaticVehicle(523,-1599.9755,677.1810,-5.6710,180.0638,0,0); // copbike5
AddStaticVehicle(523,-1596.0244,676.8976,-5.6772,179.4516,0,0); // copbike6
AddStaticVehicle(490,-1639.1251,657.7300,-5.1148,89.1594,0,0); // copjeep1
AddStaticVehicle(490,-1638.7334,661.6714,-5.1140,89.0340,0,0); // copjeep2
AddStaticVehicle(490,-1623.1836,654.0277,-5.1151,268.9039,0,0); // copjeep3
AddStaticVehicle(528,-1575.3508,651.1693,7.2309,358.5801,0,0); // PoliceTruck1
AddStaticVehicle(528,-1593.4287,650.5682,7.2320,358.6338,0,0); // PoliceTruck2
AddStaticVehicle(528,-1611.6514,673.3866,7.2309,179.9561,0,0); // PoliceTruck3
AddStaticVehicle(601,-1606.0248,673.9104,6.9463,179.1802,1,1); // SWATCAR


//Car Park - Taxis

AddStaticVehicle(420,-1496.1160,668.6252,7.1450,178.4026,6,1); // carparktaxi1
AddStaticVehicle(420,-1501.9349,686.6783,7.0486,179.3849,6,1); // carparktaxi2
AddStaticVehicle(420,-1508.0621,668.4211,7.1465,178.6682,6,1); // carparktaxi3
AddStaticVehicle(420,-1513.9517,668.8292,7.1454,178.6592,6,1); // carparktaxi4
AddStaticVehicle(420,-1531.9052,668.9496,7.1401,359.0688,6,1); // carparktaxi5
AddStaticVehicle(420,-1540.6208,686.0485,7.0908,359.2621,6,1); // carparktaxi6

I dont have a debugger
Reply
#7

Also, weird stuff keeps happening, I will be sending next to another player on my screen, but on theirs we're not even close

I had someone joined from LAN, and for me, they ran on the spot, and instantly jumped into a car, but for them, they were standing right next to me

I do have like 34 warnings though

- Also, they have that icon near next to them, the one when you pause the game, but nobody is pausing Q.Q
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)