Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- static sBuild_new[33]=0;
- public plugin_init()
- {
- register_plugin("Simple Check Build","1.0","Seroff");
- register_clcmd("showcl","showclients");
- }
- public client_connect(id)
- {
- sBuild_new[id]=0;
- set_task(3.0,"isproblem",id);
- set_task(0.5,"client_build",id);
- }
- public client_build(id){
- query_client_cvar(id,"gl_ztrick_old","chsBuild");
- query_client_cvar(id,"gl_ztrick","chsBuild");
- }
- public chsBuild(id,const szVar[],const szValue[]){
- if(equal(szVar,"gl_ztrick_old") && szValue[0] != 'B' || equal(szVar,"gl_ztrick") && szValue[0] == 'B' ) {
- sBuild_new[id]=1;
- }
- else if (equal(szVar,"gl_ztrick") && szValue[0] != 'B' || equal(szVar,"gl_ztrick_old") && szValue[0] == 'B' ) {
- sBuild_new[id]=2;
- }
- }
- public isproblem(id){
- if(sBuild_new[id] == 0){
- new szName[33];
- get_user_name(id,szName,charsmax(szName));
- ColorChat(0,"1[^4INFINI^1] Игрок ^3%s ^1использует [^4не определяемый клиент^1]",szName);
- server_cmd("kick #%d ^"Ваш клиент не определился или у вас проблема с игрой!^"",get_user_userid(id));
- }
- }
- public showclients(id){
- new players[32],inum, name[32];
- con_print(id,"^n=============КЛИЕНТЫ ИГРОКОВ============^n ID | Ник | Клиент");
- get_players(players, inum)
- for (new a = 0; a < inum; ++a)
- {
- get_user_name(players[a], name, sizeof(name)-1)
- if(sBuild_new[players[a]]==1){
- con_print(id,"# %d | %s | Новый",players[a],name);
- }
- if(sBuild_new[players[a]]==2){
- con_print(id,"# %d | %s | Старый",players[a],name);
- }
- }
- con_print(id,"=====================================")
- return 1;
- }
- 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"); // Зелёный
- replace_all(msg, 190, "!y", "^1"); // Стандартный
- replace_all(msg, 190, "!t", "^3"); // Цвет команды
- 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, get_user_msgid("SayText"), _, players[i]);
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
- }
- }
- stock con_print(id,const msg_content[],any:...){
- new msg[192],MSG[192];
- vformat(msg, charsmax(msg), msg_content, 3);
- formatex(MSG,charsmax(MSG),"%s^n",msg);
- message_begin(MSG_ONE, 8, {0,0,0}, id);
- write_string(MSG);
- message_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment