Hello
#4

Quote:
Originally Posted by lordturhan
View Post
Oh forgot to mention i need to check if the player is not in vehicle but checking last vehicle he entered
Okay, kinda sleepy but this is what came in my mind, if someone has even better way you can feel free to correct me.

pawn Code:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
    if( oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT ) // when player exits the vehicle
    {
        SetPVarInt( playerid, "LASTVEHICLE", GetVehicleModel( GetPlayerVehicleID( playerid ) ) );
    }
    return 1;
}

// now the following code wherever you want:-

if( GetPvarInt( playerid, "LASTVEHICLE" ) == 411 ) // MODEL_ID can be replaced with your own vehicle model like "411" is infernus
{
    SendClientMessage( playerid, -1, "You are in infernus, enjoy!" );
}
-FalconX
Reply


Messages In This Thread
Hello - by lordturhan - 08.06.2012, 13:04
Re: Hello - by FalconX - 08.06.2012, 13:15
Re: Hello - by lordturhan - 08.06.2012, 13:26
Re: Hello - by FalconX - 08.06.2012, 13:36

Forum Jump:


Users browsing this thread: 1 Guest(s)