03.04.2010, 16:12
Okay so this is my code so far:
What im trying to accomplish is that when you enter the vehicle that has it's health lower than 650, it will set your drunk level (to simulate bad steering) to 50,000.
But when I enter the vehicle that has less than 650 health, it doesnt set the drunklevel.
I would also like for it to check that it only does it for the driver, and not the passenger.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Float:health;
new veh;
GetVehicleHealth(veh, health);
if(health >650)
SetPlayerDrunkLevel (playerid, 50000);
return 1;
}
But when I enter the vehicle that has less than 650 health, it doesnt set the drunklevel.
I would also like for it to check that it only does it for the driver, and not the passenger.