03.12.2009, 03:49
im trying to implement a function to remove players from the Rhino, Hunter or Hydra when theyre not in a DmZone.
Below is the code i have added to OnPlayerEnterVehicle, the script compiles no problem except when i tested it to see if it worked, the script didn't actually remove me from said vehicle.
What am i missing or need to have in my script to get this to work?
Below is the code i have added to OnPlayerEnterVehicle, the script compiles no problem except when i tested it to see if it worked, the script didn't actually remove me from said vehicle.
Quote:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetPlayerVehicleID(vehicleid) == 432) { if(DMZone[playerid] == 0) { RemovePlayerFromVehicle(playerid); return 1; } } if(GetPlayerVehicleID(vehicleid) == 425) { if(DMZone[playerid] == 0) { RemovePlayerFromVehicle(playerid); return 1; } } if(GetPlayerVehicleID(vehicleid) == 520) { if(DMZone[playerid] == 0) { RemovePlayerFromVehicle(playerid); return 1; } } return 1; } |