SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 03/05/2018, 06:16 PM   #791
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,150
Reputation: 511
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by Kaperstone View Post
Why did you switch on the conditionals to floatcmp?
Ain't it does the same and actually faster without it?
O_O

Cause of pawn's weird tag system!
Kar is offline   Reply With Quote
Old 04/05/2018, 02:54 AM   #792
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,338
Reputation: 824
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by f0Re3t View Post
because using floatcmp directly we do not waste time generating the same construction using operators
you can make sure by looking at float.inc
For the first time I've looked into that file, mind explodes.
Kaperstone is offline   Reply With Quote
Old 06/05/2018, 12:44 PM   #793
Exhibit
Big Clucker
 
Join Date: Dec 2015
Location: Basement.
Posts: 168
Reputation: 19
Default Re: weapon-config.inc - Damage system with many features

0.3.DL support please?
Exhibit is offline   Reply With Quote
Old 06/05/2018, 12:58 PM   #794
JesterlJoker
Huge Clucker
 
Join Date: Apr 2015
Location: Cagayan de Oro, Philippines
Posts: 260
Reputation: 27
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by Exhibit View Post
0.3.DL support please?
What type of support do you need though? This is a weapon system, as far as I know 0.3.DL have not made quite a touch on the weapon system of SA-MP.
__________________
My Projects:

JesterlJoker is offline   Reply With Quote
Old 07/05/2018, 05:23 PM   #795
Exhibit
Big Clucker
 
Join Date: Dec 2015
Location: Basement.
Posts: 168
Reputation: 19
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by JesterlJoker View Post
What type of support do you need though? This is a weapon system, as far as I know 0.3.DL have not made quite a touch on the weapon system of SA-MP.
This requires Sky plugin that isn't compatible with DL
Exhibit is offline   Reply With Quote
Old 08/05/2018, 05:46 PM   #796
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,338
Reputation: 824
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by Exhibit View Post
This requires Sky plugin that isn't compatible with DL
It it?
http://forum.sa-mp.com/showpost.php?...&postcount=137
Kaperstone is offline   Reply With Quote
Old 12/05/2018, 10:02 AM   #797
DusanInfinity
Big Clucker
 
Join Date: Jun 2015
Location: Serbia
Posts: 119
Reputation: 0
Default Re: weapon-config.inc - Damage system with many features

For some reason, i have problem with killing player(setting player health to 0)
There is log:
Code:
 #0 00048ee0 in InflictDamage (playerid=5, Float:amount=0.00000, issuerid=65535, weaponid=55, bodypart=0, bool:ignore_armour=false) at pawno\include\weapon-config.inc:4668
[debug] #1 0002d92c in WC_SetPlayerHealth (playerid=5, Float:health=0.00000, Float:armour=-1.00000) at pawno\include\weapon-config.inc:1397
[debug] #2 0009d6f0 in SetPlayerHealth_test (playerid=5, Float:hp=0.00000) at \gamemodes\.pwn:10397
[debug] #3 0075a7f0 in public @_yCsethp (playerid=5, params[]=@01ec4efc "infi 0", help=0) at gamemodes\.pwn:80647
[debug] #4 0075a48c in public @yC_sethp (a=5, b[]=@01ec4efc "infi 0", c=0, i=0) at gamemodes\.pwn:80638
[debug] #5 native CallRemoteFunction () from samp-server.exe
[debug] #6 0002a540 in Command_Process (playerid=5, cmdtext[]=@01ec4ec4 "/sethp", help=0) at pawno\include\YSI\y_commands.inc:2499
[debug] #7 00029c20 in ?? (... <2 arguments>) at pawno\include\YSI\y_commands.inc:2297
[debug] #8 0001118c in public OnPlayerCommandText (playerid=5, cmdtext[]=@01ec4ec4 "/sethp") at pawno\include\YSI\y_hooks/impl.inc:929

That lines:
4668
Code:
if (!ignore_armour && weaponid != WEAPON_COLLISION && weaponid != WEAPON_DROWN && weaponid != WEAPON_CARPARK && (!s_DamageArmourToggle[0] || (s_DamageArmour[weaponid][0] && (!s_DamageArmourToggle[1] || ((s_DamageArmour[weaponid][1] && bodypart == 3) || (!s_DamageArmour[weaponid][1]))))))
1397
Code:
InflictDamage(playerid, 0.0);
In my gamemode:
10397
Code:
SetPlayerHealth(playerid, hp);
I don't see any mistake here, can you help?
__________________
DusanInfinity is offline   Reply With Quote
Old 12/05/2018, 10:16 AM   #798
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,338
Reputation: 824
Default Re: weapon-config.inc - Damage system with many features

inside the conditional on line 4668 there is the error.

be sure that if you use issuerid, then you check if its equal to INVALID_PLAYER_ID before using it in an array or function.
Code:
issuerid=65535

It can also be the size of s_DamageArmour, as you can see by the trace, you're receiving weaponid=55
Kaperstone is offline   Reply With Quote
Old 12/05/2018, 10:22 AM   #799
DusanInfinity
Big Clucker
 
Join Date: Jun 2015
Location: Serbia
Posts: 119
Reputation: 0
Default Re: weapon-config.inc - Damage system with many features

Hmm, on that line there isn't issuerid, or i miss something?

Code:
if(!ignore_armour && weaponid != WEAPON_COLLISION && weaponid != WEAPON_DROWN && weaponid != WEAPON_CARPARK && (!s_DamageArmourToggle[0] || (s_DamageArmour[weaponid][0] && (!s_DamageArmourToggle[1] || ((s_DamageArmour[weaponid][1] && bodypart == 3) || (!s_DamageArmour[weaponid][1])))))) 
	{
		if (amount <= 0.0) 
		{
			amount = s_PlayerHealth[playerid] + s_PlayerArmour[playerid];
		}

		s_PlayerArmour[playerid] -= amount;
	} 
	else 
	{
		if (amount <= 0.0) 
		{
			amount = s_PlayerHealth[playerid];
		}

		s_PlayerHealth[playerid] -= amount;
	}
__________________
DusanInfinity is offline   Reply With Quote
Old 12/05/2018, 10:31 AM   #800
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,338
Reputation: 824
Default Re: weapon-config.inc - Damage system with many features

s_DamageArmour is the error
https://github.com/f0Re3t/samp-weapo...onfig.inc#L644
There is no weaponid=55
Quote:
InflictDamage (playerid=5, Float:amount=0.00000, issuerid=65535, weaponid=55,
What weapon did you use?
Kaperstone 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 09:05 PM.


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