Anti Vehicle-Repair.
#10

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
This would work if you had a gas station script that checks if you're near a gas station, check if the value is suddenly 100/1000 and check if he's at a gas station or not. If not, ban the player.
Quote:
Originally Posted by Jefff
Посмотреть сообщение
Example

pawn Код:
new Float:vHealth[MAX_VEHICLES];
new OneSecond[MAX_PLAYERS];
OnPlayerUpdate

pawn Код:
static timee, ID;

timee = gettime();

if(OneSecond[playerid] < timee)
{
    OneSecond[playerid] = timee;
    ID = GetPlayerVehicleID(playerid);
    if(ID)
    {
        static Float:vHP;
        GetVehicleHealth(ID, vHP);
        if(vHP != vHealth[ID])
        {
            vHealth[ID] = vHP;
            // health changes
        }
    }
}
Those ways doesn't work.
The code you gave is to detect when health changed, but not if it become from crash, or fix or something else.
AGAIN, I need something like OnPlayerTakeDamage, for vehicle.
Reply


Messages In This Thread
Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 08:28
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:17
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:39
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:41
Re: Anti Vehicle-Repair. - by Hanger - 25.09.2014, 22:48
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:49
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 22:51
Re: Anti Vehicle-Repair. - by Jefff - 25.09.2014, 22:58
Re: Anti Vehicle-Repair. - by Jimmy0wns - 25.09.2014, 23:05
Re: Anti Vehicle-Repair. - by AfikAtashga - 25.09.2014, 23:19

Forum Jump:


Users browsing this thread: 1 Guest(s)