13.12.2013, 19:49
Hello.
I want a vehicle to have all of it's doors closed for all players except one. However there is a problem. Only the drivers door is getting locked and the passenger's doors stay open so if I press g, I will get into passenger seat.
Another problem is that when the drivers door is locked and you sit in the car as passenger, when you exit, the drivers door unlocks.
Any solution?
I want a vehicle to have all of it's doors closed for all players except one. However there is a problem. Only the drivers door is getting locked and the passenger's doors stay open so if I press g, I will get into passenger seat.
Another problem is that when the drivers door is locked and you sit in the car as passenger, when you exit, the drivers door unlocks.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if (vehicleid == gData[G_PACKAGE_VEHICLE])
{
if (GetPlayerTeam(forplayerid) <= 4)
{
if (gData[G_PACKAGE_STARTED])
{
if (forplayerid != gData[G_PACKAGE_DRIVER])
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
}
}
else SetVehicleParamsForPlayer(gData[G_PACKAGE_VEHICLE], forplayerid, 0, 0);
}
}
return 1;
}