View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-16-2021 , 21:06   Re: Weapon damage control for Steam ID
Reply With Quote #7

Quote:
Originally Posted by nonName View Post
Awh man. I just wanted to make some weapons stronger for some players(who might buy to be specific) instead of getting a fully new custom weapon, like those cso weapons but the problem is they are all for zp.

But I was going to mix it with the entity resource replacement(make it look like a total new weapon), can I have it privately if you don't want many people to abuse it. I won't abuse it.



It doesn't have to be that, think of it as a VIP(With steamID) privilege, buy and get a "custom weapon" using entity resources replacements but with bit stronger damage. Isn't everything abusable? you can abuse with getting GWH hook plugin and just fly around in the game. (that's an admin abuse)

Just because i said i would give myself dmg and other players normal dmg doesn't mean that I'm going to admin abuse(in you're perspective you will see it as an admin abuse but I'm the admin so what gives?). I would give myself some extra damage eventually, after all I'm an admin and a VIP in my own server right? but i said it in the first post as an example but you took it as an admin abuse. If other players wanted extra dmg for a skin weapon then they can just ask me or buy it, it's just how it is. You can slap and slay or do stuff with many plugins that admins can use and "abuse" The only difference here are flags, here i wanted a pure plugin with just simple steam ID's without flags.

It's not like i will give 1000 dmg for a weapon, just a little extra dmg. then again... I'm not gonna say oh no i will give little damage just because you guys told me that i might going to admin abuse, if i would give 1 million damage then i will give 1 million damage but with a purpose, I'm the admin in my own server so respect that. If people hated it then they will leave. I will be truly appreciated by your support in helping and making the plugin. But i will not let you assume that i might "abuse" it then not giving the plugin for that reason.

Also i don't appreciate how bugsy shows a "snip" that has [ AdminAbuse ] in the code just to mock what I'm requesting and then not giving it to me, a bit disrespectful and unnecessary. Might as well just put that in every plugin you have on the site.

Did you fully code the plugin in the morning with your coffee just to send that message? Nice dedication

Fine but is there a way to change any ZP extra item to just being able to be bought in a normal server? like with a command "get_weaponname" and admin_rcon flag required?
You're right I guess, it's simple enough to code or obtain something that abuses admin powers so it's not like I am giving you some breakthrough technology, and it's your servers reputation you'd be hurting. If you want to know how to print chat or HUD messages when someone is inflicting more damage than normal, just ask .

1. Make sure to populate the aaAdmins array exactly as I have it with respect to steam-id's (must be in caps), weapons, and the damage factor.
2. You can define the same player/steam-id more than once to allow different weapons to have different damage factors. If weapon(s) share the same factor, define them in a single array entry like the first example with the AK47, M4A1, etc. For other weapons that have a unique damage factor, define them like the deagle, hegrenade, and knife.

PHP Code:

#include <amxmodx>
#include <hamsandwich>

new const Version[] = "0.1";

enum AdminAbuse
{
    
AuthID35 ],
    
WeaponBits,
    
Float:DamageFactor
}

new const 
g_aaAdmins[][ AdminAbuse ] = 
{
    { 
"STEAM_0:0:12345" , ( << CSW_AK47 ) | ( << CSW_M4A1 ) | ( << CSW_TMP ) , 1.5 } ,
    { 
"STEAM_0:0:12345" , ( << CSW_DEAGLE ) , 2.0 } ,
    { 
"STEAM_0:0:12345" , ( << CSW_HEGRENADE ) , 3.0 } , 
    { 
"STEAM_0:0:12345" , ( << CSW_KNIFE ) , 6.0 }
};

const 
DMG_BULLET = ( << );
const 
DMG_GRENADE = ( << 24 );

new 
Float:g_fWeaponDamageFactorMAX_PLAYERS ][ CSW_P90 ];
new 
g_Bots;

public 
plugin_init() 
{
    
register_plugin"Damage Factor by Steam ID" Version "bugsy" );
    
    
RegisterHamHam_TakeDamage "player" "HamTakeDamage" );
}

public 
client_authorizedid )
{
    if ( 
is_user_botid ) )
    {
        
g_Bots |= ( << ( id 31 ) );
    }
    else
    {
        
g_Bots &= ~( << ( id 31 ) );
        
LoadDamageFactorsid );
    }
}

public 
HamTakeDamagevictim inflictor attacker Float:fDamage damageBits)
{
    if ( !( 
g_Bots & ( << ( attacker 31 ) ) ) && ( ( damageBits DMG_GRENADE ) || ( ( damageBits DMG_BULLET ) && is_user_aliveattacker ) ) ) )
    {
        
SetHamParamFloatfDamage g_fWeaponDamageFactorattacker ][ ( damageBits DMG_GRENADE ) ? CSW_HEGRENADE get_user_weaponattacker ) ] );
        return 
HAM_HANDLED;
    }
    
    return 
HAM_IGNORED;
}

LoadDamageFactorsid )
{
    new 
szAuthID35 ];
    
    
arraysetg_fWeaponDamageFactorid ] , 1.0 sizeofg_fWeaponDamageFactor[] ) ); 
    
get_user_authidid szAuthID charsmaxszAuthID ) );
    
    for ( new 
iAdmin iAdmin sizeofg_aaAdmins ) ; iAdmin++ )
    {
        if ( 
equalszAuthID g_aaAdminsiAdmin ][ AuthID ] ) )
        {
            for ( new 
iWeapon CSW_P228 iWeapon <= CSW_P90 iWeapon++ )
            {
                if ( ( 
<< iWeapon ) & g_aaAdminsiAdmin ][ WeaponBits ] )
                {
                    
g_fWeaponDamageFactorid ][ iWeapon ] = g_aaAdminsiAdmin ][ DamageFactor ];
                }
            }
        }
    }

__________________

Last edited by Bugsy; 02-16-2021 at 21:10.
Bugsy is offline