Raised This Month: $32 Target: $400
 8% 

[HELP] Regarding event_damage function


Post New Thread Reply   
 
Thread Tools Display Modes
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 10-08-2017 , 07:16   Re: [HELP] Regarding event_damage function
Reply With Quote #21

Here's The Full Code

Spoiler
__________________
And I Am Back.

Last edited by TheSpaniard; 10-08-2017 at 07:43. Reason: Edited
TheSpaniard is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-08-2017 , 07:27   Re: [HELP] Regarding event_damage function
Reply With Quote #22

As i Told you this check is incorrect...

PHP Code:
iInflictor == CSW_AK47||CSW_M4A1||CSW_AWP  // inflictor is the attacker unless it was a hegrenade dmg in that case its the grenade entity index. 

here is the correct results...

PHP Code:
public fw_takedamage(iClientiInflictoriAttackerFloat:fDamagem_Damagebits)
{
    if(
iAttacker&& iAttacker != iClient && ((1<<get_user_weapon(iAttacker)) & ((1<<CSW_AK47)|(1<<CSW_M4A1)|(1<<CSW_AWP)) ) )
    {
        
SetHamParamFloat(4fDamage*get_pcvar_float(CVAR_DAMAGE_MULTI))
    }
    return 
HAM_IGNORED



Please if you don't have any knowledge of coding post in the request section....


This code will result in a server crash...

if you chosen item 1 will result in an infinite loop!

PHP Code:
    while(item == 1)
    {
        
    }
    if(
item == 1)
        return 
PLUGIN_CONTINUE 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 10-08-2017 at 07:31.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 10-08-2017 , 07:29   Re: [HELP] Regarding event_damage function
Reply With Quote #23

Quote:
Originally Posted by Natsheh View Post
As i Told you this check is incorrect...

PHP Code:
iInflictor == CSW_AK47||CSW_M4A1||CSW_AWP  // inflictor is the attacker unless it was a hegrenade dmg in that case its the grenade entity index. 

here is the correct results...

PHP Code:
public fw_takedamage(iClientiInflictoriAttackerFloat:fDamagem_Damagebits)
{
    if(
iAttacker&& iAttacker != iClient && ((1<<get_user_weapon(iAttacker)) & ((1<<CSW_AK47)|(1<<CSW_M4A1)|(1<<CSW_AWP)) ) )
    {
        
SetHamParamFloat(4fDamage*get_pcvar_float(CVAR_DAMAGE_MULTI))
    }
    return 
HAM_IGNORED

Fixed
Now i will test it and please do tell if it contains any other bugs/mistakes
__________________
And I Am Back.

Last edited by TheSpaniard; 10-08-2017 at 07:30.
TheSpaniard is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-08-2017 , 07:31   Re: [HELP] Regarding event_damage function
Reply With Quote #24

Quote:
Originally Posted by TheSpaniard View Post
Fixed
Now i will test it and please do tell if it contains any other bugs/mistakes
Read the edit
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 10-08-2017 , 07:37   Re: [HELP] Regarding event_damage function
Reply With Quote #25

Quote:
Originally Posted by Natsheh View Post
Read the edit
Then What should i do??
And see this too
Quote:
Originally Posted by TheSpaniard View Post
The Catch:-
These are not the only conditions i want to apply i want the ham to be executed only when it is called in a specific case, in switch condition or the above ham would be executed on all ak47 or awp or m4a1 skins i am putting in the plugin.
__________________
And I Am Back.

Last edited by TheSpaniard; 10-08-2017 at 07:42.
TheSpaniard is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-08-2017 , 07:42   Re: [HELP] Regarding event_damage function
Reply With Quote #26

Quote:
Originally Posted by TheSpaniard View Post
Then What should i do??
Request from somebody to make/fix it for you according to your demands...

Which you post your request in the Request Section...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 10-08-2017 at 07:42.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
TheSpaniard
Senior Member
Join Date: Jul 2017
Location: Hell
Old 10-08-2017 , 07:44   Re: [HELP] Regarding event_damage function
Reply With Quote #27

Quote:
Originally Posted by Natsheh View Post
Request from somebody to make/fix it for you according to your demands...

Which you post your request in the Request Section...
Can't you provide the fix.
I just want to link the specific ability to specific model
__________________
And I Am Back.

Last edited by TheSpaniard; 10-08-2017 at 07:45.
TheSpaniard is offline
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

Forum Jump


All times are GMT -4. The time now is 02:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode