OnvehicleDamageStatusUpdate
#1

Hello, I try to creat an anty vehicle repair hack, but I have some problem what is wrong?, what is wrong in code?

PHP код:
new panelss[MAX_VEHICLES], doo..... all created
public OnVehicleDamageStatusUpdate(vehicleidplayerid)
{
    
GetVehicleDamageStatus(vehicleidpanelss[vehicleid], doorss[vehicleid], lightss[vehicleid], tiress[vehicleid]);
    if(!
IsVehicleOccupied(vehicleid))
    {
        
UpdateVehicleDamageStatus(vehicleidpanelss[vehicleid], doorss[vehicleid], lightss[vehicleid], tiress[vehicleid]);
        if(
panelss[vehicleid]==0)
         {
            
SendClientMessage(GetVehicleDriver(vehicleid),-1,"You Have RepairHack");
            
UpdateVehicleDamageStatus(vehicleidpanelss[vehicleid], doorss[vehicleid], lightss[vehicleid], tiress[vehicleid]);
        }
    }
    return 
1;

I saw, when panelss are 0, the car is complet repaired, so I put if = 0 the car is repaired hacker, but don't work, after I destroyed the car and I saw the panelss are 55717137, so I put if panel <55717137 and don't work,
The message, are not displayed in any variante,
Some help please?
Reply
#2

I trust you know what the ! operator does. You're saying: if the vehicle is NOT occupied (i.e. empty), get its driver. Which is utterly pointless and illogical.
Reply
#3

I write wrong the code, but when I damage my car, if I going in a pole it say the message, he need to say when I repair not when I scrach it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)