RemovePlayerFromVehicle
#1

Hi,

RemovePlayerFromVehicle, when i remove player from vehicle, OnPlayerExitVehicle call back get called?
Reply
#2

Important Note: Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos.
From Wiki

Use OnPlayerStateChange instead
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        //Codes
    }
    return 1;
}
Reply
#3

No,
Quote:

The exiting animation is not synced for other players.
This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange (newstate == 2/PLAYER_STATE_DRIVER) instead.

Source : https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle
EDIT:Viper was faster .
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerExitVehicle

Look at the "Important Notes".

EDIT: Too late.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)