last vehicle
#1

can somebody tell me how to make LastVehicle system ?
when a player enter a vehicle, this vehicle will be the last vehicle

ex:
PutPlayerInVehicle(playerid, LastVehicle);
Reply
#2

pawn Код:
new lastVehicle[MAX_PLAYERS];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) // If the player's state changes to a vehicle state we'll have to spec the vehicle.
    {
        lastVehicle[playerid] = GetPlayerVehicleID(playerid);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)