Wygląda on mniej więcej tak:
Z początku przez x czasu (w zależności ile sobie ustawię) pokazuje się czarny ekran (to dobrze)
Ale pózniej on znika i już normalnie widzimy wszystko
Ale nie chcialbym tak chciałbym ,żeby ktoś mi przerobił tak żeby był przyciemniony ekran a nie normalny widok.
Jeszcze proszę żeby ktoś mi go przerobił ,aby był dostępny tylko dla CT!
Proszę o pomoc!
Kto pomoże oczywiście dam repucika
Oto kod sma:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #include <hamsandwich> #include <fakemeta> #include <fakemeta_util> #define PLUGIN "Chowany" #define VERSION "1.0" #define AUTHOR "Gierek" new g_tempid, chow new stop[33] new bron[33] new Float:roundstart new ch_time new screenfade; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /chowany", "chowanyspr"); register_clcmd("say_team /chowany", "chowanyspr"); register_event("CurWeapon","cur_weapon","be", "1=1"); register_forward(FM_CmdStart, "CmdStart"); RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); register_logevent("round_start", 2, "1=Round_Start") register_logevent("round_end", 2, "1=Round_End") screenfade = get_user_msgid("ScreenFade") register_cvar("ch_enable", "1") ch_time = register_cvar("ch_time", "60.0") register_cvar("ch_weapon", "1") } public cur_weapon(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED; static Float:nowtime nowtime = get_gametime() if(stop[id]==1 && chow==1 && nowtime - roundstart < get_cvar_float("mp_roundtime")*60) engclient_cmd(id,"weapon_knife"); return PLUGIN_HANDLED; } public round_start() { roundstart = get_gametime() } public round_end() { chow=0 } public CmdStart(id, uc_handle) { if(!is_user_alive(id)) return FMRES_IGNORED; static Float: nowtime nowtime = get_gametime() if(chow==1) { if(nowtime - roundstart < get_cvar_float("mp_roundtime")*60) { if(stop[id] == 0) set_user_maxspeed(id, 250.0); if(stop[id] == 1) set_user_maxspeed(id, 0.01); } else { set_user_maxspeed(id, 250.0); if(bron[id]==1) { bron[id]=0 give_item(id, "weapon_m4a1") cs_set_user_bpammo(id, CSW_M4A1, 120) } } } return FMRES_IGNORED; } public Odrodzenie(id) { if(!is_user_alive(id) || !is_user_connected(id)) return PLUGIN_CONTINUE; set_user_maxspeed(id, 250.0); return PLUGIN_CONTINUE; } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_alive(this) || !is_user_connected(this) || !is_user_connected(idattacker) || get_user_team(this) == get_user_team(idattacker)) return HAM_IGNORED; static Float:nowtime nowtime = get_gametime() if(cs_get_user_team(idattacker) == CS_TEAM_T && cs_get_user_team(this) == CS_TEAM_CT) { if(chow==1 && nowtime - roundstart < get_cvar_float("mp_roundtime")*60) { set_user_frags(this,get_user_frags(this)+1) user_kill(idattacker) return HAM_SUPERCEDE } } return HAM_IGNORED; } public chowanyspr(id) { if(get_cvar_num("ch_enable")) { if(cs_get_user_team(id) == CS_TEAM_T && !(get_user_flags(id) & ADMIN_IMMUNITY)) { client_print(id, print_chat, "[Jail] Nie jestes Klawiszem"); return PLUGIN_HANDLED; } if(!is_user_alive(id) && !(get_user_flags(id) & ADMIN_IMMUNITY)) { client_print(id, print_chat, "[Jail] Nie Zyjesz wiec nie mozesz uzywac tej komendy"); return PLUGIN_HANDLED; } if(chow==1) { client_print(id, print_chat, "[Jail] chowany jest już włączony"); return PLUGIN_HANDLED; } chow = 1 force_open() chowany() } return PLUGIN_HANDLED; } public chowany() { new players[32], pnum get_players(players, pnum) new Float: czas = get_pcvar_float(ch_time) for( new i; i<pnum;i++ ) { g_tempid = players[i]; if(get_cvar_num("ch_weapon")) bron[g_tempid] = 1 else bron[g_tempid] = 0 if(get_user_team(g_tempid)==1 && is_user_alive(g_tempid)) { stop[g_tempid] = 0 } if(get_user_team(g_tempid)==2 && is_user_alive(g_tempid)) { stop[g_tempid] = 1 message_begin( MSG_ONE, screenfade, _, g_tempid ) write_short( 1 << 12 ) write_short( 1 << 8 ) write_short( 1 << 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 255 ) message_end() set_task( 0.3, "full_fade", g_tempid ) set_task( czas, "reset", g_tempid ) } set_task(czas, "chowanystart", g_tempid) } } public chowanystart(id) { if(get_user_team(id)==1 && is_user_alive(id)) { stop[id] = 1 } if(get_user_team(id)==2 && is_user_alive(id)) { stop[id] = 0 } return PLUGIN_HANDLED; } public force_open() { new ent = -1 while((ent = fm_find_ent_by_class(ent, "func_door"))) { dllfunc(DLLFunc_Use, ent, 0) } } public full_fade(id) { message_begin( MSG_ONE, screenfade, _, id ) write_short( 1 << 0 ) write_short( 1 << 0 ) write_short( 1 << 2 ) write_byte( 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 255 ) message_end() } public reset(id) { message_begin( MSG_ONE, screenfade, _, id) write_short( 1 << 0 ) write_short( 1 << 0 ) write_short( 1 << 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 0 ) write_byte( 0 ) message_end() }
Użytkownik hiroshima edytował ten post 22.08.2011 23:48
tak nie wygląda lepiej? naucz się korzystania z tagów BBCode!