Vehicle /lock
#10

Replace
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
     {
            EnteredVehicle[playerid] = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
            if(doors == 1)
            {
                //Remove Player From Vehicle Here
                GameTextForPlayer(playerid, "~r~Vehicle Locked!", 5000, 5);
            }
     }
}
With:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    EnteredVehicle[playerid] = vehicleid;
    GetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, doors, bonnet, boot, objective);
    if(doors == 1)
    {
        GameTextForPlayer(playerid, "~r~Vehicle Locked!", 5000, 5);
        return 1;
    }
    return 1;
}
EDIT: Oops, I was meant to edit the other post 0_o :S
Reply


Messages In This Thread
Vehicle /lock - by kbalor - 11.07.2012, 20:26
Re: Vehicle /lock - by Tuntun - 12.07.2012, 09:11
Re: Vehicle /lock - by clarencecuzz - 12.07.2012, 09:21
Re: Vehicle /lock - by clarencecuzz - 12.07.2012, 09:23
Re: Vehicle /lock - by kbalor - 12.07.2012, 11:07
Re: Vehicle /lock - by clarencecuzz - 12.07.2012, 11:09
Re: Vehicle /lock - by kbalor - 12.07.2012, 11:18
Re: Vehicle /lock - by kbalor - 12.07.2012, 11:27
Re: Vehicle /lock - by clarencecuzz - 12.07.2012, 11:39
Re: Vehicle /lock - by clarencecuzz - 12.07.2012, 11:43

Forum Jump:


Users browsing this thread: 1 Guest(s)