How do I make this?
#2

You could just use a basic variable to save the players last car. I take it you are doing this for a police car and a civilian is entering it for the second time.

pawn Код:
new lastvehicle[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    lastvehicle[playerid] = -1;
    return 1;
}

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == 2)
    {
        if(lastvehicle[playerid] == GetPlayerVehicleID(playerid))
        {
            //Same vehicle
        }
        if(lastvehicle[playerid] != GetPlayerVehicleID(playerid))
        {
            //Different vehicle.
            lastvehicle[playerid] = GetPlayerVehicleID(playerid);
            if(GetVehicleModel(GetPlayerVehicleID(playerid) == /*Certain vehicle model*/)
            {
                //Set the player's wanted level!
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
How do I make this? - by grand.Theft.Otto - 21.07.2011, 01:37
Re: How do I make this? - by [HiC]TheKiller - 21.07.2011, 01:49
Re: How do I make this? - by grand.Theft.Otto - 21.07.2011, 03:32
Re: How do I make this? - by Deskoft - 21.07.2011, 03:38
Re: How do I make this? - by grand.Theft.Otto - 21.07.2011, 03:45
Re: How do I make this? - by Donya - 21.07.2011, 04:00
Re: How do I make this? - by [HiC]TheKiller - 21.07.2011, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)