#include <amxmodx> #include <amxmisc> #include <cstrike> new player new ip[32] new finish; new maxscreens //max nr of ss to a player new screeninterval //interval between 2 ss new design //visual stuff new site //the site/forum where a user can post ther pics to be unbanned public plugin_init() { register_plugin("Ultimate SS", "1.2", "Hack") register_concmd("amx_ss", "concmd_screen", ADMIN_BAN, "<authid, nick or #userid> <screens>") register_clcmd("say /ip", "show_ip") maxscreens = register_cvar("amx_ss_max", "5") screeninterval = register_cvar("amx_ss_interval", "1.0") design = register_cvar("amx_ss_design", "2") site = register_cvar("amx_ss_site","www.cs-wies.eu") } public concmd_screen(id, level, cid) { if(!cmd_access(id, level, cid, 3)) //if the one who requests an ss isnt admin exit { return PLUGIN_HANDLED } new arg1[24], arg2[4] read_argv(1, arg1, 23) read_argv(2, arg2, 3) new screens = str_to_num(arg2) new maxss = get_pcvar_num(maxscreens) if(screens > maxss) //too many ss? { console_print(id, "[SS]Prea multe poze!") return PLUGIN_HANDLED } player = cmd_target(id, arg1, 1) if (!player) //the player has exited the sv or he didnt existed { return PLUGIN_HANDLED } finish = screens new Float:interval = get_pcvar_float(screeninterval) //a set_task for each "amx_ss nickname nr_of_ss" new array[2] array[0] = id //save usefull data in a vector so it can be reused array[1] = player set_task(interval, "ss_propriuzis", 0, array,2, "a", screens) return PLUGIN_HANDLED } public ss_propriuzis(array[2]) { //take data and set them accordingly new player = array[1] new id = array[0] //save time,adminname,playername so that the player cant give us other ss's and because it LOOKS COOOL! 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) get_user_ip(player, ip, 31) //Clasic Design if(get_pcvar_num(design) == 0) { client_print(player, print_chat, "** styl 1 ^"%s^" by adminl ^"%s^" **", name, adminname) client_cmd(player, "snapshot") //ss } //Doar Playerului else if(get_pcvar_num(design) == 1) { // client_print(player, print_chat, "** Styl 2 ^"%s^" by admin ^"%s^" (%s) **", name, adminname, timestamp) client_cmd(player, "snapshot") //ss } //HUD Message doar Playerului else if(get_pcvar_num(design) == 2) { set_hudmessage(player, 255, 0, -1.0, 0.3, 0, 0.25, 1.0, 0.0, 0.0, 4) format(timestampmsg, 127, "** TIME: - %s **", timestamp) show_hudmessage(player, timestampmsg) client_cmd(player, "snapshot") //ss } //Full else if(get_pcvar_num(design) == 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, "** PLAYER %s TIME: - %s **",name,timestamp) show_hudmessage(player, timestampmsg) client_cmd(player, "snapshot") client_cmd(player, "snapshot") client_cmd(player, "snapshot") client_cmd(player, "snapshot") client_cmd(player, "snapshot") client_print(0, print_chat, "** Admin ^"%s^" zrobil screeny ^"%s^" (%s) **", adminname, name, timestamp) } console_print(id, "[SS]%s 's ip is %s!",name,ip) console_print(id, "[SS]%s 's ip is %s!",name,ip) console_print(id, "[SS]%s 's ip is %s!",name,ip) finish = finish - 1; if(finish == 0) { client_cmd(player, "kill") cs_set_user_team(player,CS_TEAM_SPECTATOR); new forum[51]; get_pcvar_string(site,forum,50) client_print(player, print_chat, "Wyslij screeny na forum %s aby udowodnic niewinnosc", forum) } return PLUGIN_CONTINUE; } public show_ip(id) { console_print(id, "[SS]Last Stored IP: %s!",ip) }
Amxx
AMX Mod X 1.8.1.3746 Authors: David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko, Felix "SniperBeamer" Geyer Jonny "Got His Gun" Bergstrom, Lukasz "SidLuke" Wlasinski Christian "Basic-Master" Hammacher, Borja "faluco" Ferrer Scott "Damaged Soul" Ehlert Compiled: Aug 16 2008, 19:58:51 URL:http://www.amxmodx.org/ Core mplugins.ini:
; AMX Mod X plugins ; Admin Base - Always one has to be activated admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) ; Basic admincmd.amxx ; basic admin console commands adminhelp.amxx ; help command for admin console commands adminslots.amxx ; slot reservation multilingual.amxx ; Multi-Lingual management ; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) ; plmenu.amxx ; players menu (kick, ban, client cmds.) ;telemenu.amxx ; teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) ; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands ; Map related nextmap.amxx ; displays next map in mapcycle mapchooser.amxx ; allows to vote for next map timeleft.amxx ; displays time left on map ; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands ; Counter-Strike ;restmenu.amxx ; restrict weapons menu ;statsx.amxx ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!) ; Enable to use AMX Mod plugins ;amxmod_compat.amxx ; AMX Mod backwards compatibility layer ; Custom - Add 3rd party plugins here ultss.amxx ssr.amxxmodules.ini
;mysql ;sqlite fun engine fakemeta geoip sockets regex nvault cstrike csx hamsandwich
Wszystko rozchodzi się o kod zamieszczony wyżej- ultss.sma
Kompiluje to(lokalnie) wgrywam na serwer, a ten uparcie pisze mi:
Screenshot taken on player naven by admin naven
Próbowałem usunąć plugin z serwera-efekt oczekiwany unknown command: amx_ss
Następnie wgrałem go od nowa świeżo skompilowany, i ciągle...
Wiem, że tak się dzieje z flagami dostępu, zapisują się w w cmdaccess.ini, ale to zwykły tekst przecież jest.... Nigdy nie miałem z tym problemów