Car crash
#1

Hello whats the code so when you crash a car it takes a bit of you're health down like LS-RP
Reply
#2

or you could use OnVehicleDamageStatusUpdate public call back..

Something like this

PHP код:
public OnVehicleDamageStatusUpdate(vehicleidplayerid)
{
    new 
Float:hp;
    
GetPlayerHealth(playeridhp); //if not work, try GetPlayerHealth(playerid, hp, sizeof(hp));
    
if(IsPlayerInAnyVehicle(playerid))
    
SetPlayerHealth(playeridhp 1.0);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)