Gdzie w tym jest odpowiedzialny kod za reklame?
#include <amxmodx>
#include <amxmisc>
//To retrieve maxplayers
new g_maxplayers
//enum
enum
{
TASK_INFO = 100
}
//Version information
new const VERSION[] = "1.0"
public plugin_init()
{
register_plugin("Active admins MOTD", VERSION, "FakeNick")
//Dictionary
register_dictionary("adminsm.txt")
//logevent
register_logevent("logevent_round_start",2,"1=Round_Start")
//Only to recognize, which sever is using this plugin
register_cvar("admins_motd_version",VERSION,FCVAR_SERVER | FCVAR_SPONLY)
//Say commands
register_clcmd("say !admins","func_admins")
register_clcmd("say_team !admins","func_admins")
//Maxplayers information
g_maxplayers = get_maxplayers()
}
public logevent_round_start()
{
//Show info
client_print(0,print_chat,"%L",LANG_PLAYER,"INFO_COMMAND")
//Rmeove old task and make a new one
remove_task(TASK_INFO)
set_task(60.0,"logevent_round_start",TASK_INFO)
}
public func_admins(id)
{
//Some common variables
static motd[1000],header[100],name[32],len,i,counter
len = 0
counter = 0
//Format bg and font colors
len += formatex(motd[len],sizeof motd - 1 - len,"%L",id,"MOTD_1")
//Format MOTD header
formatex(header,sizeof header - 1,"%L",id,"MOTD_HEADER")
//Check for admins
for(i = 1; i <= g_maxplayers;i++)
{
//If player is admin...
if(is_user_admin(i))
{
//...increase counter...
counter++
//...retrieve admin name...
get_user_name(i,name,sizeof name - 1)
//...add admin to MOTD
len += formatex(motd[len],sizeof motd - 1 - len,"%d. [b]%s[/b]
",counter,name)
}
}
//Finally, show MOTD
show_motd(id,motd,header)
}
A dokładniej za taką reklamę:
[Active admins] Wpisz !admins w say'u, aby zobaczyc, ktorzy admini sa aktywnPonieważ jakoś nie mogę tego znaleźć...


Dodatki SourceMod



Temat jest zamknięty








