16.08.2018, 06:02
PHP Code:
stock LockVehicle(playerid, vehicleid)
{
for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != playerid) SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
Vehicles[FindVehicleID(vehicleid)][tmplocked] = 1;
Vehicles[FindVehicleID(vehicleid)][tmplockedby] = playerid;
}
stock UnlockVehicle(vehicleid)
{
for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(vehicleid, i, 0, 0);
Vehicles[FindVehicleID(vehicleid)][tmplocked] = 0;
Vehicles[FindVehicleID(vehicleid)][tmplockedby] = -1;
}

