[Include] drift-detection.inc - drifting gamemodes or minigames with ease!
#17

Quote:
Originally Posted by iKarim
Посмотреть сообщение
I'll have a look again, but it should work either way:

PHP код:
if(g_DriftFlags DAMAGE_CHECK_ENABLED && g_DriftPlayers[playerid][playerFlags] & DAMAGE_CHECK_ENABLED)
{
    new 
FloatvehicleHealth;
    
GetVehicleHealth(vehicleIDvehicleHealth);
    if(
vehicleHealth g_DriftPlayers[playerid][vHealth])
    {
        
GetPlayerPos(playeridvXvYvZ);
        
g_DriftPlayers[playerid][driftState] = DRIFT_STATE_NONE;
        
g_DriftPlayers[playerid][timeoutTicks] = 0;
        
#if defined OnPlayerDriftEnd
            
new Floatdistance;
            
distance GetPlayerDistanceFromPoint(playeridg_DriftPlayers[playerid][startPosX], g_DriftPlayers[playerid][startPosY], g_DriftPlayers[playerid][startPosZ]);
            
OnPlayerDriftEnd(playeridDRIFT_END_REASON_DAMAGEDdistanceGetTickCount() - g_DriftPlayers[playerid][startTimestamp]);
        
#endif
    
}

I looked at your code but it's too bad to not hook setvehiclehealth the way i told you but good job overall with the tips i provided it would be pretty cool and i would use it for my own, i might fork it on github to help out with the vehicle health damage check thing, good luck.
Reply


Messages In This Thread
drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:08
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by rfr - 15.02.2018, 14:13
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:19
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:22
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:23
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:30
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:41
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:47
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:48
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 14:52
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 14:59
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:04
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:22
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:38
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:40
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 15.02.2018, 15:42
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 15.02.2018, 15:45
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 16.02.2018, 08:55
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by RogueDrifter - 16.02.2018, 08:58
Re: drift-detection.inc - drifting gamemodes or minigames with ease! - by iKarim - 16.02.2018, 09:06

Forum Jump:


Users browsing this thread: 2 Guest(s)