Chciałbym, aby ktoś przerobił mi pluginy do jb.
jailbreak_bunt_wiezniow_sekundy - chcę żeby to tych 30 sekundach (tak jak jest ustawione domyślnie) na say'u tzn.
client_printwyświetliło się Minelo 30 sekund, wiezniowie moga sie buntowac!
Kod podałem poniżej:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Jail Break: Bunt wiezniow - sekundy" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" new cvar_time new Float:roundtime public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) cvar_time = register_cvar("jail_czasbuntu", "30") register_logevent("round_start", 2, "1=Round_Start") RegisterHam(Ham_TakeDamage, "player", "client_damage") } public round_start() { roundtime = get_gametime() } public client_damage(victim, entid, attacker, Float:damage, damagebits) { if(get_user_team(attacker) == 1 && get_user_team(victim) == 2) { static Float:nowtime, timer nowtime = get_gametime() timer = get_pcvar_num(cvar_time) if((nowtime - roundtime) < float(timer)) { client_print(attacker, print_chat, "Nie mozesz jeszcze rozpoczac buntu!") return HAM_SUPERCEDE } } return HAM_IGNORED }jailbreak_basicinfo -
1. Chcę, aby zamiast Dzień 1 wyświetlało się Niedziela -> Poniedziałek i tak dalej.
2. Oraz aby dni wyświetlały się również (oprócz tego za co siedzi) u CT.
Kod podaje poniżej:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "JailBreak: Basic Info" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" #define USERTASK 921 #define UPDATEDELAY 1.0 new static reasons[][] = { "gwalt", "narkotyki", "zabojstwo", "alkohol", "molestowanie", "pobicie babci", "napad na monopolowy", "dziesione" } new userreason[33] new rounds, hudhandler public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg","restart_roundsnum","a","2&#Game_C"/*,"2&#Game_w"*/) register_logevent("round_end", 2, "1=Round_End") RegisterHam(Ham_Spawn, "player", "client_spawn", 1) hudhandler = CreateHudSyncObj() } public round_end() { rounds ++ } public restart_roundsnum() { rounds = 0 } public client_disconnect(id) { userreason[id] = -1 if(task_exists(id + USERTASK)) { remove_task(id + USERTASK) } } public client_spawn(id) { if(task_exists(id + USERTASK)) { remove_task(id + USERTASK) } if(get_user_team(id) == 1) { userreason[id] = random_num(0, sizeof reasons - 1) set_task(UPDATEDELAY, "client_jailinfo", id + USERTASK, _, _, "b") } } public client_jailinfo(TASKID) { static id id = TASKID - USERTASK set_hudmessage(0, 255, 0, 0.8, 0.1, 0, 6.0, 12.0) ShowSyncHudMsg(id, hudhandler, "Dzien %d | Siedzisz za %s.", rounds, reasons[userreason[id]]) }
jailbreak_openjails - chcę, aby tylko TT mogli używać tej komendy, a gdy CT napisało by /cele to na say'u pojawił by się napis Jestes klawiszem, nie mozesz uzyc tej komendy. i cele otworzyły by się jeśli wpisało by to 70% TT.
Kod podaje poniżej:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fakemeta_util> #define PLUGIN "JailBreak: Open Jails" #define VERSION "1.0" #define AUTHOR "Sn!ff3r" new rocks new bool:opened new bool:voted[33] new Float:roundstart public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /cele", "client_say_cele") register_clcmd("say_team /cele", "client_say_cele") register_event("HLTV", "new_round", "a", "1=0", "2=0") register_event("DeathMsg", "client_death", "a") register_logevent("round_start", 2, "1=Round_Start") } public client_disconnect(id) { if(voted[id]) voted[id] = false } public round_start() { roundstart = get_gametime() } public new_round() { static players[32], inum, i get_players(players, inum) for (i = 0; i < inum; i++) { voted[players[i]] = false } rocks = 0 opened = false } public client_death() { static victim victim = read_data(1) if(get_user_team(victim) == 1 && voted[victim]) { voted[victim] = false } } public client_say_cele(id) { if(!is_user_alive(id)) { client_print(id,print_chat,"Jak chcesz wyjsc skoro nie zyjesz?") return PLUGIN_HANDLED } static needed, Float:nowtime needed = needed_votes() nowtime = get_gametime() if(nowtime - roundstart < 30.0) { client_print(id,print_chat,"Za wczesnie, czekaj na straznikow!") return PLUGIN_HANDLED } if(opened) { client_print(id,print_chat,"Cele juz zostaly otwarte") return PLUGIN_HANDLED } if(!voted[id]) { rocks++ voted[id] = true if(rocks >= needed) { force_open() client_print(id,print_chat,"Wiezniowie sie zbuntowali i otworzyli cele!") opened = true return PLUGIN_HANDLED } client_print(id,print_chat,"Oky... niech Twoi kumple jeszcze wpisza (potrzeba jeszcze %d glosow)",needed - rocks) } else { client_print(id,print_chat,"Juz glosowales na otworzenie celi (potrzeba jeszcze %d glosow) !",needed - rocks) return PLUGIN_HANDLED } return PLUGIN_CONTINUE } public force_open() { new ent = -1 while((ent = fm_find_ent_by_class(ent, "func_door"))) { dllfunc(DLLFunc_Use, ent, 0) } } stock needed_votes() { return floatround(float(active_players()) * 0.8 + 0.49) } stock active_players() { new players[32], inum, i, active = 0 get_players(players, inum, "h") for (i = 0; i < inum; ++i) { if(get_user_team(players[i]) == 1 && is_user_alive(players[i])) active++ } return active }
Użytkownik Myszax edytował ten post 26.08.2010 09:51