dwie przeróbki :) Prośba :P
MafiaDL
17.05.2008
1. plugin ustawia np o 1 w nocy wlonczał sie mapcykle nr 2 a od 7 rano mapcykle nr 1 ?
2. Sprawa potrzebuje pluginu admin_check
ale komenda bedzie dostępna tylko dla ADMINÓW ! tylko admin moze wpisac w say /admin albo /adm ( najlepiej dwie opcje )
zwykly admin_check pewnie trzeba dodac Admin level A ?
2. Sprawa potrzebuje pluginu admin_check

zwykly admin_check pewnie trzeba dodac Admin level A ?

#include <amxmodx> /*---------------EDIT ME------------------*/ #define ADMIN_CHECK ADMIN_KICK static const COLOR[] = "^x04" //green static const CONTACT[] = "" /*----------------------------------------*/ new maxplayers new gmsgSayText public plugin_init() { register_plugin("Admin Check", "1.51", "OneEyed") maxplayers = get_maxplayers() gmsgSayText = get_user_msgid("SayText") register_clcmd("say", "handle_say") register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER) } public handle_say(id) { new said[192] read_args(said,192) if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/admin") != -1 ) set_task(0.1,"print_adminlist",id) return PLUGIN_CONTINUE } public print_adminlist(user) { new adminnames[33][32] new message[256] new contactinfo[256], contact[112] new id, count, x, len for(id = 1 ; id <= maxplayers ; id++) if(is_user_connected(id)) if(get_user_flags(id) & ADMIN_CHECK) get_user_name(id, adminnames[count++], 31) len = format(message, 255, "%s ADMINS ONLINE: ",COLOR) if(count > 0) { for(x = 0 ; x < count ; x++) { len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"") if(len > 96 ) { print_message(user, message) len = format(message, 255, "%s ",COLOR) } } print_message(user, message) } else { len += format(message[len], 255-len, "No admins online.") print_message(user, message) } get_cvar_string("amx_contactinfo", contact, 63) if(contact[0]) { format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact) print_message(user, contactinfo) } } print_message(id, msg[]) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) write_byte(id) write_string(msg) message_end() }
Miczu
17.05.2008
#include <amxmodx> /*---------------EDIT ME------------------*/ #define ADMIN_CHECK ADMIN_KICK static const COLOR[] = "^x04" //green static const CONTACT[] = "" /*----------------------------------------*/ new maxplayers new gmsgSayText public plugin_init() { register_plugin("Admin Check", "1.51", "OneEyed") maxplayers = get_maxplayers() gmsgSayText = get_user_msgid("SayText") register_clcmd("say", "handle_say") register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER) } public handle_say(id) { new said[192] read_args(said,192) if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/admin") != -1 ) if(is_user_admin(id)) set_task(0.1,"print_adminlist",id) return PLUGIN_CONTINUE } public print_adminlist(user) { new adminnames[33][32] new message[256] new contactinfo[256], contact[112] new id, count, x, len for(id = 1 ; id <= maxplayers ; id++) if(is_user_connected(id)) if(get_user_flags(id) & ADMIN_CHECK) get_user_name(id, adminnames[count++], 31) len = format(message, 255, "%s ADMINS ONLINE: ",COLOR) if(count > 0) { for(x = 0 ; x < count ; x++) { len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"") if(len > 96 ) { print_message(user, message) len = format(message, 255, "%s ",COLOR) } } print_message(user, message) } else { len += format(message[len], 255-len, "No admins online.") print_message(user, message) } get_cvar_string("amx_contactinfo", contact, 63) if(contact[0]) { format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact) print_message(user, contactinfo) } } print_message(id, msg[]) { message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) write_byte(id) write_string(msg) message_end() }
powinno reagowac gdy admin wpisze komende
MafiaDL
17.05.2008
thx a to by dalo rade zrobic
#EDIT
BŁAD PRZY ROBIENIU .AMXX
plugin ustawia np o 1 w nocy wlonczał sie mapcykle nr 2 a od 7 rano mapcykle nr 1 ?
#EDIT
BŁAD PRZY ROBIENIU .AMXX
/home/groups/amxmodx/tmp3/textf7yJLp.sma(25) : error 017: undefined symbol "is_user_admin" 1 Error. Could not locate output file /home/groups/amxmodx/public_html/websc3/textf7yJLp.amx (compile failed).
Miczu
17.05.2008
#include <amxmisc>
Dodaj to na poczatek, is_user_admin to jest funkcja samego amxx'a ale chyba trzeba to dopisac. ;>
Salamon
17.05.2008
jezeli chce sie przez webcompiler to trzeba wszystko dopisywac, jezeli wystarczy nam lokalna kompilacja to jedyne co trzeba 'include' to te funkcje ktore wymagaja modulu, akurat tu nie wymaga i mozna lokalnie bez ale przez webcompilera trzeba wszystko
MafiaDL
18.05.2008
luz +
umie ktoś?
plugin ustawia np o 1 w nocy wlonczał sie mapcykle nr 2 a od 7 rano mapcykle nr 1 ?
umie ktoś?
ESTCOBS
18.05.2008
#include <amxmodx> #include <amxmisc> #define PLUGIN "Godzine Mapcycle" #define VERSION "1.0" #define AUTHOR "" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) wczytaj_mapcycle() return PLUGIN_CONTINUE } public wczytaj_mapcycle() { new today_str[8], cmd[48] get_time("%H",today_str,8) new today = str_to_num(today_str) if ((today >= 1) && (today < 7)) format(cmd,48,"mapcyclefile mapcycle-noc.cfg",today) else if ((today >= 7) && (today < 1)) format(cmd,48,"mapcyclefile mapcycle.cfg",today) server_cmd(cmd) return PLUGIN_HANDLED }
Nie testowałem
![:]](https://amxx.pl/public/style_emoticons/default/cwaniak.gif)
Ale powinno być dobrze

mapcycle-noc.cfg i mapcycle.cfg do cstrike
![:]](https://amxx.pl/public/style_emoticons/default/cwaniak.gif)
Teraz Pan plusik

MafiaDL
18.05.2008
wiem gdzie dodac
jak sprawdze dam plusika ;d
[ Dodano: 18-05-2008, 22:01 ]
albo teraz za chęci ;d

[ Dodano: 18-05-2008, 22:01 ]
albo teraz za chęci ;d
ESTCOBS
18.05.2008
Mafia
Jakby nie działał to daj znać
Bo jałmużny nie chce 
// CLOSE THIS TOPIC



// CLOSE THIS TOPIC
MafiaDL
19.05.2008
Mafia
Jakby nie działał to daj znać
Bo jałmużny nie chce
// CLOSE THIS TOPIC
OK to za fatyge

dam znać na pw

Salamon
19.05.2008
btw juz mowa byla o czyms takim:
godzina nie moze byc naraz i wieksza badz rowna 7 i mniejsza od 1 pomysl, tu musi byc || zamiast &&
else if ((today >= 7) && (today < 1))
godzina nie moze byc naraz i wieksza badz rowna 7 i mniejsza od 1 pomysl, tu musi byc || zamiast &&
MafiaDL
19.05.2008
czyli ?
#include <amxmodx> #include <amxmisc> #define PLUGIN "Godzine Mapcycle" #define VERSION "1.0" #define AUTHOR "" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) wczytaj_mapcycle() return PLUGIN_CONTINUE } public wczytaj_mapcycle() { new today_str[8], cmd[48] get_time("%H",today_str,8) new today = str_to_num(today_str) if ((today >= 1) && (today < 7)) format(cmd,48,"mapcyclefile mapcycle-noc.cfg",today) else if ((today >= 7) || (today < 1)) format(cmd,48,"mapcyclefile mapcycle.cfg",today) server_cmd(cmd) return PLUGIN_HANDLED }