Every car is locked. Why? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Every car is locked. Why? (
/showthread.php?tid=201937)
Every car is locked. Why? -
Vibrate17 - 22.12.2010
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.
Re: Every car is locked. Why? -
piohh - 22.12.2010
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);
}
}
}
}
Re: Every car is locked. Why? -
Vibrate17 - 22.12.2010
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;
}
Re: Every car is locked. Why? -
Gh0sT_ - 22.12.2010
Use SetVehicleParamsEx.
Re: Every car is locked. Why? -
Ash. - 22.12.2010
Quote:
Originally Posted by Gh0sT_
Use SetVehicleParamsEx.
|
In 0.3c (depending)
Re: Every car is locked. Why? -
Vibrate17 - 22.12.2010
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);
}
}
}
}