Siema mam problem z pluginem wynik w say i hud. Gdyz on liczy wygrane rudny itp karzdy chyba wie oco chodzi.Przejdzmy do rzeczy.Mam oto taki z nim problem gdy sie rozegra np. 3 rundy i te 3 rndy np. wygraja terro to i tak na say i hud pokazuje remis 0:0. Pomożecie ?
- #include <amxmodx>
- #include <amxmisc>
- #include <colorchat>
- #define PLUGIN "Wynik"
- #define VERSION "1.1"
- #define AUTHOR "MaKeL"
- new CT = 0
- new TT = 0
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
- register_message(get_user_msgid("TextMsg"), "message_TextMsg")
- }
- public Nowa_Runda()
- {
- set_hudmessage(212, 255, 85, -1.0, -1.0, 0, 6.0, 4.0)
- if(CT == TT)
- {
- ColorChat(0, GREY, "Remis ^x01%d : ^x01%d",CT,TT)
- show_hudmessage(0, "Remis !^n [CT] %d - %d [TT]",CT,TT)
- }
- if(CT > TT)
- {
- ColorChat(0, BLUE, "Antyterrorysci ^x04prowadza ^x01%d : ^x01%d",CT,TT)
- show_hudmessage(0, "Terrorysci dostaja po d*pie!^n [CT] %d - %d [TT]",CT,TT)
- }
- if(CT < TT)
- {
- ColorChat(0, RED, "Terrorysci ^x04prowadza ^x01%d : ^x01%d",TT,CT)
- show_hudmessage(0, "Antyterrorysci dostaja po d*pie!^n [CT] %d - %d [TT]",CT,TT)
- }
- }
- public message_TextMsg(const MsgId, const MsgDest, const MsgEntity) {
- static message[32]
- get_msg_arg_string(2, message, charsmax(message))
- if(equal(message, "#Game_will_restart_in"))
- {
- TT = 0;CT = 0
- }
- else if(equal(message, "#Terrorists_Win"))
- TT++
- else if(equal(message, "#CTs_Win"))
- CT++
- }