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

Include don't works
I included it etc but players immune from bullets damm myluck
Reply

Just asking how can i change the damage value for a weapon? for example deagle does 46 damage how can you make it to 25?
Reply

how to compiler .inc file ?
Reply

When the player uses other styles of HUD (GTAV HUD), the health bar will be an obstacle. How to solve it?
Reply

Quote:
Originally Posted by DeLTi
Посмотреть сообщение
When the player uses other styles of HUD (GTAV HUD), the health bar will be an obstacle. How to solve it?
Don't use said custom HUD, or create an entirely new HUD in this include for said custom HUD. There's no other way because we can't determine what custom HUD's look like.
Reply

Quote:
Originally Posted by DeLTi
Посмотреть сообщение
When the player uses other styles of HUD (GTAV HUD), the health bar will be an obstacle. How to solve it?
You can update the code and remove the health bar textdraw.
Reply

Quote:
Originally Posted by AmirSavand
Посмотреть сообщение
You can update the code and remove the health bar textdraw.
No sir, removing the textdraw isn't going to resolve anything, it's going to cause confusion.
Reply

Quote:

weapon-config.inc(3119) : warning 219: local variable "err" shadows a variable at a preceding level
weapon-config.inc(3366) : warning 219: local variable "err" shadows a variable at a preceding level

Код:
#include <a_samp>
#include <a_mysql>
#include <callbacks>
#include <cuffs>
#include <zcmd>
#include <sscanf2>
#include <streamer>
#include <kickban>
#include <foreach>
#include <YSI\y_iterate>
#include <mSelection>
#include <mapfix>
#include <OPSP>
#include <AutoMove>
#include <WeaponData>
#include <SKY>
#include <weapon-config>
#include <progress2>
#include <ipcheck>
I don't understand why you're giving such a warning
Reply

Quote:
Originally Posted by BrainDamaged
Посмотреть сообщение
Код:
#include <a_samp>
#include <a_mysql>
#include <callbacks>
#include <cuffs>
#include <zcmd>
#include <sscanf2>
#include <streamer>
#include <kickban>
#include <foreach>
#include <YSI\y_iterate>
#include <mSelection>
#include <mapfix>
#include <OPSP>
#include <AutoMove>
#include <WeaponData>
#include <SKY>
#include <weapon-config>
#include <progress2>
#include <ipcheck>
I don't understand why you're giving such a warning
Because you already have "err" defined somewhere else in the code.
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Package Southclaws/progress2 depends on package Southclaws/samp-logger which declares an error function named `err`. If you run `sampctl package ensure --verbose` it will print out the dependency tree so you can see all leaf dependencies.
When using the plug-in, it encounters a number of problems;
1. If the player remains under the vehicle,
2. if it is breathless under water,
3. If the player starts to burn,
does not lose health
Reply

I've been encountering a dilemma. I've tried this method (weapon-config & the now deleted damage.inc from Gammix). Is there any way to remove the OnPlayerDamage & just use the normal Take/Give damage hooks? Otherwise, I'd have to find out a workable way to hook this new custom callback (seeing as it would be incompatible with hook OnPlayerDamage).

I also noticed that this include seems to mess with the processing of OnPlayerDeath. For some reason it skips all the hooks of OnPlayerDeath & immediately respawns the player; with no death code being processed.
Reply

How can I detect fake-kill with this??
Reply

Quote:
Originally Posted by PurmeX
View Post
why kill the player twice?
That shouldn't happen, can you show some of your code?
Reply

Help me fix the bug with the death of a player when the player doesn’t spawn while in animation.
Reply

Quote:
Originally Posted by PurmeX
View Post
Code:
[07:57:07] [debug] #0 002bafb0 in public WC_OnPlayerDamage (&playerid=@00d78e0c 1, &Float:amount=@00d78e10 0.28050, &issuerid=@00d78e14 65535, &weapon=@00d78e18 37, &bodypart=@00d78e1c 3) at C:\Users\x\Desktop\x\gm.pwn:29434
[07:57:07] [debug] #1 0002444c in public OnPlayerDamage (&playerid=@00d78e0c 1, &Float:amount=@00d78e10 0.28050, &issuerid=@00d78e14 65535, &weapon=@00d78e18 37, &bodypart=@00d78e1c 3) at E:\Program Files (x86)\pawno\include\weapon-config.inc:5448
[07:57:07] [debug] #2 0001c140 in InflictDamage (playerid=1, Float:amount=0.28050, issuerid=65535, weaponid=37, bodypart=3, bool:ignore_armour=false) at E:\Program Files (x86)\pawn\include\weapon-config.inc:4608
[07:57:07] [debug] #3 000132b0 in public OnPlayerTakeDamage (playerid=1, issuerid=65535, Float:amount=0.28050, weaponid=37, bodypart=3) at E:\Program Files (x86)\pawn\include\weapon-config.inc:3395
Code:
line 29434 if(pData[playerid][player_gang] != pData[issuerid][player_gang] && pData[playerid][player_gang] != 0 && pData[issuerid][player_gang] != 0)
Issuerid is greater than MAX_PLAYERS

Always check if issuerid is INVALID_PLAYER_ID or 65535 when using onplayerdamage or onplayerdeath as the user can get damage from things other than other users.
Reply

Looks nice
Reply

When play fall from high his not die.
why is that?
Reply

How do I change Spas12 Damage?
Reply

Quote:
Originally Posted by WildWave
View Post
When play fall from high his not die.
why is that?
Did you use SetCustomFallDamage? If so that might cause the issue.
This issue you're having doesn't happen for me, could you show a bit of relevant code?


Quote:
Originally Posted by kukboy
View Post
How do I change Spas12 Damage?
The internal ID for the Spas12 is WEAPON_SHOTGSPA, and you can change the value using SetWeaponDamage(weaponid, damage_type, Float:amount, Float:...);


The documentation is on the github page. https://github.com/oscar-broman/samp-weapon-config
Reply

SetWeaponDamage(weaponid, damage_type, Float:amount, Float:...);

Can i use this in the gamemode under OnPlayerDamage?
Reply


Forum Jump:


Users browsing this thread: 23 Guest(s)