31.03.2012, 16:50
I commented the VehicleLocked[playerid] = 0; line. Your setting the locked vehicle to 0, once they try to enter it, so therefore, unlocking it.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
//=========================[LOCKING]============================================
VehicleLocked[playerid] = 0; // Remove this!
if(VehicleLocked[playerid] == 1)
{
//new name[MAX_PLAYER_NAME];
//GetPlayerName(playerid, name, sizeof(name));
if(playerid != playerid) return SendClientMessage(playerid, COLOR_RED, "This vehicle has been locked!");
RemovePlayerFromVehicle(playerid);
}
return 1;
}