SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 16/02/2015, 01:06 AM   #21
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,862
Reputation: 591
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by Slice View Post
0.3.7 is not supported by SKY yet. I'll deal with it as fast as I can.

Could you attach gdb to the process and print a backtrace of the crash?
It only crashes when I'm in game, and I can't connect to the server (or even query it) while gdb is attached. Lol, alternative?


EDIT: ALso, I can't run the server from the gdb console. It says server.cfg could not be run (and I get the intro stuff).
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 16/02/2015, 01:11 AM   #22
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,899
Reputation: 1590
Default Re: weapon-config.inc - Damage system with many features

You need to type continue (or c) when you attach gdb. Look on GitHub in a few minutes, there will be an update which will fix the crashes.
Slice is offline   Reply With Quote
Old 16/02/2015, 01:32 AM   #23
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,862
Reputation: 591
Default Re: weapon-config.inc - Damage system with many features

__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 16/02/2015, 01:34 AM   #24
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,899
Reputation: 1590
Default Re: weapon-config.inc - Damage system with many features

Try with this one: https://github.com/oscar-broman/SKY/...-BETA-0.3.7RC1
Slice is offline   Reply With Quote
Old 16/02/2015, 01:40 AM   #25
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,862
Reputation: 591
Default Re: weapon-config.inc - Damage system with many features

It seems to be working... Now about that health bar... :P
Should it be this large?

1024x768

Also, would you consider adding custom colors? (Possibly the fading color array I provided above :3)





EDIT: You could also consider adding damage to unoccupied vehicles (I made a pull request to do so), and damage when falling into water (this would be awesome).
EDIT2:For pawns function list: (retrieved using regex on include)
Code:
/*
native public OnPlayerPrepareDeath(playerid, animlib[32], animname[32], &anim_lock, &respawn_time)
native public OnRejectedHit(playerid, hit[E_REJECTED_HIT])
native public OnPlayerDeathFinished(playerid)
native public OnInvalidWeaponDamage(playerid, damagedid, Float:amount, weaponid, bodypart, error, bool:given)
native public OnPlayerDamageDone(playerid, Float:amount, issuerid, weapon, bodypart)
native public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
native stock IsBulletWeapon(weaponid)
native stock IsHighRateWeapon(weaponid)
native stock IsMeleeWeapon(weaponid)
native stock IsPlayerSpawned(playerid)
native stock AverageShootRate(playerid, shots, &multiple_weapons = 0)
native stock AverageHitRate(playerid, hits, &multiple_weapons = 0)
native stock SetRespawnTime(ms)
native stock GetRespawnTime()
native stock ReturnWeaponName(weaponid)
native stock SetWeaponDamage(weaponid, damage_type, Float:amount, Float:...)
native stock SetDamageSounds(taken, given)
native stock SetCustomFallDamage(bool:toggle, Float:damage_multiplier = 25.0, Float:death_velocity = -0.6)
native stock SetCustomVendingMachines(bool:toggle)
native stock SetVehiclePassengerDamage(bool:toggle)
native stock SetDamageFeed(bool:toggle)
native stock SetWeaponShootRate(weaponid, max_rate)
native stock IsPlayerDying(playerid)
native stock SetWeaponMaxRange(weaponid, Float:range)
native stock DamagePlayer(playerid, Float:amount, issuerid = INVALID_PLAYER_ID, weaponid = WEAPON_UNKNOWN, bodypart = BODY_PART_UNKNOWN)
native stock GetRejectedHit(playerid, idx, output[], maxlength = sizeof(output))
native static UpdatePlayerVirtualWorld(playerid)
native static HasSameTeam(playerid, otherid)
native static IsPlayerPaused(playerid)
native static UpdateHealthBar(playerid, bool:force = false)
native static SetHealthBarVisible(playerid, bool:toggle)
native static PosInFront(playerid, Float:distance, &Float:x, &Float:y, &Float:z)
native static UpdateSyncData(playerid)
native static RemoveDefaultVendingMachines(playerid)
native static CreateVendingMachines()
native static DestroyVendingMachines()
native static ProcessDamage(&playerid, &issuerid, &Float:amount, &weaponid, &bodypart, &Float:bullets)
native static InflictDamage(playerid, Float:amount, issuerid = INVALID_PLAYER_ID, weaponid = WEAPON_UNKNOWN, bodypart = BODY_PART_UNKNOWN)
native static PlayerDeath(playerid, animlib[32], animname[32], anim_lock = 1, respawn_time = -1, bool:freeze_sync = true)
native static DamageFeedUpdate(playerid, bool:modified = false)
native static DamageFeedUpdateText(playerid)
native static DamageFeedAddHitGiven(playerid, issuerid, Float:amount, weapon)
native static DamageFeedAddHitTaken(playerid, issuerid, Float:amount, weapon)
native static DamageFeedAddHit(arr[WC_FEED_HEIGHT][E_DAMAGE_FEED_HIT], playerid, issuerid, Float:amount, weapon)
native static DamageFeedRemoveHit(arr[WC_FEED_HEIGHT][E_DAMAGE_FEED_HIT], idx)
native static ResyncPlayer(playerid)
native static Float:AngleBetweenPoints(Float:x1, Float:y1, Float:x2, Float:y2)
native static MakePlayerFacePlayer(playerid, targetid, opposite = false, forcesync = true)
native static IsPlayerBehindPlayer(playerid, targetid, Float:diff = 90.0)
native static AddRejectedHit(playerid, damagedid, reason, weapon, i1 = 0, i2 = 0, i3 = 0)
*/
Ps. I like how I can still move my head when I'm dead... :P (I usually keep /headmove on though, so it doesn't bother me)
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!

