vehicle lock
#5

There is a bug with locking doors, if the vehicle is locked for a player and then the vehicle is streamed out- it will then be unlocked (when streamed in). There is a workaround by locking the vehicle inside the "OnVehicleStreamIn" callback.

EG,
pawn Code:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
    if(gVehicleLocked[vehicleid]) //swap this for the var you use to check if the vehicle is locked
        SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
    return 1;
}
EDIT: Sorry i used playerid instead of forplayerid.
Reply


Messages In This Thread
vehicle lock - by jaksimaksi - 24.08.2011, 14:51
AW: vehicle lock - by Nero_3D - 24.08.2011, 14:54
Re: vehicle lock - by =WoR=G4M3Ov3r - 24.08.2011, 14:54
Re: vehicle lock - by =WoR=Varth - 24.08.2011, 14:55
Re: vehicle lock - by iggy1 - 24.08.2011, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)