SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] weapon-config.inc - Damage system with many features (https://forum.sa-mp.com/showthread.php?t=563387)

cipi89 08/05/2020 10:22 AM

Re: 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

Cypress 14/05/2020 10:14 PM

Re: weapon-config.inc - Damage system with many features
 
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


muningcat05 18/06/2020 01:09 PM

Re: weapon-config.inc - Damage system with many features
 
How to use SetCustomFallDamage?
It doesn't work for me :(

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

Penguin1997 14/08/2020 07:43 AM

Re: weapon-config.inc - Damage system with many features
 
Quote:

Originally Posted by Cypress (Post 4145975)
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..

keJo 19/08/2020 12:36 AM

Re: weapon-config.inc - Damage system with many features
 
how to use this any can tell me please?

rt-2 19/08/2020 02:41 PM

Re: weapon-config.inc - Damage system with many features
 
Quote:

Originally Posted by keJo (Post 4159241)
how to use this any can tell me please?

There is literally a huge 'How to Use' section in the main GitHub page.

MustangV10 21/08/2020 06:40 PM

Re: weapon-config.inc - Damage system with many features
 
Quote:

Originally Posted by Cypress (Post 4145975)
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


Quote:

Originally Posted by Penguin1997 (Post 4158713)
Same issue! contributors fix this please..

Please update your version of SKY
https://github.com/oscar-broman/SKY/releases/tag/2.3.0

and make sure to download a new version of the include:
https://github.com/oscar-broman/SKY/blob/master/SKY.inc

xbp13x 22/08/2020 11:48 AM

Re: weapon-config.inc - Damage system with many features
 
Any one have an issue of where the death messages do not send for drown/suicide/fall ?

Greaper 22/08/2020 06:19 PM

Re: weapon-config.inc - Damage system with many features
 
Code:

C:\Users\Ayang\Desktop\SA SERVER\pawno\include\weapon-config.inc(1589) : error 035: argument type mismatch (argument 2)
C:\Users\Ayang\Desktop\SA SERVER\gamemodes\VRPwTune.pwn(1603) : error 021: symbol already defined: "IsPlayerSpawned"


cipi89 08/09/2020 03:46 PM

Re: weapon-config.inc - Damage system with many features
 
Same issue as guy above


All times are GMT. The time now is 06:08 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.