Cod: /* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc>
#define PLUGIN "No bot chat" #define VERSION "0.2" #define AUTHOR "rider" //parola pentru chat //#define passwd "playcs"
new bool:g_allowed[33] new SayText new randPasswd[6]
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say", "sayHandle") register_clcmd("say_team", "sayHandle") SayText = get_user_msgid("SayText") }
public client_connect(id) { g_allowed[id] = false
}
public client_putinserver(id){ //alegem o parola random new iRand = random_num(1,5) switch(iRand) { case 1: { copy(randPasswd, 6, "playcs") } case 2: { copy(randPasswd, 6, "playcs") } case 3: { copy(randPasswd, 6, "playcs") } case 4: { copy(randPasswd, 6, "playcs") } case 5: { copy(randPasswd, 6, "playcs") } } } public client_disconnect(id) { g_allowed[id] = false }
public sayHandle(id) { new said[192] read_args(said, 191) if (contain(said, randPasswd) != -1 && !g_allowed[id]) { g_allowed[id] = true; client_printcolor(id, "!g[!yPlaycs Bot!g] !yAi primit permisiunea de a folosi chatul") return PLUGIN_HANDLED; } if(!g_allowed[id]) { client_printcolor(id, "!g[!yPlaycs Bot!g] !yScrie !t%s !ypentru a putea folosi chatul.",randPasswd) return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } //chat color stock client_printcolor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") // Green Color replace_all(msg, 190, "!y", "^1") // Default Color replace_all(msg, 190, "!t", "^3") // Team Color if (id) players[0] = id; else get_players(players, count, "ch") { for ( new i = 0; i < count; i++ ) { if ( is_user_connected(players[i]) ) { message_begin(MSG_ONE_UNRELIABLE, SayText, _, players[i]) write_byte(players[i]); write_string(msg); message_end(); } } } } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */ |