Simple help me please
#2

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && newstate == 2) {
        if(pRank[playerid] != 3) {
            SendClientMessage(playerid, 0xFF0000FF, "You need to be Level: 3 to use this vehicle");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
The code above will work if the player is only level 3, if you want to check if the player is level 3 or higher, use this code:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 && newstate == 2) {
        if(pRank[playerid] >= 3) {
            SendClientMessage(playerid, 0xFF0000FF, "You need to be Level: 3 to use this vehicle");
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Simple help me please - by Davz*|*Criss - 02.08.2011, 16:36
Re: Simple help me please - by Calgon - 02.08.2011, 16:40
Re: Simple help me please - by Davz*|*Criss - 02.08.2011, 16:41
Re: Simple help me please - by Calgon - 02.08.2011, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)