Raised This Month: $ Target: $400
 0% 

[B]Increases the damage the player[/B]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K o T
Senior Member
Join Date: Jan 2011
Old 07-30-2011 , 17:29   [B]Increases the damage the player[/B]
Reply With Quote #1

Code:
    #include <amxmodx>     #include <amxmisc>     #include <hamsandwich>     #include <fun>     #define PLUGIN "New Plug-In"     #define VERSION "1.0"     #define AUTHOR "Parkour"     public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)         RegisterHam(Ham_TakeDamage, "player", "hook_TakeDamage")     }     public hook_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)     {         if(is_user_admin(attacker))         {             new Gun = get_user_weapon(attacker)             if(Gun == CSW_KNIFE)             {                 SetHamParamFloat(4, damage*4)             }         }         return HAM_IGNORED     }



how to make weapons of any great damage was not only a knife and only for admins ADMIN_IMMUNITY if(Gun == CSW_ALL)
K o T is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-30-2011 , 18:50   Re: [B]Increases the damage the player[/B]
Reply With Quote #2

Code:
    #include <amxmodx>     #include <amxmisc>     #include <hamsandwich>     #define PLUGIN "New Plug-In"     #define VERSION "1.0"     #define AUTHOR "Parkour"     public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)         RegisterHam(Ham_TakeDamage, "player", "hook_TakeDamage")     }     public hook_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)     {         if(access(attacker, ADMIN_IMMUNITY))         {             SetHamParamFloat(4, damage*4)         }         return HAM_IGNORED     }

Change to check specific flag and remove the weapon check.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
K o T
Senior Member
Join Date: Jan 2011
Old 07-30-2011 , 19:01   Re: [B]Increases the damage the player[/B]
Reply With Quote #3

Exolent[jNr]
thank you
K o T is offline
K o T
Senior Member
Join Date: Jan 2011
Old 08-20-2011 , 18:25   Re: [B]Increases the damage the player[/B]
Reply With Quote #4

L 08/21/2011 - 01:24:56: Invalid player id 280
L 08/21/2011 - 01:24:56: [AMXX] Displaying debug trace (plugin "Damage_to_double_all_the_weapons.amxx")
L 08/21/2011 - 01:24:56: [AMXX] Run time error 10: native error (native "get_user_flags")
L 08/21/2011 - 01:24:56: [AMXX] [0] amxmisc.inc::access (line 97)
L 08/21/2011 - 01:24:56: [AMXX] [1] Damage_to_double_all_the_weapons.sma::hook_Ta keDamage (line 16)

Displays errors, the fall of the Player

Last edited by K o T; 08-20-2011 at 18:34.
K o T is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 08-20-2011 , 18:54   Re: [B]Increases the damage the player[/B]
Reply With Quote #5

Try this
PHP Code:
    #include <amxmodx>
    #include <amxmisc>
    #include <hamsandwich>

    #define PLUGIN "New Plug-In"
    #define VERSION "1.0"
    #define AUTHOR "Parkour"
    
    #define IsPlayer(%1)    (1 <= %1 <= g_iMaxPlayers)
    
    
new g_iMaxPlayers;

    public 
plugin_init() {
        
register_plugin(PLUGINVERSIONAUTHOR)
        
RegisterHam(Ham_TakeDamage"player""hook_TakeDamage")
        
        
g_iMaxPlayers get_maxplayers();
    }

    public 
hook_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
    {
        if(
IsPlayer(attacker) && access(attackerADMIN_IMMUNITY))
        {
            
SetHamParamFloat(4damage*4)
        }

        return 
HAM_IGNORED
    

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
K o T
Senior Member
Join Date: Jan 2011
Old 08-21-2011 , 06:24   Re: [B]Increases the damage the player[/B]
Reply With Quote #6

Thanks, I'll try your version of the
K o T 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 23:53.


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