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

[CSGO] Increased admin dmg taken or dealt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LeroySinclair
New Member
Join Date: Jul 2018
Old 07-16-2018 , 19:19   [CSGO] Increased admin dmg taken or dealt
Reply With Quote #1

Hi dearest AlliedModders community.

I am here to beg you for help, as I am totally programming-illiterate but would very much like a plugin for a server in CSGO

Does anybody have a script that makes you (or any player with an admin rank) deal increased damage and reduced damage to everybody, except maybe other admins (not necessary), regardless of the weapon? Be it percentage based or a flat +x increase.

Either always active or active on a trigger word, like /damagebonus or something like this.

I have found a script that reduces the damage taken, but I am clueless as to how it should be modified to work only on admins or admins + triggerword for toggling.

Massive thanks in advance to whoever helps decides to help me out with this.

Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdkhooks>

new bool:adminabuser[MAXPLAYERS+1];

public OnClientPutInServer(client) {

    SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamagePre);
}

public Action:OnTakeDamagePre(victim, &attacker, &inflictor, &Float:damage, &damagetype) {

    if (victim > 0 && victim <= MAXPLAYERS) {
        if (adminabuser[victim]) {
            damage -= damage * 0.4; // Reduce damage by 40%
            return Plugin_Changed;
        }
    }
}

// keys
// Be carefull, this executes 20+ times per key press

public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon) {

    if (buttons & IN_USE) {
        // client pressed E
    }

    if (buttons & IN_RELOAD) {
        // client pressed R
    }
    return Plugin_Continue;
}

Last edited by LeroySinclair; 07-16-2018 at 19:20.
LeroySinclair is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-16-2018 , 19:23   Re: [CSGO] Increased admin dmg taken or dealt
Reply With Quote #2

hi.

CheckCommandAccess
mug1wara is offline
LeroySinclair
New Member
Join Date: Jul 2018
Old 07-16-2018 , 19:33   Re: [CSGO] Increased admin dmg taken or dealt
Reply With Quote #3

Quote:
Originally Posted by mug1wara View Post
I'm sorry, but I don't know how to code, I've never written a program in my entire life, therefore this is of no use to me
LeroySinclair 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 05:04.


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