Plugin- IP
Bocik
18.09.2009
Szukam pluginu ktory po wpisaniu w konsoli amx_ip pokazuje na koncu (jezeli ktos ma zminne ip) "Zminne" a jezeli nie no to puste pole
olmen 19.09.2009
Nie ma takiego czegoś. Jest tylko amx_ip to pokazuje all IP a zmiennego nie. Tzn pokazuje ale tylko te pod ktorym gosc gra.
mikus
19.09.2009
#include <amxmodx> #include <netdb> #define PLUGIN "StatusIP" #define VERSION "1.2" #define AUTHOR "KaMaZZ" new userhost[33]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("amx_ip", "ShowIP") register_clcmd("showip", "ShowIP") } public client_connect(id) { new ip[16], host[50] userhost[id] = netdb_gethostbyaddr(ip, host, 49) } public ShowIP(id) { new players[32], mapname[32], hostname[32], hostip[32] new online = get_playersnum() new maxplayers = get_maxplayers() new minleft = get_timeleft() / 60 new secleft = get_timeleft() % 60 get_mapname(mapname, 31) get_cvar_string("hostname", hostname, 31) get_cvar_string("net_address", hostip, 31) console_print(id, "---------------------Informacje-------------------------------") console_print(id, " - Nazwa serwera: %s", hostname) console_print(id, " - IP Serwera: %s", hostip) console_print(id, " - Biezaca mapa: %s", mapname) console_print(id, " - Czas mapy: Pozostalo %i:%i", minleft, secleft) console_print(id, " - Ilosc graczy: %d/%d", online, maxplayers) console_print(id, "--------------------------------------------------------------") console_print(id, "Lista graczy:") new inum; get_players(players, inum) for (new a = 0; a < inum; ++a) { new authid[32], name[32], ip[16] get_user_authid(players[a], authid, 31) get_user_name(players[a], name, 31) get_user_ip(players[a], ip, 15, 1) if(containi(userhost[id],"adsl") != -1 || containi(userhost[id],"dynamic") != -1 || containi(userhost[id],"tpnet")) { if(containi(authid, "VALVE") !=-1 || containi(authid, "STEAM_ID_") !=-1) { console_print(id, "#%d - %s - NonSteam - %s - Neostrada", players[a], name, ip) } else { console_print(id, "#%d - %s - %s - %s - Neostrada", players[a], name, authid, ip) } } else { if(containi(authid, "VALVE") !=-1 || containi(authid, "STEAM_ID_") !=-1) { console_print(id, "#%d - %s - NonSteam - %s", players[a], name, ip) } else { console_print(id, "#%d - %s - %s - %s", players[a], name, authid, ip) } } } console_print(id, "--------------------------------------------------------------") return PLUGIN_HANDLED }
Moduł netdb musisz mieć
Bocik
20.09.2009
Sorry ze wybrzydzam no ale chce zeby bylo dobrze plugin Kamaza jest dobry ale nie dopracowany poniewaz gdy ktos ma stale IP (sprawdzalem na sobie ) to i tak pisze ze ma neostrade na puchatku to dobrze smiga ale pewnie seba sam pisal i sma nie ma