Raised This Month: $ Target: $400
 0% 

cs go knife damage plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
udin39
BANNED
Join Date: Feb 2015
Location: https://t.me/pump_upp
Old 02-12-2015 , 15:34   cs go knife damage plugins
Reply With Quote #1

i got the code but its not working . wanted to make a 1k damage for it

#include <sourcemod>
#include <sdkhooks>

new Handle:g_cvar_knife_multiplier = INVALID_HANDLE;

public OnPluginStart()
{
for (new i = 1; i <= MaxClients; i++)
{
if (!IsClientConnected(i) || !IsClientInGame(i)) continue;

OnClientPutInServer(i);
}
g_cvar_knife_multiplier = CreateConVar("knife_multiplier", "1.00", "Multiplier for the knife's damage.", FCVAR_PLUGIN);

AutoExecConfig(true, "knifemultiplier");
}

public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
new dmg = RoundFloat(damage);
new String:sWeapon[32];
GetClientWeapon(inflictor, sWeapon, sizeof(sWeapon));

if (StrContains(sWeapon, "knife", false) != -1)
{
damage = dmg * GetConVarFloat(g_cvar_knife_multiplier);
return Plugin_Changed;
}
return Plugin_Continue;
}
udin39 is offline
Send a message via ICQ to udin39 Send a message via AIM to udin39 Send a message via Yahoo to udin39
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-12-2015 , 17:41   Re: cs go knife damage plugins
Reply With Quote #2

This plugin has a multiplier cvar knife_multiplier. If u want more damage set it to 10.0

Ps. Please post code in [code] tags.
__________________
Neuro Toxin is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 02-12-2015 , 17:58   Re: cs go knife damage plugins
Reply With Quote #3

hi thats the code i posted in another thread https://forums.alliedmods.net/showthread.php?t=254293 i never really tested it so i wasnt aware of any bugs

i just tested this and it works
Spoiler


also if you only want the 1k damage you can just hardcode that into the OnTakeDamage
PHP Code:
    if (StrContains(sWeapon"knife"false) != -1)
    {
        
damage 1000.0;
        return 
Plugin_Changed;
    } 

Last edited by Darkness_; 02-12-2015 at 18:15.
Darkness_ is offline
udin39
BANNED
Join Date: Feb 2015
Location: https://t.me/pump_upp
Old 02-13-2015 , 00:15   Re: cs go knife damage plugins
Reply With Quote #4

Quote:
Originally Posted by Darkness_ View Post
hi thats the code i posted in another thread https://forums.alliedmods.net/showthread.php?t=254293 i never really tested it so i wasnt aware of any bugs

i just tested this and it works
Spoiler


also if you only want the 1k damage you can just hardcode that into the OnTakeDamage
PHP Code:
    if (StrContains(sWeapon"knife"false) != -1)
    {
        
damage 1000.0;
        return 
Plugin_Changed;
    } 
it works ! thank you so much !
udin39 is offline
Send a message via ICQ to udin39 Send a message via AIM to udin39 Send a message via Yahoo to udin39
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 18:16.


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