Every car is locked. Why?
#1

Hello. I have an role play server and I have a big problem. On my pc everything is fine ( all cars are unlocked ) but when I upload my gm on host ( linux ), every car are locked. This problem appear about 3 hours. I make an upgrade on my server. I use 0.3c rc6.
Reply
#2

Use you OnVehicleStreamIn ?

Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
       for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	       if(IsPlayerConnected(i))
	       {
			if(gCarLock[vehicleid]==1)
			{
				SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
			}
		}
	}
}
Reply
#3

yes. I use OnVehicleStreamIn and looks like this :

Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if (LightPwr[vehicleid] == 0)
	{
		new panels,doors,lights,tires;
		GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
		UpdateVehicleDamageStatus(vehicleid, panels, doors, 5, tires);
	}
 for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(gCarLock[vehicleid] != -1 && gCarLock[vehicleid] != forplayerid)
        {
            SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
        }
    }
	return 1;
}
Reply
#4

Use SetVehicleParamsEx.
Reply
#5

Quote:
Originally Posted by Gh0sT_
Посмотреть сообщение
Use SetVehicleParamsEx.
In 0.3c (depending)
Reply
#6

Thank you piohh ... your solution is the best.

Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
       for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	       if(IsPlayerConnected(i))
	       {
			if(gCarLock[vehicleid]==1)
			{
				SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
			}
		}
	}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)