Raised This Month: $12 Target: $400
 3% 

Weapon damage control for Steam ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nonName
Junior Member
Join Date: Feb 2021
Old 02-15-2021 , 02:16   Weapon damage control for Steam ID
Reply With Quote #1

Hey guys! I wanted to ask if there is a plugin or a way to make specific players with steam ID's to have specific weapon damage?

Like i want to increase the deagle or ak47 damage for me only by my steam ID, and the rest will have the normal damage.

Anyone can make such plugin? That would be awesome.
nonName is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 02-15-2021 , 09:03   Re: Weapon damage control for Steam ID
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define VERSION "0.1"

#define ACCESS ADMIN_RCON

public plugin_init()
{
    
register_plugin("Admin Double Damage"VERSION"Justin");

    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage");
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if (
is_user_connected(attacker) && is_user_alive(attacker) && get_user_flags(attacker) & ACCESS)
    {
        
SetHamParamFloat(4damage 2);
    }

Hi, I found this plugin. But it works with flag. I'm sure guys will help you to set this plugin on Steamid.
Theodore Bagwell is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-15-2021 , 12:27   Re: Weapon damage control for Steam ID
Reply With Quote #3

Code:
new const usersteam[][] =
{
    "STEAM_0:1:123456789",
    "STEAM_0:1:1337"
}


new Szsteam

get_user_authid( id, Szsteam, 31 );

for(new i = 0; i < sizeof(usersteam);i++)
{
    if(equal(Szsteam,  usersteam[i]))
    {
        // your code
    }   
}

Last edited by raizo11; 02-15-2021 at 12:27.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-15-2021 , 21:59   Re: Weapon damage control for Steam ID
Reply With Quote #4

Unethical.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-15-2021 , 22:11   Re: Weapon damage control for Steam ID
Reply With Quote #5

I fully coded it this morning while I was having coffee but didn't post it because it's unethical/admin abuse. No you can't have it.

Here's a snip
PHP Code:
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 }
}; 
__________________

Last edited by Bugsy; 02-15-2021 at 22:17.
Bugsy is online now
nonName
Junior Member
Join Date: Feb 2021
Old 02-16-2021 , 01:47   Re: Weapon damage control for Steam ID
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
I fully coded it this morning while I was having coffee but didn't post it because it's unethical/admin abuse. No you can't have it.

Here's a snip
PHP Code:
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 }
}; 
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.

Quote:
Originally Posted by fysiks View Post
Unethical.
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?

Last edited by nonName; 02-16-2021 at 04:41.
nonName is offline
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 online now
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-16-2021 , 23:08   Re: Weapon damage control for Steam ID
Reply With Quote #8

Quote:
Originally Posted by nonName View Post
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.
All things are relative and subjective. What you asked for was unethical. What you actually wanted may not have been unethical. This is why you should always explain what you actually want instead of some random request, it's less confusing and much quicker, generally.
__________________
fysiks is offline
nonName
Junior Member
Join Date: Feb 2021
Old 02-17-2021 , 01:51   Re: Weapon damage control for Steam ID
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
All things are relative and subjective. What you asked for was unethical. What you actually wanted may not have been unethical. This is why you should always explain what you actually want instead of some random request, it's less confusing and much quicker, generally.
Yeah it's my bad
I should've explained it more.


Quote:
Originally Posted by Bugsy View Post
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 ];
                }
            }
        }
    }

Thank you bugsy! I will try it. And sorry for not explaining what i wanted. Can i know how to change the damage factor and what are the default damage factors? When you say weapons having the same damage factor according to the defaults or according to me making them the same damage factors so i put them in 1 array?

Also is there a plugin in which you can craft any weapon you want over another weapon? I couldn't find such plugin. Because in entity resource replacement all it does it changing the skin to the player STEAM ID while all the rest of players when they pick it up themselves can't see it, it looks normal to them.

The closest thing i can think of is the Golden AK plugin. The one where you can get the golden ak when doing the command. https://forums.alliedmods.net/showthread.php?p=827532

Except why not make a general one in which u can put models, sounds, sprites and ofc damage to make a new weapon instead of my method. The weapon i replaced on my server for myself was a neat AK skin. I could use the Golden AK plugin and changed it's models but it lacked sounds, sprites, W_model and no admin commands.

That could be lit. Instead of using skin replacements.
And custom weapons are annoying because they are all for ZP... There are barely anything for normal modes.

Last edited by nonName; 02-17-2021 at 02:18.
nonName is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-17-2021 , 08:40   Re: Weapon damage control for Steam ID
Reply With Quote #10

Weapons that you do not define in the array will have the standard 1.0 damage factor.
__________________

Last edited by Bugsy; 02-17-2021 at 08:40.
Bugsy is online now
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 06:24.


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