19.02.2014, 15:53
how can i check if the player entered a car when its created like this : new masina = CreateVehicle(489, 2117.9717, -2137.3484, 13.8255, -98.0000, 0, 0, 100);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if (GetPlayerVehicleID(playerid) == masina)
{
// player entered that vehicle..
}
}
return 1;
}
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
if(newstate == PLAYER_STATE_DRIVER)
if (IsPlayerInVehicle(playerid, masina))
{
// player is in that vehicle..
}