OnPlayerStateChange
#1

Hello,
This code isn't removing me from my car:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == 432 && IsEngineer[playerid] != 1 && IsVIP[playerid] != && IsOwner[playerid] != 1)
        {
            SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an engineer or owner to drive this.");
            RemovePlayerFromVehicle(playerid);
        }

        if(vehicleid == 425 && IsPilot[playerid] != 1 && IsVIP[playerid] != 1 && IsOwner[playerid] != 1)
        {
            SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
            RemovePlayerFromVehicle(playerid);
        }
       
        if(vehicleid == 447 && IsPilot[playerid] != 1 && IsOwner[playerid] != 1)
        {
            SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
            RemovePlayerFromVehicle(playerid);
        }
       
        if(vehicleid == 520 && IsPilot[playerid] != 1 && IsOwner[playerid] != 1)
        {
            SendClientMessage(playerid, COLOR_RED, "ERROR: You must be a pilot or owner to pilot this.");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
When i am not pilot, owner, or engineer.
Is there any reason for this?
Thanks.
Reply


Messages In This Thread
OnPlayerStateChange - by stormchaser206 - 13.07.2012, 17:57
Re: OnPlayerStateChange - by marcoj - 13.07.2012, 17:59
Re: OnPlayerStateChange - by Vince - 13.07.2012, 18:01
Re: OnPlayerStateChange - by stormchaser206 - 13.07.2012, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)