Descriere (adica ce face el mai exact): cand tastezi /vips iti arata cine este vip . Vreau sa apara asa [nume server] Vip's online :
Ai cautat pluginul?(daca da, precizeaza cum):
- click | Afiseaza codul
Necesita mod special?:-
Versiune AMXX Server:-
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
Code: Select all
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "VIP_Online"
#define VERSION "1.0"
#define AUTHOR "Askhanar"
#define VIP_LEVEL_ACCES ADMIN_LEVEL_H
new cvar_tag;
new cvar_vip_showC;
new gmsgSayText
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "handle_say");
register_clcmd("say_team", "handle_say");
cvar_tag = register_cvar("amx_vip_tag", "V.I.P"); // AICI ITI PUI NUMELE LA SERVER UNDE ESTE V.I.P
cvar_vip_showC = register_cvar("amx_vip_show_chat", "1");
gmsgSayText = get_user_msgid("SayText")
}
public handle_say(id)
{
new said[192];
read_args(said,192);
if(contain(said, "/vips") != -1)
set_task(0.1,"print_adminlist",id);
return PLUGIN_CONTINUE;
}
public print_adminlist(user)
{
if(get_pcvar_num(cvar_vip_showC))
{
new tag[32];
get_pcvar_string(cvar_tag, tag, charsmax(tag));
new adminnames[33][32];
new message[256];
new id, count, x, len;
for(id = 1 ; id <= get_maxplayers() ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & VIP_LEVEL_ACCES)
get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));
len = format(message, 255, "^4[%s] ^3VIP-ii online sunt :^4 " ,tag);
ColorChat(user,"^4[%s] ^3Add Contact : ^4 Numele de Contact ^1.", tag);
if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += format(message[len], 255-len, "%s%s ^1.", adminnames[x], x < (count-1) ? ", ":"");
if(len > 96)
{
print_message(user, message);
len = format(message, 255, " ");
}
}
print_message(user, message);
}
else
{
ColorChat(user,"^4[%s] ^3Nu sunt ^4VIP-i ^3online ^1.", tag);
ColorChat(user,"^4[%s] ^3Add Contact : ^4 Numele de Contact ^1.", tag);
}
}
return PLUGIN_CONTINUE;
}
print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
/*=================================================================================================================*/
/*----------------------------------------------[ ColorChat ]-----------------------------------------*/
/*=================================================================================================================*/
stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^4"); // verde
replace_all(msg, 190, "!y", "^1"); // galben/alb/negru
replace_all(msg, 190, "!t", "^3"); // rosu/albastru/gri
if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(id)) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, id);
write_byte(id);
write_string(msg);
message_end();
}
}
}
}
/*=================================================================================================================*/
/*----------------------------------------------[ ColorChat Sfarsit]---------------------------------*/
/*=================================================================================================================*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/