Last edited by Crayder; 16/02/2015 at 05:23 AM.
Crayder is offline   Reply With Quote
Old 16/02/2015, 02:46 AM   #26
Excel™
Gangsta
 
Excel™'s Avatar
 
Join Date: Jul 2012
Posts: 560
Reputation: 95
Default Re: weapon-config.inc - Damage system with many features

Could you explain syncing part for knives?
__________________
NO MORE CODING SAMP :V
JUST PLAYING...
Excel™ is offline   Reply With Quote
Old 16/02/2015, 05:31 AM   #27
thaKing
Huge Clucker
 
thaKing's Avatar
 
Join Date: Feb 2014
Location: Mushroom fields
Posts: 298
Reputation: 37
Default Re: weapon-config.inc - Damage system with many features

Really useful, especially for role play servers. Thanks.
(I'll still check the code later.)
thaKing is offline   Reply With Quote
Old 16/02/2015, 05:34 AM   #28
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,862
Reputation: 591
Default Re: weapon-config.inc - Damage system with many features

Also (considering my last comment and the vehicle branch of this library) I suggest you should add separate damage for the armoured vehicles. Like instead of shotguns taking 120 they would take 60 health from a rhino and hunter. I made a pull request too, adding unoccupied vehicle damage which works the exact same way as passenger damages, but without the passenger part.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 16/02/2015, 06:19 AM   #29
JeaSon
Gangsta
 
JeaSon's Avatar
 
Join Date: Aug 2013
Location: Future
Posts: 564
Reputation: 79
Default Re: weapon-config.inc - Damage system with many features

its really great
__________________
Server:23.94.215.9:7777
Social Media:
Other:
My Works
JeaSon is offline   Reply With Quote
Old 16/02/2015, 07:39 AM   #30
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,899
Reputation: 1590
Default Re: weapon-config.inc - Damage system with many features

Quote:
Originally Posted by Excel™ View Post
Could you explain syncing part for knives?
lagcomp
The syncing of the aim key is disabled, which means you will never see anyone hold their knife up and stealth knife you.
The reason I did this is if you get knifed and OnPlayerTakeDamage is called, your game will be bugged until you respawn.
Instead, when you knife someone with OnPlayerGiveDamage, an animation is applied (foresync) and a death message is sent.
This removes all issues related to knives causing players to get desynced.

non-lagcomp
When someone does a stealth knife with OnPlayerGiveDamage, a timer is set that checks if the player you knifed will get knifed "on his screen". If not, that player will be respawned for you to get out of the death state.

Quote:
Originally Posted by Crayder View Post
Also (considering my last comment and the vehicle branch of this library) I suggest you should add separate damage for the armoured vehicles. Like instead of shotguns taking 120 they would take 60 health from a rhino and hunter. I made a pull request too, adding unoccupied vehicle damage which works the exact same way as passenger damages, but without the passenger part.
I'm looking into a nice way to make vehicle damage server-side. The damage should be processed and friendly fire should be toggleable. There are some quirks I need to work around, such as recognizing collision damage.
One little idea I have is make the health sync just like with other stuff and attach custom smoke particles to the vehicles.
Slice 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 01:01 PM
[FilterScript] New Weapon Damage System [0.3z] RenSoprano Filterscripts 6 17/01/2014 06:03 AM
[FilterScript] Weapon damage system [v1.0] Darnell Filterscripts 74 21/10/2013 08:53 PM
[FilterScript] Weapon Damage System Donicans Filterscripts 14 06/11/2012 01:22 PM
[FilterScript] Realistic Weapon Damage And Death System [V1.0][New Cool FS] Nirzor Filterscripts 6 08/08/2012 05:34 AM


All times are GMT. The time now is 01:12 AM.


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