←  Multilingual

AMXX.pl: Support AMX Mod X i SourceMod

»

what´s wrong in this code??? (Auto message...

  • +
  • -
bugg - zdjęcie bugg 17.08.2012


#include <amxmodx>

/*---------------EDIT ME------------------*/
#define ADMIN_CHECK ADMIN_KICK
#define TASKID_ANNOUNCE 219348092123573721

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
/*----------------------------------------*/
new cvar_delay
new maxplayers
new gmsgSayText

public plugin_init() {
register_plugin("Admin Check", "1.51", "OneEyed")
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")

register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
cvar_delay = register_cvar("admins_delay", "30.0")

if (get_pcvar_float(cvar_delay) > 0.0)
if (!task_exists(TASKID_ANNOUNCE))
set_task(get_pcvar_float(cvar_delay), "print_adminlist", TASKID_ANNOUNCE, "", 0, "b")

}


public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_CHECK)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s ADMINS ONLINE: ",COLOR)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "No admins online.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

// not found, server shutting down, what´s wrong in this code?
Użytkownik bugg edytował ten post 17.08.2012 18:01
Odpowiedz

Scrypter - zdjęcie Scrypter 21.08.2012

In this code is all good, you have problem with compile ?
Odpowiedz