Vampire и teamalert, Помогите сделать 1 плагин |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
+
) или ссылку на плагин который вызывает у вас вопросы.
|
|
Vampire и teamalert, Помогите сделать 1 плагин |
m1ke #
|
10.3.2010, 19:42
Сообщение
|
![]() |
Можете сделать так чтобы в плагине vampire было так чтобы не все синим цветом когда убиваешь, а чтобы для каждой команды свой цвет. К примеру играешь за Т, убил и у тя красненький экран, а когда за КТ синенький. Я сам пробовал сделать хотел соеденить плагин teamalert c vampire но не получилось
CODE /* * * * AmxModX * Vampire plugin * by Shalfey * * CVars * amx_vampire_hp - hp add for kill * amx_vampire_hp_hs - hp add for kill in head * amx_vampire_max_hp - max player hp * * Players gets HP for kills. */ #include <amxmodx> #include <fun> #define PLUGIN_VERSION "1.0c" new health_add new health_hs_add new health_max new nKiller new nKiller_hp new nHp_add new nHp_max public plugin_init() { register_plugin("Vampire", PLUGIN_VERSION, "Shalfey") health_add = register_cvar("amx_vampire_hp", "1") health_hs_add = register_cvar("amx_vampire_hp_hs", "3") health_max = register_cvar("amx_vampire_max_hp", "120") register_event("DeathMsg", "hook_death", "a", "1>0") } public hook_death() { // Killer id nKiller = read_data(1) if ( (read_data(3) == 1) && (read_data(5) == 0) ) { nHp_add = get_pcvar_num (health_hs_add) } else nHp_add = get_pcvar_num (health_add) nHp_max = get_pcvar_num (health_max) // Updating Killer HP nKiller_hp = get_user_health(nKiller) nKiller_hp += nHp_add // Maximum HP check if (nKiller_hp > nHp_max) nKiller_hp = nHp_max set_user_health(nKiller, nKiller_hp) // Hud message "Healed +15/+40 hp" set_hudmessage(0, 255, 0, -1.0, 0.15, 2, 1.0, 1.0, 0.1, 0.1, -1) show_hudmessage(nKiller, "+%d hp", nHp_add) // Screen fading message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller) write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(0) write_byte(200) write_byte(75) message_end() } CODE /*
Team Alert This Plugin alerts a player what team he or she has join / been transfered too Change Log ---------- version | Update Comment ------------------------ 1.0 | 1st Release 1.1 | Small Coding Changes 1.2 | Float mistake on hud messages 1.3 | Added on off commands for admins with cvar access 1.4 | Series of updates for control of text and or color fade 1.5 | Commands and Cvars finished - text on off - fade on off - Teamalert on off 1.6 | Fixed more bugs 1.7 | Clean up / minor rescripting - 1.7x ready *.* | Also removed the extra commands not needed 1.8 | just more cleaning, no major update 1.9 | This version is or should be bot/hltv friendly 1.9.6 | Multilingual 1.9.7 | Added ability for a player to chose wheather he wants to see it or not. *.*.* | Updated Lang File / cleaned code - removed global cvar (pointless) 1.9.8 | Lang File update / Finished MultiLingual in plugin. 1.9.9 | Added Glow option (cvar) 1.9.9a| Added missing section to disable glow. */ #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define ct_flash(%1) Msg(%1,0,0,150,95) #define t_flash(%1) Msg(%1,175,0,0,115) new screen_fade, text, fade, glow, bool:sfade[33] public plugin_init() { register_plugin("teamalert","1.9.9b","Allenwr") screen_fade = get_user_msgid("ScreenFade") //events register_event("ResetHUD","showteam","b") text = register_cvar("sv_tatext","1") //cvars fade = register_cvar("sv_tafade","1") glow = register_cvar("sv_taglow","0") register_dictionary("teamalert.txt")//lang file register_concmd("amx_taglow","cmdglow",ADMIN_LEVEL_H,"1/0 turns glow on or off") register_clcmd("say /alerts","cmdalert",ADMIN_ALL, "") set_task(90.0,"show_message") } public client_putinserver(id) { sfade[id] = true } public show_message() { client_print(0, print_chat, "%L", LANG_PLAYER, "MSG1") } public cmdglow(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED; new arg[4] set_pcvar_num(glow, read_args(arg,3)) return PLUGIN_CONTINUE } public cmdalert(id,level,cid) { if(!cmd_access(id,level,cid,2)) return PLUGIN_CONTINUE if(sfade[id]) { sfade[id] = false client_print(id,print_chat,"%L", LANG_PLAYER, "MSG2") } else { sfade[id] = true client_print(id,print_chat,"%L", LANG_PLAYER, "MSG3") } return PLUGIN_CONTINUE } public showteam(id) { if(!is_user_alive(id) || is_user_bot(id) || !is_user_connected(id) || is_user_hltv(id)) return PLUGIN_CONTINUE; new CsTeams:userTeam = cs_get_user_team(id) if(sfade[id]) { if(get_pcvar_num(text)) { switch(userTeam) { case CS_TEAM_CT: { set_hudmessage(0, 0, 255, 0.42, 0.53, 2, 6.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "%L", LANG_PLAYER, "TEAM1") } case CS_TEAM_T: { set_hudmessage(255, 0, 0, 0.42, 0.53, 2, 6.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "%L", LANG_PLAYER, "TEAM2") } } } if(get_pcvar_num(fade)) { switch(userTeam) { case CS_TEAM_CT: { ct_flash(id) } case CS_TEAM_T: { t_flash(id) } } } } if(get_pcvar_num(glow) == 1) { switch(userTeam) { case CS_TEAM_CT: set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 1) case CS_TEAM_T: set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 1) } } else if(get_pcvar_num(glow) == 0) { set_user_rendering(id, kRenderFxNone) } return PLUGIN_CONTINUE } Msg(id,red,green,blue,alpha) { message_begin(MSG_ONE_UNRELIABLE,screen_fade,{0,0,0},id) write_short(2000) // duration write_short(2000) // hold time write_short(0) // flags write_byte(red) // red write_byte(green) // green write_byte(blue) // blue write_byte(alpha) // alpha message_end() }
Отредактировал: m1ke #, - 10.3.2010, 19:44
|
|
|
|
m1ke #
|
12.3.2010, 16:55
Сообщение
|
![]() |
Работает СПАСИБО
|
|
|
|
![]() ![]() |