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

Quote:
Originally Posted by KubiPL
Посмотреть сообщение
There is a bug. When you're death and you press enter vehicle key near vehicle, your death is aborted.Animations get cleared and you can move while in dying state.
Perhaps locking all the vehicles for the player before OnPlayerDeath would solve this. Could you make an issue of this on GitHub please? And I will look into it.
Reply
#62

Have a check here, issue #33.
Reply
#63

Should the health bar look like this?



I'm using the: SKY (0.1-RC1), weapon-config.inc (latest version) and the 0.3z R4 server.

Sorry if it's been reported already but after reading through the thread, the way to fix the textdraw issues was by updating to the new versions.

Update (must have mismatched the incorrect plugin/inc versions): the front textdraw is just a little too small for me.
Reply
#64

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Should the health bar look like this?
The only ways this could possibly look like this is a faulty plugin (have you modified and re-compiled), or you messed with the textdraws. You have the background red fine, but not the foreground; yet they are the exact same size in the script. So question 1, have you modified anything? Question 2, have you tried re-downloading everything?
Reply
#65

Quote:
Originally Posted by Crayder
Посмотреть сообщение
The only ways this could possibly look like this is a faulty plugin (have you modified and re-compiled), or you messed with the textdraws. You have the background red fine, but not the foreground; yet they are the exact same size in the script. So question 1, have you modified anything? Question 2, have you tried re-downloading everything?
I haven't modified anything, I've re-downloaded everything a couple times each because I was sure I had the in-correct versions of one of them but it never fixed itself for some reason.

I'm using:
SKY 0.1-RC1 from github.
weapon-config include from github.
Reply
#66

Well this is Awesome the HH Era ends here (correct me if im wrong),
Btw does the Sky Plugin supports 0.3z R4? I want to install this to my Server
Reply
#67

Quote:
Originally Posted by ToiletDuck
Посмотреть сообщение
Well this is Awesome the HH Era ends here (correct me if im wrong),
Btw does the Sky Plugin supports 0.3z R4? I want to install this to my Server
Yes SKY only as of now supports 0.3z (except for the special 0.3.7 version which is not exactly official).
Reply
#68

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Yes SKY only as of now supports 0.3z (except for the special 0.3.7 version which is not exactly official).
Isee Thanks btw the Sky 0.1 that version is compatible to 0.3z? , So Far Is it safe to install this to a Server?
Reply
#69

SKY.dll - http://www.solidfiles.com/d/6e382673c4/
SKY.so - http://www.solidfiles.com/d/39872895b0/
Reply
#70

Quote:
Originally Posted by theYiin
View Post
are you sure they're for 0.3.7 ?
it's 0.3z
I need version of 0.3.7 because now it doesn't detect fall damages or any damage that player do with him/herself

like using RPG Heat and shoot near your self and nothing happens
Reply
#71

Quote:
Originally Posted by amirab
View Post
are you sure they're for 0.3.7 ?
it's 0.3z
I need version of 0.3.7 because now it doesn't detect fall damages or any damage that player do with him/herself

like using RPG Heat and shoot near your self and nothing happens
0.3.7 (latest version from github atm)

.so - http://www.solidfiles.com/d/13b30b9cef/
.dll - http://www.solidfiles.com/d/cea2457f7a/

EDIT:
windows version crash on load, if YSF plugin is loaded too. It doesnt matter in what order I put both plugins.
Code:
[14:20:59]  Loading plugin: SKY
[14:20:59] [debug] Server crashed due to an unknown error
[14:21:00] [debug] Native backtrace:
[14:21:00] [debug] #0 656a150c in subhook_new () from plugins\SKY.DLL
[14:21:00] [debug] #1 656a1f68 in InstallPreHooks () from plugins\SKY.DLL
[14:21:00] [debug] #2 656a24e9 in Load () from plugins\SKY.DLL
[14:21:00] [debug] #3 0046a4db in ?? () from samp-server.exe
Without YSF, plugin loads perfectly.

EDIT2:
compiled with debug mode:
Code:
[16:25:59]  Loading plugin: SKY
[16:25:59] [debug] Server crashed due to an unknown error
[16:26:01] [debug] Native backtrace:
[16:26:01] [debug] #0 54ce2dfc in UnwindUpVec () from plugins\SKY.DLL
[16:26:01] [debug] #1 54ccd1b0 in subhook_new () from plugins\SKY.DLL
[16:26:01] [debug] #2 54ccfba2 in InstallPreHooks () from plugins\SKY.DLL
[16:26:01] [debug] #3 54cd1cdf in Load () from plugins\SKY.DLL
[16:26:01] [debug] #4 0046a4db in ?? () from samp-server.exe
Reply
#72

Quote:
Originally Posted by theYiin
View Post
0.3.7 (latest version from github atm)

.so - http://www.solidfiles.com/d/13b30b9cef/
.dll - http://www.solidfiles.com/d/cea2457f7a/
I used that , my server will be closed when player connects
I used crashdetect and it says server crashed due to unknown error
Anybody knows why? Maybe something that effect on connecting

Edit : and i'm not using YSF
Reply
#73

Quote:
Originally Posted by amirab
View Post
I used that , my server will be closed when player connects
I used crashdetect and it says server crashed due to unknown error
Anybody knows why? Maybe something that effect on connecting

Edit : and i'm not using YSF
I've got exactly the same problem. It's just keep crashing no matter what I do.


Would really appreciate if anyone has solved this issue.
Reply
#74

Getting those errors each time I try to compile.
Code:
pawno\include\weapon-config.inc(2504) : error 025: function heading differs from prototype
pawno\include\weapon-config.inc(2748) : error 025: function heading differs from prototype
Also, Is there is anyway to customize weapons damage (mainlly use OnPlayerTakeDamage with this include)
Reply
#75

