Znots Posted December 13, 2010 Report Share Posted December 13, 2010 (edited) Sveiki.Čakarējos jau vairākas dienas un nesaprotu,kur šeit ir kas nepareizi sadarīts,kāpēc man neiet screen uz admin d flaga. Respektīvi esmu izmēģinājis šādi. register_concmd("amx_screen", "concmd_screen", ADMIN_BAN, "<authid, nick or #userid> <screens>") Un šādi register_concmd("amx_screen", "concmd_screen", ADMIN_LEVEL_d, "<authid, nick or #userid> <screens>") Kā neiet tā neiet,uz imunitātes flaga iet,bet uz d flaga neiet. Rāda ka nau acces. /* AMX Mod X script. * * Admin Screen 2 v1.0 by uTg | bigpapajiggs * * Based on Admin Screen by Rav * * amx_screen <authid/nick/userid> <number of screens> * */ #include <amxmodx> #include <amxmisc> new player //PCVAR new maxss, ssinterval, timestamptype public plugin_init() { register_plugin("Admin Screen 2", "1.1", "uTg | bigpapajiggs") register_concmd("amx_screen", "concmd_screen", ADMIN_BAN, "<authid, nick or #userid> <screens>") maxss = register_cvar("amx_maxscreens", "10") ssinterval = register_cvar("amx_ssinterval", "1.0") timestamptype = register_cvar("amx_timestamptype", "3") } public concmd_screen(id, level, cid) { //Is the amx_screen'er an admin? if(!cmd_access(id, level, cid, 3)) { return PLUGIN_HANDLED } //Read the arguements new arg1[24], arg2[4] read_argv(1, arg1, 23) read_argv(2, arg2, 3) new screens = str_to_num(arg2) new maxscreens = get_pcvar_num(maxss) //Let us make sure that there aren't too many screenshots taken if(screens > maxscreens) { console_print(id, "[AMXX] You cannot take that many screenshots!") return PLUGIN_HANDLED } //Does the target exist? player = cmd_target(id, arg1, 1) if (!player) { return PLUGIN_HANDLED } //How many screenshots? new Float:interval = get_pcvar_float(ssinterval) new array[2] array[0] = id array[1] = player set_task(interval, "takeScreen", 0, array,2, "a", screens) return PLUGIN_HANDLED } public takeScreen(array[2]) { new player = array[1] new id = array[0] //Get time, admin name, and target name new timestamp[32], timestampmsg[128], name[32], adminname[32] get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31) get_user_name(player, name, 31) get_user_name(id, adminname, 31) //No timestamp if(get_pcvar_num(timestamptype) == 0) { client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" **", name, adminname) //Take the screenshot client_cmd(player, "snapshot") } //Client Print only else if(get_pcvar_num(timestamptype) == 1) { //client_print Timestamp Message client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp) //Take the screenshot client_cmd(player, "snapshot") } //HUD Message only else if(get_pcvar_num(timestamptype) == 2) { //HUD Timestamp Message set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) show_hudmessage(player, timestampmsg) //Take the screenshot client_cmd(player, "snapshot") } //Both else if(get_pcvar_num(timestamptype) == 3) { //HUD Timestamp Message set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) show_hudmessage(player, timestampmsg) //client_print Timestamp Message client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp) //Take the screenshot client_cmd(player, "snapshot") } return PLUGIN_CONTINUE } Edited December 13, 2010 by Znots Link to comment Share on other sites More sharing options...
SCORPIONS Posted December 13, 2010 Report Share Posted December 13, 2010 Nokompilēji pēc tam pluginu? Link to comment Share on other sites More sharing options...
remix.cc Posted December 13, 2010 Report Share Posted December 13, 2010 taks... ; d - amx_ban and amx_unban commands un ; p - custom level D nav viens un tas pats... 1. tev jāraksta ADMIN_BAN 2. ADMIN_LEVEL_D userim tev jāuzliek: 1. d acc flags 2. p acc flags nu un jā, beigās ir jāsakompilē ) Link to comment Share on other sites More sharing options...
spALky Posted December 14, 2010 Report Share Posted December 14, 2010 Reku viss ir strādājošs, xscreen nick un screenu skaits /* AMX Mod X script. * * Admin Screen 2 v1.0 by uTg | bigpapajiggs * * Based on Admin Screen by Rav * * amx_screen <authid/nick/userid> <number of screens> * */ #include <amxmodx> #include <amxmisc> new player //PCVAR new maxss, ssinterval, timestamptype public plugin_init() { register_plugin("Admin Screen 2", "1.1", "uTg | bigpapajiggs") register_concmd("xscreen", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>") maxss = register_cvar("amx_maxscreens", "10") ssinterval = register_cvar("amx_ssinterval", "1.0") timestamptype = register_cvar("amx_timestamptype", "3") } public concmd_screen(id, level, cid) { //Is the amx_screen'er an admin? if(!cmd_access(id, level, cid, 3)) { return PLUGIN_HANDLED } //Read the arguements new arg1[24], arg2[4] read_argv(1, arg1, 23) read_argv(2, arg2, 3) new screens = str_to_num(arg2) new maxscreens = get_pcvar_num(maxss) //Let us make sure that there aren't too many screenshots taken if(screens > maxscreens) { console_print(id, "[AMXX] You cannot take that many screenshots!") return PLUGIN_HANDLED } //Does the target exist? player = cmd_target(id, arg1, 1) if (!player) { return PLUGIN_HANDLED } //How many screenshots? new Float:interval = get_pcvar_float(ssinterval) new array[2] array[0] = id array[1] = player set_task(interval, "takeScreen", 0, array,2, "a", screens) return PLUGIN_HANDLED } public takeScreen(array[2]) { new player = array[1] new id = array[0] //Get time, admin name, and target name new timestamp[32], timestampmsg[128], name[32], adminname[32] get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31) get_user_name(player, name, 31) get_user_name(id, adminname, 31) //No timestamp if(get_pcvar_num(timestamptype) == 0) { client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" **", name, adminname) //Take the screenshot client_cmd(player, "snapshot") } //Client Print only else if(get_pcvar_num(timestamptype) == 1) { //client_print Timestamp Message client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp) //Take the screenshot client_cmd(player, "snapshot") } //HUD Message only else if(get_pcvar_num(timestamptype) == 2) { //HUD Timestamp Message set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) show_hudmessage(player, timestampmsg) //Take the screenshot client_cmd(player, "snapshot") } //Both else if(get_pcvar_num(timestamptype) == 3) { //HUD Timestamp Message set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) format(timestampmsg, 127, "** TIMESTAMP - %s **", timestamp) show_hudmessage(player, timestampmsg) //client_print Timestamp Message client_print(player, print_chat, "** Screenshot taken on player ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp) //Take the screenshot client_cmd(player, "snapshot") } return PLUGIN_CONTINUE } Link to comment Share on other sites More sharing options...
Znots Posted December 14, 2010 Author Report Share Posted December 14, 2010 Num liels paldies,darīju pēc remixa ieteikumu un viss iet kā vaig. Paldies,varat taisīt ciet Link to comment Share on other sites More sharing options...
Recommended Posts