Mam taki problem coś źle działą z colorchatem tutaj podaje cały kod:
#include <amxmodx>
#include <colorchat>
#define PLUGIN "Zarzadca_Interpu"
#define VERSION "1.2"
#define AUTHOR "SeeK"
#define TASK_SHOWMENU 432
new Interp[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("int_refresh","60.0");
register_cvar("int_display","300.0");
new Float:refresh = get_cvar_float("int_refresh");
new Float:display = get_cvar_float("int_display");
register_clcmd("say /interp","menu_displayer")
if(refresh != 0)
set_task(refresh, "ustawienie", _, _, _, "b")
if(display != 0)
set_task(display, "tekst", _, _, _, "b")
}
public client_putinserver(id)
{
if(!is_user_bot(id))
eventInGame(id)
}
public show_menu_(tid)
{
new id=tid-TASK_SHOWMENU;
if(!is_user_connected(id))
return PLUGIN_CONTINUE
new iTeam=get_user_team(id)
new menu_id, keys;
new menuUp = player_menu_info( id, menu_id, keys )
if ( iTeam && (menuUp <= 0 || menu_id < 0) )
menu_displayer(id)
else
set_task(1.0, "show_menu_", tid)
}
public eventInGame(id) set_task(1.0, "show_menu_", id+TASK_SHOWMENU);
public menu_displayer(id)
{
new Menu=menu_create("Wybierz wartosc interpu","cbMyMenu");
menu_additem(Menu,"ex_interp 0.01");
menu_additem(Menu,"ex_interp 0.02");
menu_additem(Menu,"ex_interp 0.03");
menu_additem(Menu,"ex_interp 0.04");
menu_additem(Menu,"ex_interp 0.05");
menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER)
menu_display(id, Menu,0);
return PLUGIN_HANDLED;
}
public cbMyMenu(id, menu, item){
switch(item){
case 0:{
client_cmd(id, "ex_interp 0.01");
Interp[id] = 1
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Zmieniles wartosc interp na:^x04 0.01")
}
case 1:{
client_cmd(id, "ex_interp 0.02");
Interp[id] = 2
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Zmieniles wartosc interp na:^x04 0.02")
}
case 2:{
client_cmd(id, "ex_interp 0.03");
Interp[id] = 3
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01#Zmieniles wartosc interp na:^x04 0.03")
}
case 3:{
client_cmd(id, "ex_interp 0.04");
Interp[id] = 4
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Zmieniles wartosc interp na:^x04 0.04")
}
case 4:{
client_cmd(id, "ex_interp 0.05");
Interp[id] = 5
ColorChat(id, GREEN, "[^x03INFO^x04] ^x01# Zmieniles wartosc interp na:^x04 0.05")
}
}
return PLUGIN_HANDLED;
}
public ustawienie()
{
for(new id = 1; id < 33; ++id)
{
if(is_user_connected(id))
{
if(Interp[id] == 1)
client_cmd(id, "ex_interp 0.01");
if(Interp[id] == 2)
client_cmd(id, "ex_interp 0.02");
if(Interp[id] == 3)
client_cmd(id, "ex_interp 0.03");
if(Interp[id] == 4)
client_cmd(id, "ex_interp 0.04");
if(Interp[id] == 5)
client_cmd(id, "ex_interp 0.05");
}
}
}
public tekst()
{
for(new id = 1; id < 33; ++id)
{
if(is_user_connected(id))
{
if(Interp[id] == 1)
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Twoja wartosc interp wynosi:^x04 0.01^x01, aby ja zmienic, uzyj komendy ^x04/interp")
if(Interp[id] == 2)
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Twoja wartosc interp wynosi:^x04 0.02^x01, aby ja zmienic, uzyj komendy ^x04/interp")
if(Interp[id] == 3)
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Twoja wartosc interp wynosi:^x04 0.03^x01, aby ja zmienic, uzyj komendy ^x04/interp")
if(Interp[id] == 4)
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Twoja wartosc interp wynosi:^x04 0.04^x01, aby ja zmienic, uzyj komendy ^x04/interp")
if(Interp[id] == 5)
ColorChat(id, GREEN, "[^x03CsWadowice.pl^x04] ^x01# Twoja wartosc interp wynosi:^x04 0.05^x01, aby ja zmienic, uzyj komendy ^x04/interp")
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Chodzi mniej więcej o to:
[^x03CsWadowice.pl^x04] ^x01#Na sayu wygląda to tak:
[<sWadowice.pl] #
Ale jak wpisze zamiast tego CsWadowice np. INFO wygląda to już tak:
[INFO] #, lub na niebiesko (zależnie od teamu)
A chce zeby to wyglądało tak:
[CsWadowice.pl] #
[CsWadowice.pl] # (zależnie od teamu)
Liczę na pomoc!


Dodatki SourceMod



Temat jest zamknięty











