OnPlayerEnterVehicle problem
#2

Dont use OnPlayerEnterVehicle - that will check when you press the ENTER key to enter the vehicle, not when your in it yet. So use OnPlayerStateChange

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        new veh = GetVehicleModel(GetPlayerVehicleID(playerid));
        if (veh == ambulanceid) // Change ambulanceid to any vehicle id you want
        {
            return SetPlayerHealth(playerid,100.00);
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerEnterVehicle problem - by Rocky Balboa - 29.10.2010, 16:12
Respuesta: OnPlayerEnterVehicle problem - by admantis - 29.10.2010, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)