SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 10/02/2019, 07:44 PM   #821
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 575
Reputation: 69
Default Re: weapon-config.inc - Damage system with many features

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.
__________________
Chaprnks is offline   Reply With Quote
Old 03/04/2019, 10:42 PM   #822
Tanz
Little Clucker
 
Join Date: Mar 2015
Posts: 16
Reputation: 16
Default Re: weapon-config.inc - Damage system with many features

How can I detect fake-kill with this??
Tanz is offline   Reply With Quote
Old 07/05/2019, 06:32 PM   #823
Jeroen52
Gangsta
 
Jeroen52's Avatar
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 880
Reputation: 74
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by PurmeX View Post
why kill the player twice?
That shouldn't happen, can you show some of your code?
__________________
Jeroen52 is offline   Reply With Quote
Old 10/05/2019, 09:38 PM   #824
PavelKZ
Little Clucker
 
Join Date: Sep 2015
Posts: 5
Reputation: 0
Default Re: weapon-config.inc - Damage system with many features

Help me fix the bug with the death of a player when the player doesn’t spawn while in animation.
PavelKZ is offline   Reply With Quote
Old 10/05/2019, 11:52 PM   #825
nickdodd25
Huge Clucker
 
nickdodd25's Avatar
 
Join Date: Jan 2012
Location: Unknown
Posts: 450
Reputation: 114
Default Re: weapon-config.inc - Damage system with many features

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.
__________________
Nick
nickdodd25 is offline   Reply With Quote
Old 11/06/2019, 11:36 AM   #826
PemburuHantu
Big Clucker
 
PemburuHantu's Avatar
 
Join Date: May 2019
Location: Indonesia ( Gorontalo )
Posts: 70
Reputation: 0
Default Re: weapon-config.inc - Damage system with many features

Looks nice
PemburuHantu is offline   Reply With Quote
Old 25/07/2019, 09:47 AM   #827
WildWave
Big Clucker
 
WildWave's Avatar
 
Join Date: May 2014
Posts: 83
Reputation: 13
Default Re: weapon-config.inc - Damage system with many features

When play fall from high his not die.
why is that?
__________________
My Scripts : (2)

Basic Admin System
SavedSkin System
WildWave is offline   Reply With Quote
Old 25/07/2019, 09:50 AM   #828
kukboy
Big Clucker
 
kukboy's Avatar
 
Join Date: Nov 2018
Posts: 63
Reputation: 6
Default Re: weapon-config.inc - Damage system with many features

How do I change Spas12 Damage?
__________________
Paradise City Roleplay

IP: samp.paradisecityroleplay:7777
Discord: https://discord.gg/fC8srfw[/



-----------------------------------
kukboy is offline   Reply With Quote
Old 25/07/2019, 03:37 PM   #829
Jeroen52
Gangsta
 
Jeroen52's Avatar
 
Join Date: Oct 2008
Location: The Netherlands
Posts: 880
Reputation: 74
Default Re: weapon-config.inc - Damage system with many features

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
__________________
Jeroen52 is offline   Reply With Quote
Old 25/07/2019, 04:17 PM   #830
kukboy
Big Clucker
 
kukboy's Avatar
 
Join Date: Nov 2018
Posts: 63
Reputation: 6
Default Re: weapon-config.inc - Damage system with many features

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

Can i use this in the gamemode under OnPlayerDamage?
__________________
Paradise City Roleplay

IP: samp.paradisecityroleplay:7777
Discord: https://discord.gg/fC8srfw[/



-----------------------------------
kukboy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with weapon damage system thanks JessThompson Scripting Help 7 15/07/2014 02:01 PM
[FilterScript] New Weapon Damage System [0.3z] RenSoprano Filterscripts 6 17/01/2014 07:03 AM
[FilterScript] Weapon damage system [v1.0] Darnell Filterscripts 74 21/10/2013 09:53 PM
[FilterScript] Weapon Damage System Donicans Filterscripts 14 06/11/2012 02:22 PM
[FilterScript] Realistic Weapon Damage And Death System [V1.0][New Cool FS] Nirzor Filterscripts 6 08/08/2012 06:34 AM


All times are GMT. The time now is 04:40 AM.


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