Only Pilots Can Fly
#1

Hello, so, I just can't get this working, and I see nothing wrong in this code.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 425) //Hydra
    {
        if(IsPilot[playerid] == 1) //If pilot
        {
            return 1; //Works
        }
        else if(IsPilot[playerid] == 0) //If not pilot
        {
            RemovePlayerFromVehicle(playerid); //Remove from vehicle
            SendClientMessage(playerid, 0xFEFEFEFF, "SERVER: {FF0000}Only pilot's can fly hunters!"); //Error message
        }
    }
    return 1;
}
That should make that only pilots can fly hunter, but when I enter to a hydra, and I'm not pilot, it still allows me to enter it. Same, if I'm not pilot, it allows me to enter... Obviously.

Any ideas why this doesn't work?
Reply


Messages In This Thread
Only Pilots Can Fly - by ExeC - 23.01.2011, 13:32
Re: Only Pilots Can Fly - by iJumbo - 23.01.2011, 13:35
Re: Only Pilots Can Fly - by ExeC - 23.01.2011, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)