Hi I'm DwightPlugin name: Hud Admin ChatDescription: This chat appears on the screen (hudmessage) . I could not understand with any of admins in normal chat ( ADMIN Dwight: bla bla, adminchat.
amxx by Dev Team),and made this plugin.I'm newbie in AmxModX , so this plugin is of beginners

.Photo with chat:

Quote: #include
#include#includenew chat_line[5][255]new chat_red,chat_green,chat_bluenew cvar_color,chat_hud,cvar_timepublic plugin_init(){ register_plugin("ChatAdmin","1.1","Dwight"); register_clcmd("say","make_line",ADMIN_CHAT," + text"); cvar_color = register_cvar("chat_color","255 0 0"); new chat_colors[16],red[4],green[4],blue[4]; get_pcvar_string(cvar_color,chat_colors,sizeo f chat_colors - 1); parse(chat_colors,red,3,green,3,blue,3); chat_red = str_to_num(red); chat_green = str_to_num(green); chat_blue = str_to_num(blue); chat_hud = CreateHudSyncObj(); cvar_time = register_cvar("chat_time","3.0"); }public make_line(id,level,cid){ if( !access(id,ADMIN_CHAT) ) return PLUGIN_CONTINUE; new chat_read[2]; read_argv(1,chat_read,1); if( chat_read[0] != '!' ) return PLUGIN_CONTINUE; new message[201],name[32],ip[22]; read_args(message,200); remove_quotes(message); get_user_name(id,name,32); get_user_ip(id,ip,22); log_to_file("adminchat.log","%s [ %s ] : %s",name,ip,message); message[0] = ' '; new complete[255]; format(complete,255,"%s : %s",name,message); copy(chat_line[0],255,chat_line[1]); copy(chat_line[1],255,chat_line[2]); copy(chat_line[2],255,chat_line[3]); copy(chat_line[3],255,chat_line[4]); copy(chat_line[4],255,complete); new maxpl = get_maxplayers(); new Float:time = get_pcvar_float(cvar_time); for(new i=1;i Chat appear only 3 seconds after "talking" admin.I try to make another hudchatadmin plugin(but not working): line be colored so that:If admin is owner(flag: ab...u) , line is colored red.if admin is moderator(flag:bcdefij), line is colored green................................. etc.I know...That plugin is nothing compared with your plugins, but is a start
.
Wyświetl pełny artykuł