Lock vehicle
#10

yeah, it's locked for everybody except you, do you wanna lock if for everybody ?

if so, just remove "if(i != playerid)"
or try this
pawn Код:
new CurrentVehicle[MAX_PLAYERS] = { -1, ... };
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER) CurrentVehicle[playerid] = GetPlayerVehicleID(playerid);

    return 1;
}

CMD:lock(playerid, params[])
{
    new vehicleid = CurrentVehicle[playerid];
    if(vehicleid != -1)
    {
        new doors, engine, lights, alarm, bonnet, boot, objective;
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, engine, lights, alarm, VEHICLE_PARAMS_OFF, bonnet, boot, objective);
    }
    return 1;
}
Reply


Messages In This Thread
Lock vehicle - by STONEGOLD - 22.07.2015, 17:58
Re: Lock vehicle - by dominik523 - 22.07.2015, 18:25
Re: Lock vehicle - by STONEGOLD - 22.07.2015, 18:53
Re: Lock vehicle - by xVIP3Rx - 22.07.2015, 19:01
Re: Lock vehicle - by STONEGOLD - 22.07.2015, 19:39
Re: Lock vehicle - by xVIP3Rx - 22.07.2015, 19:52
Re: Lock vehicle - by STONEGOLD - 22.07.2015, 20:04
Re: Lock vehicle - by xVIP3Rx - 22.07.2015, 20:07
Re: Lock vehicle - by STONEGOLD - 22.07.2015, 20:13
Re: Lock vehicle - by xVIP3Rx - 22.07.2015, 20:16

Forum Jump:


Users browsing this thread: 1 Guest(s)