Stop people from using hydra/hunter/rhino when outside a dm
#1

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.

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;
}

What am i missing or need to have in my script to get this to work?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)