Enter vehicles only with certain score
#8

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerScore(playerid) > 50)
        {
            SendClientMessage(playerid,0xAA3333AA,"{76EEC6}Drive {283A90}carefully.");
            return 1;
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,0xAA3333AA,"{76EEC6}Your Score {551011}is not high enough to drive this {76EEC6}vehicle!");
            return 1;
        }
    }
    return 1;
}
With OnPlayerStateChange you don't need to use a timer, 'cause it will be called only when the player is inside the vehicle, not when he attempts to enter a vehicle.
Reply


Messages In This Thread
Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:12
Re: Enter vehicles only with certain score - by [BEP]AcerPilot - 10.01.2011, 19:18
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:25
Re: Enter vehicles only with certain score - by boelie - 10.01.2011, 19:26
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:27
AW: Enter vehicles only with certain score - by Kmitska - 10.01.2011, 19:30
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 19:34
Re: Enter vehicles only with certain score - by [BEP]AcerPilot - 10.01.2011, 19:51
Re: Enter vehicles only with certain score - by boelie - 10.01.2011, 19:53
Re: Enter vehicles only with certain score - by BlackWolf120 - 10.01.2011, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)