Raised This Month: $ Target: $400
 0% 

how can i add this 2 case?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-19-2011 , 16:31   Re: how can i add this 2 case?
Reply With Quote #1

Quote:
Originally Posted by Exolent[jNr] View Post
No. My code was how to set that the player has it.
You have to check if the player has it in that if statement inside the damage forward.
Is This Right?

PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits )
{
    if(
is_user_alive(id) )
        {
            if(
g_bBoght[id][anti_deagle] = true)
            {
                
                if( 
IsPlayerattacker ) && is_user_aliveattacker ) && inflictor == attacker && ( get_user_weapon(attacker) == CSW_DEAGLE ) )
                {
                    return 
HAM_SUPERCEDE;
                }
                
    
            return 
HAM_IGNORED;
            }
    }

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team


Error: Undefined symbol "id" on line 398
Error: Undefined symbol "id" on line 400



2 Errors.
Please Explian To me what's Wrong.
2reason2kill is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-20-2011 , 09:04   Re: how can i add this 2 case?
Reply With Quote #2

Quote:
Originally Posted by 2reason2kill View Post
Is This Right?

PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits )
{
    if(
is_user_alive(id) )
        {
            if(
g_bBoght[id][anti_deagle] = true)
            {
                
                if( 
IsPlayerattacker ) && is_user_aliveattacker ) && inflictor == attacker && ( get_user_weapon(attacker) == CSW_DEAGLE ) )
                {
                    return 
HAM_SUPERCEDE;
                }
                
    
            return 
HAM_IGNORED;
            }
    }

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team


Error: Undefined symbol "id" on line 398
Error: Undefined symbol "id" on line 400



2 Errors.
Please Explian To me what's Wrong.
the wrong that you don't add id remplace :
PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits )


PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits id )

Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-20-2011 , 11:27   Re: how can i add this 2 case?
Reply With Quote #3

Quote:
Originally Posted by Dolph_Ziggler View Post
the wrong that you don't add id remplace :
PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits )


PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits id )

You are completely wrong. Stop helping if you don't know what you are doing.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-20-2011 , 14:15   Re: how can i add this 2 case?
Reply With Quote #4

Quote:
Originally Posted by Dolph_Ziggler View Post
the wrong that you don't add id remplace :
PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits )


PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits id )

i think it was like

PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits  
Right?
2reason2kill is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-20-2011 , 15:09   Re: how can i add this 2 case?
Reply With Quote #5

Quote:
Originally Posted by 2reason2kill View Post
i think it was like

PHP Code:
public fwTakeDamagevictim inflictor attacker Float:damage damage_bits  
Right?
You had your function header correct the first time.
Yes, that one there is the proper header.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 23:28.


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