[HELP] Rank system not working
#2

OnPlayerEnterVehicle-callback gets called instantly when player presses ENTER, so the player isn't yet in the vehicle, which means RemovePlayerFromVehicle obviously isn't working.

You could either slap (freeze?) the player instead, or try and use OnPlayerStateChange-callback.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER) // When this is called, the player is sitting in the vehicle.
    {
        switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
        {
            case 520, 447, 425: //army
            {
                if(GetPlayerScore(playerid) < 1000)
                {
                    RemovePlayerFromVehicle(playerid);
                    GameTextForPlayer(playerid,"You dont have enough score (1000) to fly this vehicle!",6,6500);
                }
            }
            // Rest of the code...
        }
        // Rest of the code...
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Rank system not working - by gamer931215 - 05.08.2010, 12:29
Re: [HELP] Rank system not working - by Finn - 05.08.2010, 13:50
Re: [HELP] Rank system not working - by gamer931215 - 05.08.2010, 14:06

Forum Jump:


Users browsing this thread: 3 Guest(s)