/* AMX Mod script.
*
* (c) Copyright 2002, OLO
* This file is provided as is (no warranties).
*
*/
/* Mix of plugins console motd from file and welcome message. */
#include <amxmod>
public client_connect(id) {
new name[32], authid[32], ip[32], hostname[64], nextmap[32], time[32], mapname[32], mod_ver[32]
new Float:mp_timelimit = get_cvar_float("mp_timelimit")
get_cvar_string("hostname",hostname,63)
get_user_name(id,name,31)
get_user_authid(id,authid,31)
get_user_ip(id,ip,31)
get_time("%m/%d/%Y - %H:%M:%S",time,31)
get_mapname(mapname,31)
get_cvar_string("amx_nextmap",nextmap,31)
new filename2[128]
get_cvar_string("amx_conmotd_file_anfang",filename2,127)
if (file_exists(filename2)) {
new line = 0, txtsize = 0, message[192]
while((line=read_file(filename2,line,message,192,txtsize))!=0)
client_cmd(id,"echo ^"%s^"",message)
}
client_cmd(id, "echo ^" Hallo %s, willkommen auf dem %s^"",name,hostname)
client_cmd(id, "echo ^" Zur Information: Deine WONID lautet: %s^";echo",authid)
client_cmd(id, "echo ^" Spieler auf dem Server: %d von %d^"",get_playersnum(),get_maxplayers())
client_cmd(id, "echo ^" Aktuelle Map: %s^"",mapname)
client_cmd(id, "echo ^" Naechste Map: %s^"",nextmap)
if (mp_timelimit){
new timeleft = get_timeleft()
if (timeleft > 0) client_cmd(id, "echo ^" Verbleibene Zeit: %d:%02d^"",timeleft / 60, timeleft % 60)
client_cmd(id, "echo ^" Zeitlimit %.0f Min.^"",mp_timelimit)
}
else
client_cmd(id, "echo ^" * Kein Zeitlimit *^"")
client_cmd(id, "echo ^" Friendly fire ist %s.^"", get_cvar_float("mp_friendlyfire") ? "an" : "aus")
client_cmd(id, "echo ^" C4 Timer ist auf %.0f Sek. gestellt^"",get_cvar_float("mp_c4timer"))
if (cvar_exists("amx_avlist_mode")){
client_cmd(id, "echo ;echo ^" Sage hp um Informationen zu deinem Gegner zuzeigen^"")
client_cmd(id, "echo ^" Sage rank um deinen Platz in der Rangliste anzuzeigen^"")
client_cmd(id, "echo ^" Sage stats um die Stats der Spieler anzuzeigen^"")
client_cmd(id, "echo ^" Sage top15 um die besten Spieler anzuzeigen^"")
client_cmd(id, "echo ^" Sage status um ServerInformationen zuerhalten^"")
client_cmd(id, "echo ^" Sage statsme um deine Stats anzuzeigen^"")
}
new flags = get_user_flags(id)
if (flags){
new sflags[32]
get_flags(flags,sflags,31)
client_cmd(id, "echo ;echo ^" Dein Zugriffslevel ist: %s. Du hast %sImunitaet.^"",sflags,(flags&ADMIN_IMMUNITY)?"":"keine ")
client_cmd(id, "echo ^" Schreibe ´amx_help´ in die Konsole um moegliche Befehle zu sehen^"")
}
else {
client_cmd(id, "echo ;echo ^" Du bist nicht als Admin oder Nutzer mit Pirvilegien eingelogged.^"")
}
client_cmd(id, "echo ;echo ^" Server Mods:^"")
get_cvar_string("amx_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * AMX Mod %s^"",mod_ver)
get_cvar_string("statsme_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * StatsMe %s^"",mod_ver)
get_cvar_string("clanmod_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * ClanMod %s^"",mod_ver)
get_cvar_string("admin_mod_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * AdminMod %s^"",mod_ver)
get_cvar_string("chicken_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * Chicken %s^"",mod_ver)
get_cvar_string("csguard_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * CSGuard %s^"",mod_ver)
get_cvar_string("hlguard_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * HLGuard %s^"",mod_ver)
get_cvar_string("plbot_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * PLBot %s^"",mod_ver)
get_cvar_string("booster_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * HL-Booster %s^"",mod_ver)
get_cvar_string("axn_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * AXN %s^"",mod_ver)
get_cvar_string("bmx_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * BMX %s^"",mod_ver)
get_cvar_string("atac_version",mod_ver,31)
if (mod_ver[0]) client_cmd(id, "echo ^" * ATAC %s^"",mod_ver)
new filename[128]
get_cvar_string("amx_conmotd_file_ende",filename,127)
if (file_exists(filename)) {
new line = 0, txtsize = 0, message[192]
while((line=read_file(filename,line,message,192,txtsize))!=0)
client_cmd(id,"echo ^"%s^"",message)
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("Welcome Message","0.9.2","default")
register_cvar("amx_conmotd_file","addons/amx/conmotd.txt")
register_cvar("amx_conmotd_file_anfang","addons/amx/conmotd_anfang.txt")
register_cvar("amx_conmotd_file_ende","addons/amx/conmotd_ende.txt")
return PLUGIN_CONTINUE
}
_________________ "... To boldly go where no one has gone before."
|