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

0.3.DL support please?
Reply

Quote:
Originally Posted by Exhibit
Посмотреть сообщение
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.
Reply

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
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
Reply

Quote:
Originally Posted by Exhibit
Посмотреть сообщение
This requires Sky plugin that isn't compatible with DL
It it?
http://forum.sa-mp.com/showpost.php?...&postcount=137
Reply

For some reason, i have problem with killing player(setting player health to 0)
There is log:
Код:
 #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
Код:
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
Код:
InflictDamage(playerid, 0.0);
In my gamemode:
10397
Код:
SetPlayerHealth(playerid, hp);
I don't see any mistake here, can you help?
Reply

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.
Код:
issuerid=65535
It can also be the size of s_DamageArmour, as you can see by the trace, you're receiving weaponid=55
Reply

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

Код:
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;
	}
Reply

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?
Reply

I only use SetPlayerHealth(playerid, 0); in the gamemode and i get that error.

And yes, in this FS, that weaponid is defined - #define WEAPON_UNKNOWN 55
Reply

Quote:
Originally Posted by MustangV10
Посмотреть сообщение
What would be the best way to create spawn protection for a player with this include? My previous SetPlayerHealth approach is void with this include enabled.
Just have a variable or a timer and on OnPlayerDamage do something like this.

Код:
if(SpawnProtection[playerid] >= 1) return 0;
Reply

How do I modify health bar color with this include?
Reply

(6060) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicle")
(6079) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicleEx")
(6097) : warning 201: redefinition of constant/macro (symbol "CreateVehicle")
(6207) : warning 201: redefinition of constant/macro (symbol "DestroyVehicle")
(6457) : error 025: function heading differs from prototype
(645 : error 021: symbol already defined: "IsPlayerSpawned"
(27123) : error 021: symbol already defined: "OnPlayerTakeDamage"
(30072) : error 021: symbol already defined: "OnPlayerGiveDamage"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Help
Reply

Quote:
Originally Posted by PurmeX
View Post
(6060) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicle")
(6079) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicleEx")
(6097) : warning 201: redefinition of constant/macro (symbol "CreateVehicle")
(6207) : warning 201: redefinition of constant/macro (symbol "DestroyVehicle")
(6457) : error 025: function heading differs from prototype
(645 : error 021: symbol already defined: "IsPlayerSpawned"
(27123) : error 021: symbol already defined: "OnPlayerTakeDamage"
(30072) : error 021: symbol already defined: "OnPlayerGiveDamage"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Help
What is your include priority?
Reply

Quote:
Originally Posted by PurmeX
Посмотреть сообщение
#include <a_samp>
#include <mysql>
#include <Pawn.CMD>
#include <sscanf2>
#include <streamer>
#include <foreach>
#include <regex>
#include <a_http>
#include <progress>
#include <mSelection>
#include <ColAndreas>
#include <whirlpool>


I have only this
Where is weapon-config on that list?
Reply

Quote:
Originally Posted by f0Re3t
Посмотреть сообщение
since many users want a return, then I will return it!
at the moment, a fork is created, but the new version will be filled in later
the update will be available here - https://github.com/f0Re3t/samp-weapon-config
Will you be updating your fork?
Reply

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
Will you be updating your fork?
at the moment I'm working on my own damage system, to fix an uncountable number of bugs of this includ is very expensive
Reply

Quote:
Originally Posted by PurmeX
Посмотреть сообщение
#include <a_samp>
#include <mysql>
#include <Pawn.CMD>
#include <sscanf2>
#include <streamer>
#include <foreach>
#include <regex>
#include <a_http>
#include <progress>
#include <mSelection>
#include <ColAndreas>
#include <whirlpool>
#include <weapon-config.inc>


I have only this
I forgot to write sorry, but in GM there is #include <weapon-config.inc>
Reply

Hello, friends.
as promised - I tried to create your own system of damage, but at the moment I need help in testing and profiling the system, if you want to help, you can visit my test server-185.224.134.57: 7777 (is collecting statistics on the system load on resources)
Reply

Yea listen to y_less, he knows what he is talking about.
Reply

How we can change the damage of Chainsaw ? Chainsaw killing people even chainsaw doesn't touch them some player move around enemy and enemy dies.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)