11.08.2016, 16:28
That specified vehicle may or may not have vehicle ID 81 so you have to store its vehicle ID in a global variable when creating the vehicle. After that, all have left is to compare it and you actually have the vehicle ID as parameter:
@Above users: The model ID of "Dodo" is 593.
EDIT: Just to clarify the problem, the player is NOT in vehicle yet so GetPlayerVehicleID returns 0.
OnPlayerEnterVehicle is called when the player is starting the animation to enter the vehicle. You might use OnPlayerStateChange if you prefer.
pawn Код:
// global:
new gDodo;
// creating the vehicle:
gDodo = CreateVehicle(..); // or by AddStaticVehicle(Ex)
// OnPlayerEnterVehicle:
if (vehicleid == gDodo)
{
// send message..
}
EDIT: Just to clarify the problem, the player is NOT in vehicle yet so GetPlayerVehicleID returns 0.
OnPlayerEnterVehicle is called when the player is starting the animation to enter the vehicle. You might use OnPlayerStateChange if you prefer.