Car problem
#1

Hy everyone,in my car system i put a function,when a player disconnect from server, his personal car(s) just destroy and when they connect back,the car reapper(because for 400+ cars it makes lag ...so..)
The car destroyes fine when a player disconnect but the problem si with creating the car when they came back.

at OnPlayerConnect i putt this:
Код:
LoadCar();
    new carkey = PlayerInfo[playerid][pPcarkey];
    if(PlayerInfo[playerid][pPcarkey] > -1)
    {
		AddStaticVehicleEx(CarInfo[carkey][cModel],CarInfo[carkey][cLocationx],CarInfo[carkey][cLocationy],CarInfo[carkey][cLocationz]+1.0,CarInfo[carkey][cAngle],CarInfo[carkey][cColorOne],CarInfo[carkey][cColorTwo],60000);
		LoadComponents(carkey);
    }
This is just for personal car 1,i do the same for 2 and 3 but i did not post the rest here.

And at OnPlayerDisconnect i put:
Код:
if(PlayerInfo[playerid][pPcarkey] != -1)
	{
	    DestroyVehicle(carkey);
	}
	if(PlayerInfo[playerid][pPcarkey2] != -1)
	{
	    DestroyVehicle(carkey2);
	}
	if(PlayerInfo[playerid][pPcarkey3] != -1)
	{
	    DestroyVehicle(carkey3);
	}
SO,what is the problem guys?
Reply


Messages In This Thread
Car problem - by crouch010 - 18.02.2013, 16:39
Re: Car problem - by austin070 - 18.02.2013, 17:02
Re: Car problem - by crouch010 - 18.02.2013, 17:05
Re: Car problem - by austin070 - 18.02.2013, 17:09
Re: Car problem - by crouch010 - 18.02.2013, 17:25

Forum Jump:


Users browsing this thread: 2 Guest(s)