Very nice,congratulations on the release.
Reply
#76

Quote:
Originally Posted by XxBaDxBoYxX
View Post
Getting those errors each time I try to compile.
Code:
pawno\include\weapon-config.inc(2504) : error 025: function heading differs from prototype
pawno\include\weapon-config.inc(2748) : error 025: function heading differs from prototype
Also, Is there is anyway to customize weapons damage (mainlly use OnPlayerTakeDamage with this include)
1. The errors are most likely from your include ordering, try including this before everything except a_samp.
2. DON'T USE OnPlayerTakeDamage with this include, from now on use OnPlayerDamage.
3. The damages are completely universal, I'll edit this later to explain.
Reply
#77

Awesome ty
Reply
#78

Quote:
Originally Posted by Crayder
View Post
1. The errors are most likely from your include ordering, try including this before everything except a_samp.
2. DON'T USE OnPlayerTakeDamage with this include, from now on use OnPlayerDamage.
3. The damages are completely universal, I'll edit this later to explain.
Code:
pawno\include\YSI\y_hooks/impl.inc(2337) : error 021: symbol already defined: "OnPlayerTakeDamage"
pawno\include\YSI\y_hooks/impl.inc(2383) : error 021: symbol already defined: "OnPlayerGiveDamage"
It causes conflicts with Y_INI :/

my includes
Code:
#include <a_samp>
#include <weapon-config>
#include <SKY>
#include <YSI\y_ini>
#include <zcmd>
#include <sscanf2>
#include <foreach>
#include <streamer>
Should I remove the y_hooks ?
Reply
#79

Quote:
Originally Posted by Crayder
Посмотреть сообщение
You've got this all wrong...
1. Never call DamagePlayer in OnPlayerDamage.
2. OnPlayerDeath IS called. You may have thought it wasn't because with this include the players never actually die, but this include adds a fake OnPlayerDeath.
3. Damage is automatically done in OnPlayerDamage after you process it. For example, this is how you disable helipark and car parking damage:
Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
	if (weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES) // Disable helikill and carpark
		return 0;
	return 1;
}
This is how you increase headshot damage:
Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
	if (IsBulletWeapon(weapon) && bodypart == 9) // Increase headshot damage
		amount *= 1.25;
	return 1;
}
If you return 0, the damage is disregarded. If you return 1, the damage is applied and the following function is called:
Код:
public OnPlayerDamageDone(playerid, Float:amount, issuerid, weapon, bodypart)
{
	return 1;
}
4. Before OnPlayerDeath is called, the following callback is called:
Код:
public OnPlayerPrepareDeath(playerid, animlib[32], animname[32], &anim_lock, &respawn_time)
{
	return 1;
}
After the death is done, animation has played, and the player is being sent to their spawn, the following callback is called:
Код:
public OnPlayerDeathFinished(playerid, bool:cancelable)
{
	return 1;
}
You can also prevent the players spawn from OnPlayerDeathFinished by returning 0. For example:
Код:
public OnPlayerDeathFinished(playerid, bool:cancelable)
{
	if(cancelable) return 0;
	return 1;
}
Ah thanks, so I did get it all wrong.
I'll go and change the code.
Reply
#80

Quote:
Originally Posted by Crayder
Посмотреть сообщение
You've got this all wrong...
1. Never call DamagePlayer in OnPlayerDamage.
2. OnPlayerDeath IS called. You may have thought it wasn't because with this include the players never actually die, but this include adds a fake OnPlayerDeath.
3. Damage is automatically done in OnPlayerDamage after you process it. For example, this is how you disable helipark and car parking damage:
Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
	if (weapon == WEAPON_CARPARK || weapon == WEAPON_HELIBLADES) // Disable helikill and carpark
		return 0;
	return 1;
}
This is how you increase headshot damage:
Код:
public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
{
	if (IsBulletWeapon(weapon) && bodypart == 9) // Increase headshot damage
		amount *= 1.25;
	return 1;
}
If you return 0, the damage is disregarded. If you return 1, the damage is applied and the following function is called:
Код:
public OnPlayerDamageDone(playerid, Float:amount, issuerid, weapon, bodypart)
{
	return 1;
}
4. Before OnPlayerDeath is called, the following callback is called:
Код:
public OnPlayerPrepareDeath(playerid, animlib[32], animname[32], &anim_lock, &respawn_time)
{
	return 1;
}
After the death is done, animation has played, and the player is being sent to their spawn, the following callback is called:
Код:
public OnPlayerDeathFinished(playerid, bool:cancelable)
{
	return 1;
}
You can also prevent the players spawn from OnPlayerDeathFinished by returning 0. For example:
Код:
public OnPlayerDeathFinished(playerid, bool:cancelable)
{
	if(cancelable) return 0;
	return 1;
}
I do have a few smaller questions.

What is SetDisableSyncBugs doing?

And it seems when respawning according to the include, it somehow can't check if the player is actually using that skin in OnPlayerSpawn, like this.
Код:
		
if(GetPlayerSkin(playerid) == 151)
{
	SendInfoMessage(playerid, -1, "You are using skin ID 151");
}
Little note: SendInfoMessage is defined in our script correctly, it is used to send messages in a specific format.

Edit: We are also using SpawnPlayer(player); at a couple commands to respawn players, they don't detect skins used either.
Edit2: I have attempted to put the code in public OnPlayerDeathFinished(playerid, bool:cancelable) and it didn't work either.
Edit3: I am looking to figure out how SetCustomFallDamage works, every time I set something the little falls don't do any damage.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)