[HPK] Twoj ping jest za duzy!
bylo
[HPK] Twoj ping jest za duzy!
Załączone pliki
Użytkownik cezikos edytował ten post 29.01.2010 21:22
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Napisano 29.01.2010 21:21
Użytkownik cezikos edytował ten post 29.01.2010 21:22
Napisano 29.01.2010 21:53
/* AMX Mod script * * (c) 2002-2003, DynAstY * This file is provided as is (no warranties). * * Players with immunity won't be checked */ #include <amxmodx> #include <colorchat> new HPK_MAX_CVAR new HPK_TIME_CVAR new HPK_TESTS_CVAR new iNumTests[33] public plugin_init() { register_plugin("High Ping Kicker","1.2.0","DynAstY") register_cvar("hpk_maxping","95") register_cvar("hpk_time","6") register_cvar("hpk_tests","3") return PLUGIN_CONTINUE } public client_disconnect(id) { remove_task(id) return PLUGIN_CONTINUE } public client_putinserver(id) { iNumTests[id] = 0 if (!is_user_bot(id)) { new param[1] param[0] = id set_task(30.0, "showWarn", id, param, 1) } return PLUGIN_CONTINUE } kickPlayer(id) { new name[32] get_user_name(id, name, 31) new uID = get_user_userid(id) server_cmd("kickid 1 #%d", uID) client_cmd(id, "echo ^"[PING] Twoj ping jest za duzy!^"; disconnect") ColorChat(0, GREEN, "[PING]^x01 Gracz^x03 %s ^x01zostal rozlaczony z powodu duzego ping'u! ", name) return PLUGIN_CONTINUE } public checkPing(param[]) { new id = param[0] HPK_MAX_CVAR = get_cvar_num( "hpk_maxping" ) HPK_TESTS_CVAR = get_cvar_num( "hpk_tests" ) HPK_TIME_CVAR = get_cvar_num( "hpk_time" ) if ((get_user_flags(id) & ADMIN_IMMUNITY)) { remove_task(id) client_print(id, print_chat, "Ping nie obowiazuje graczy z immunitetem...") return PLUGIN_CONTINUE } new p, l get_user_ping(id, p, l) if (p > HPK_MAX_CVAR) ++iNumTests[id] else if (iNumTests[id] > 0) --iNumTests[id] if (iNumTests[id] > HPK_TESTS_CVAR) kickPlayer(id) return PLUGIN_CONTINUE } public showWarn(param[]) { ColorChat(param[0], GREEN, "[PING]^x01 Gracze z pingiem wiekszym niz^x03 %d beda wyrzucani!", HPK_MAX_CVAR) set_task(float(HPK_TIME_CVAR), "checkPing", param[0], param, 1, "b") return PLUGIN_CONTINUE }
Napisano 29.01.2010 22:08
Napisano 29.01.2010 22:22
Przy kompilowaniu blad w 10 lini
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
Header size: 632 bytes
Code size: 3316 bytes
Data size: 2692 bytes
Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
Total requirements: 23024 bytes
Done.
#include <amxmodx> #define MAXSLOTS 32 new HPK_MAX_CVAR new HPK_TIME_CVAR new HPK_TESTS_CVAR new iNumTests[33] public plugin_init() { register_plugin("High Ping Kicker","1.2.0","DynAstY") register_cvar("hpk_maxping","95") register_cvar("hpk_time","6") register_cvar("hpk_tests","3") return PLUGIN_CONTINUE } enum Color{ YELLOW = 1, // Yellow GREEN, // Green Color TEAM_COLOR, // Red, grey, blue GREY, // grey RED, // Red BLUE, // Blue } new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" } public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { static message[256]; switch(type) { case YELLOW:{ // Yellow message[0] = 0x01; } case GREEN:{// Green message[0] = 0x04; } default:{ // White, Red, Blue message[0] = 0x03; } } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(!id) { index = FindPlayer(); MSG_Type = MSG_ALL; } else { MSG_Type = MSG_ONE; index = id; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange){ Team_Info(index, MSG_Type, TeamName[team]); } } ShowColorMessage(id, type, message[]){ message_begin(type, 76, _, id); write_byte(id) write_string(message); message_end(); } Team_Info(id, type, team[]){ message_begin(type, 86, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type){ switch(Type) { case RED: { return Team_Info(index, type, TeamName[1]); } case BLUE: { return Team_Info(index, type, TeamName[2]); } case GREY: { return Team_Info(index, type, TeamName[0]); } } return 0; } FindPlayer(){ new i = -1; while(i <= MAXSLOTS){ if(is_user_connected(++i)){ return i; } } return -1; } public client_disconnect(id) { remove_task(id) return PLUGIN_CONTINUE } public client_putinserver(id) { iNumTests[id] = 0 if (!is_user_bot(id)) { new param[1] param[0] = id set_task(30.0, "showWarn", id, param, 1) } return PLUGIN_CONTINUE } kickPlayer(id) { new name[32] get_user_name(id, name, 31) new uID = get_user_userid(id) server_cmd("kickid 1 #%d", uID) client_cmd(id, "echo ^"[PING] Twoj ping jest za duzy!^"; disconnect") ColorChat(0, GREEN, "[PING]^x01 Gracz^x03 %s ^x01zostal rozlaczony z powodu duzego ping'u! ", name) return PLUGIN_CONTINUE } public checkPing(param[]) { new id = param[0] HPK_MAX_CVAR = get_cvar_num( "hpk_maxping" ) HPK_TESTS_CVAR = get_cvar_num( "hpk_tests" ) HPK_TIME_CVAR = get_cvar_num( "hpk_time" ) if ((get_user_flags(id) & ADMIN_IMMUNITY)) { remove_task(id) client_print(id, print_chat, "Ping nie obowiazuje graczy z immunitetem...") return PLUGIN_CONTINUE } new p, l get_user_ping(id, p, l) if (p > HPK_MAX_CVAR) ++iNumTests[id] else if (iNumTests[id] > 0) --iNumTests[id] if (iNumTests[id] > HPK_TESTS_CVAR) kickPlayer(id) return PLUGIN_CONTINUE } public showWarn(param[]) { ColorChat(param[0], GREEN, "[PING]^x01 Gracze z pingiem wiekszym niz^x03 %d beda wyrzucani!", HPK_MAX_CVAR) set_task(float(HPK_TIME_CVAR), "checkPing", param[0], param, 1, "b") return PLUGIN_CONTINUE }
Użytkownik MisieQ edytował ten post 29.01.2010 22:26
Napisano 29.01.2010 22:34
Użytkownik cezikos edytował ten post 29.01.2010 22:36
Napisano 29.01.2010 22:35
Użytkownik kasza edytował ten post 29.01.2010 22:36
Napisano 29.01.2010 22:52
No wlasnie lokalnie to robie i mam taki blad wez daj amxx.
EDIT: sorka ty dales inny plugin
Użytkownik MisieQ edytował ten post 29.01.2010 22:55
Napisano 29.01.2010 23:23
Napisano 30.01.2010 11:44
Modyfikacja
kilka modyfikacji/integracji blockmaker/expmodNapisany przez fandyPND, 08.08.2024 ![]() |
|
![]() |
|||
Inny
Dodanie Broni do PaintBallNapisany przez One ShooT, 05.02.2024 ![]() |
|
![]() |
|||
Modyfikacja
prośba o przerobienie pluginuprośba Napisany przez bili, 06.02.2021 ![]() |
|
![]() |
|||
Modyfikacja
Prośba o dodanie modelu do vipa z generatoraNapisany przez Vanilla, 01.02.2021 ![]() |
|
![]() |
|||
Modyfikacja
Plugin na przenikanie/spadochron pod komendąNapisany przez Polonez, 22.01.2021 ![]() |
|
![]() |
0 użytkowników, 1 gości, 0 anonimowych