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;
}