Help with detecting vehicle damage
#2

Change This:
pawn Код:
public DamageUpdate(playerid)
{
        new vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        new Float:nhp;
        nhp = GetVehicleHealth(vehicleid, nhp);
        if(nhp != dhp[playerid]) SendClientMessage(playerid,-1,"{FFFFFF}Damage"), dhp[playerid] = nhp;

}
To This:
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        new Float:nhp;
        nhp = GetVehicleHealth(vehicleid, nhp);
        if(nhp != dhp[playerid]) SendClientMessage(playerid,-1,"{FFFFFF}Damage"), dhp[playerid] = nhp;
          return 1;
}
EDIT: and delete
pawn Код:
forward DamageUpdate(playerid);
Reply


Messages In This Thread
Help with detecting vehicle damage - by spudi - 06.09.2012, 16:21
Re: Help with detecting vehicle damage - by CROSS_Hunter - 06.09.2012, 16:36
Re: Help with detecting vehicle damage - by Kirollos - 06.09.2012, 17:35
Re: Help with detecting vehicle damage - by HuSs3n - 06.09.2012, 17:46
Re: Help with detecting vehicle damage - by spudi - 06.09.2012, 18:31

Forum Jump:


Users browsing this thread: 1 Guest(s)