[Include] weapon-config.inc - Damage system with many features

When vehicle explodes near players take no damage from explosion or when they catch on fire with this code:
Code:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
    if(Killed[playerid] != 0) return 1;
	
    hsv[issuerid] = 0;

    if((weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES || weapon == WEAPON_VEHICLE_MINIGUN) && GangTeam[playerid] == 0)
    {
        hsv[issuerid] = 1;
	return 0;
    }
    return 1;
}
However when I delete all the code inside and leave just this

Code:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
    return 1;
}
Damage is being taken normally, I have absolutely not a clue what is preventing the damage.
I tried to debug it, weapon ids that're supposed to damage player on explosion or when he's on fire are ID:54 and ID:37
Reply

Not sure who forked the latest version of weapon_config.inc

Code:
\pawno\include\weapon-config.inc(2217) : error 017: undefined symbol "FreezeSyncPacket"
\pawno\include\weapon-config.inc(2217) : warning 215: expression has no effect
\pawno\include\weapon-config.inc(2217) : error 001: expected token: ";", but found ")"
\pawno\include\weapon-config.inc(2217) : error 029: invalid expression, assumed zero
\pawno\include\weapon-config.inc(2217) : fatal error 107: too many error messages on one line
Reply

How to use SetCustomFallDamage?
It doesn't work for me

public OnGameModeInit()
{
SetVehiclePassengerDamage(true);
SetVehicleUnoccupiedDamage(true);
SetDisableSyncBugs(true);
SetCustomFallDamage(true);
}
Reply

Quote:
Originally Posted by Cypress
View Post
Not sure who forked the latest version of weapon_config.inc

Code:
\pawno\include\weapon-config.inc(2217) : error 017: undefined symbol "FreezeSyncPacket"
\pawno\include\weapon-config.inc(2217) : warning 215: expression has no effect
\pawno\include\weapon-config.inc(2217) : error 001: expected token: ";", but found ")"
\pawno\include\weapon-config.inc(2217) : error 029: invalid expression, assumed zero
\pawno\include\weapon-config.inc(2217) : fatal error 107: too many error messages on one line
Same issue! contributors fix this please..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)