OnPlayerEnterVehicle
#3

OnPlayerEnterVehicle gets called when a player is close to a vehicle and presses enter, it will never get called when a player is in a vehicle.
In your case, you'd need OnPlayerStateChange.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER && oldstate == PLAYER_STATE_ONFOOT)
    {
        if (GetVehicleModel(GetPlayerVehicleID(playerid) == vehicle model)
        {
             // do something
        }
        // ...
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerEnterVehicle - by cruising - 05.07.2011, 19:28
AW: OnPlayerEnterVehicle - by Nero_3D - 05.07.2011, 19:32
Re: OnPlayerEnterVehicle - by [NoV]LaZ - 05.07.2011, 19:32
Re: OnPlayerEnterVehicle - by Wesley221 - 05.07.2011, 19:33
Re: OnPlayerEnterVehicle - by cruising - 05.07.2011, 19:47
Re: OnPlayerEnterVehicle - by [NoV]LaZ - 05.07.2011, 19:57
Re: OnPlayerEnterVehicle - by cruising - 05.07.2011, 20:11
Re: OnPlayerEnterVehicle - by [NoV]LaZ - 05.07.2011, 20:13
Re: OnPlayerEnterVehicle - by [MG]Dimi - 05.07.2011, 20:31
Re: OnPlayerEnterVehicle - by cruising - 05.07.2011, 20:36

Forum Jump:


Users browsing this thread: 1 Guest(s)