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

kdf_color_chat_no_mess


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ernar
Junior Member
Join Date: Sep 2020
Old 09-13-2020 , 05:20   kdf_color_chat_no_mess
Reply With Quote #1

help fix this code it does not work when installing this code it gives an errorn,eed to find an error in the code

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <chatcolor>


#define PLUGIN "Knife Double Frags"
#define VERSION "0.3"
#define AUTHOR "Rul4"

new
toggle,getmoney,sounds,frags;

/*
new pun_list[][] =
{
"%s has sliced %s^nand stole %s bucks!!!",
"%s has given %s a taste of his cold steel!!!^n(he took %s from him)",
"%s rules! %s bows to his mighty skills ^nand surrenders %s from his purse."
};

*/
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("DeathMsg","hook_death","a");
toggle = register_cvar("kdf_enabled","1");
sounds = register_cvar("kdf_sounds","1");
frags = register_cvar("kdf_frags","1");
getmoney = register_cvar("kdf_stealmoney","1");

}

public plugin_precache()
{
precache_sound("misc/humiliation.wav");
}

public hook_death()
{
if(get_pcvar_num(toggle) != 1)
return PLUGIN_HANDLED;
new amount = 0;
new killer = read_data(1);
new victim = read_data(2);
new kname[32]; get_user_name(killer,kname,31);
new vname[32]; get_user_name(victim,vname,31);
new weapon[24];
new namount[32];
read_data(4,weapon,23);

if(weapon[0] == 'k' && get_user_team(killer) != get_user_team(victim))
{
inc_frag(killer);
if(get_pcvar_num(getmoney) == 1)
{
amount = cs_get_user_money(victim)*random(5)/4;
stealmoney(victim, killer, amount);
}
num_to_str(amount, namount, 32);

client_print_color(victim, Blue, "^1Игрок ^3%s ^1зарезал ^3%s ^1и получил ^4$%s", kname, vname, namount)
client_print_color(killer, Blue, "^1Игрок ^3%s ^1зарезал ^3%s ^1и получил ^4$%s", kname, vname, namount)

//et_hudmessage(255, 127, 42, 0.5, -1.0, 0, 6.0, 7.0);
//show_hudmessage(0,pun_list[random(sizeof pun_list)],kname,vname,namount);
if(bsounds(sounds)) client_cmd(0,"spk misc/humiliation");
}

return PLUGIN_HANDLED;
}

inc_frag(index)
{
if(!is_user_connected(index)) return;
set_user_frags(index,get_user_frags(index)+ge t_pcvar_num(frags));
}

stealmoney(victim, killer, amount)
{
if(!is_user_connected(victim) || !is_user_connected(killer)) return;
cs_set_user_money(killer,cs_get_user_money(ki ller)+amount);
cs_set_user_money(victim,cs_get_user_money(vi ctim)-amount);
}

bool: bsounds(pcvar)
{
if(get_pcvar_num(pcvar) == 1)
return true;
return false;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
*/
Attached Files
File Type: sma Get Plugin or Get Source (kdf_color_chat_no_mess.sma - 91 views - 2.5 KB)

Last edited by ernar; 09-13-2020 at 09:07.
ernar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-13-2020 , 07:50   Re: kdf_color_chat_no_mess
Reply With Quote #2

You can't find what? What is the problem? Explain properly, we can't read minds.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ernar
Junior Member
Join Date: Sep 2020
Old 09-13-2020 , 08:37   Re: kdf_color_chat_no_mess
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
You can't find what? What is the problem? Explain properly, we can't read minds.
help fix this code it does not work when installing this code it gives an errorn,eed to find an error in the code

Last edited by ernar; 09-13-2020 at 08:38.
ernar is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-13-2020 , 13:44   Re: kdf_color_chat_no_mess
Reply With Quote #4

You haven't yet provided any information that is helpful. What is the error you get in the logs when debug is enabled for the plugin?
__________________
fysiks 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 09:23.


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