CT WIN - T WIN

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
User avatar
xDede
Jau po truputį tampa savu
Posts: 113
Joined: 2011 Jun 01 19:30
Skype: cicinas2
Location: Telsiai
Contact:

CT WIN - T WIN

Post by xDede »

Sveiki, gal galit parodyti pavzidi, kaip reike padaryti kad kai laimi ct ir t
tarkim 30roundu ir kai laimi ct 16 o t 14 parasytu koki nors teksta, o jei ct laimi 15 o terai irgi 15
Rasytu kita teksta, nes dabar man skaicuoja taskus pagal laimetus roundus per abu team iskarto...

newb
Pluginų patvirtintojas
Posts: 1047
Joined: 2010 Sep 23 21:43
Location: Wonderland
Contact:

Re: CT WIN - T WIN

Post by newb »

Nezinau geriausio budo suzinoti koks teamas laimejo, tai paimsiu random.

Code: Select all

#include <amxmodx> new ctwin, twin public plugin_init() {    register_event("SendAudio", "Terrorists_win" , "a", "2&%!MRAD_terwin")    register_event("SendAudio", "CounterTerrorists_win", "a", "2&%!MRAD_ctwin")    register_logevent("restart", 2, "1&Restart_Round_", "1=Game_Commencing")} public Terrorists_win() {    switch(++twin) {        case 1: client_print(0, 3, "laimejo t 1 karta")         case 5: client_print(0, 3, "laimejo t 5 kartus")                    case 15: client_print(0, 3, "laimejo t 15 kartu")       }} public CounterTerrorists_win() {    switch(++ctwin) {        case 1: client_print(0, 3, "laimejo ct 1 karta")            case 5: client_print(0, 3, "laimejo ct 5 kartus")                   case 15: client_print(0, 3, "laimejo ct 15 kartu")      }} public restart() {    twin = ctwin = 0}

Aurimas
O taip. Jis jau surinko 50 žinučių!
Posts: 79
Joined: 2011 Jul 13 20:33

Re: CT WIN - T WIN

Post by Aurimas »

newb, client_print tipo 3 negali būti.

newb
Pluginų patvirtintojas
Posts: 1047
Joined: 2010 Sep 23 21:43
Location: Wonderland
Contact:

Re: CT WIN - T WIN

Post by newb »

Nu ir kodel ne ?

Code: Select all

enum {    print_notify = 1,    print_console,    print_chat,    print_center,};
Tesiog su 3 greiciau.

User avatar
hleV
AMX Mod X ekspertai
Posts: 875
Joined: 2011 Apr 02 11:23
Skype: hlev.lt
Location: Šiauliai

Re: CT WIN - T WIN

Post by hleV »

Aurimas wrote:newb, client_print tipo 3 negali būti.

Code: Select all

enum {    print_notify = 1,    print_console,    print_chat,    print_center,};
Paskaičiuok kokį skaičių atitinka print_chat.
Image ← RIP best userbar
DISKUSIJA: KIETAS PLUGIN'O UŽSAKOVAS
Privačios pagalbos neteikiu!

User avatar
xDede
Jau po truputį tampa savu
Posts: 113
Joined: 2011 Jun 01 19:30
Skype: cicinas2
Location: Telsiai
Contact:

Re: CT WIN - T WIN

Post by xDede »

O kaip apskiacuoti, jei yra lygu 15-15 ir parasytu teksta, bet nerasytu to teksto kad t laimejo 15 ir ct laimejo 15
Kartu, o tiesiog noriu kad tarkim jei lygu parasytu teksta lygiasios, ir nerasytu kad ct ar t laimejo 15 roundu,

Na tarkim man reike kad jei ct pajima 15 roundu parasytu ct komandai truksta vieno tasko, bet jei lygu isijungtu pratesimas,
Ir toliau vyktu kova, o to teksto jau neberasytu, kad ct komandai truksta vieno tasko...

Aurimas
O taip. Jis jau surinko 50 žinučių!
Posts: 79
Joined: 2011 Jul 13 20:33

Re: CT WIN - T WIN

Post by Aurimas »

aišku, nežinojau.

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: CT WIN - T WIN

Post by aurimasko »

nežinau gal taip :D

Code: Select all

 #include <amxmodx> new gWins[2] public plugin_init(){    register_plugin("Plugin", "0.1", "author")    register_message(get_user_msgid("TextMsg"), "message_textmsg")} public message_textmsg(){    new textmsg[60]    get_msg_arg_string(2, textmsg, charsmax(textmsg))        if(equal(textmsg, "#Game_will_restart_in") || equal(textmsg, "#Game_Commencing"))    {        gWins[0] = 0        gWins[1] = 0    }        if((!(equal(textmsg, "#Terrorists_Win"))) || (!(equal(textmsg, "#CTs_Win"))))        return PLUGIN_CONTINUE            if(equal(textmsg, "#Terrorist_Win"))        gWins[0]++    else if(equal(textmsg, "#CTs_Win"))        gWins[1]++            if(gWins[0] == 15 && gWins[1] == 15)        set_msg_arg_string(2, "Lygiosios")    else if(gWins[0] == 15)        set_msg_arg_string(2, "terams liko 1 pergale")    else if(gWins[1] == 15)        set_msg_arg_string(2, "ctams liko 1 pergale")            return PLUGIN_CONTINUE}
netestavau.

User avatar
xDede
Jau po truputį tampa savu
Posts: 113
Joined: 2011 Jun 01 19:30
Skype: cicinas2
Location: Telsiai
Contact:

Re: CT WIN - T WIN

Post by xDede »

aurimasko wrote:nežinau gal taip :D

Code: Select all

 #include <amxmodx> new gWins[2] public plugin_init(){    register_plugin("Plugin", "0.1", "author")    register_message(get_user_msgid("TextMsg"), "message_textmsg")} public message_textmsg(){    new textmsg[60]    get_msg_arg_string(2, textmsg, charsmax(textmsg))        if(equal(textmsg, "#Game_will_restart_in") || equal(textmsg, "#Game_Commencing"))    {        gWins[0] = 0        gWins[1] = 0    }        if((!(equal(textmsg, "#Terrorists_Win"))) || (!(equal(textmsg, "#CTs_Win"))))        return PLUGIN_CONTINUE            if(equal(textmsg, "#Terrorist_Win"))        gWins[0]++    else if(equal(textmsg, "#CTs_Win"))        gWins[1]++            if(gWins[0] == 15 && gWins[1] == 15)        set_msg_arg_string(2, "Lygiosios")    else if(gWins[0] == 15)        set_msg_arg_string(2, "terams liko 1 pergale")    else if(gWins[1] == 15)        set_msg_arg_string(2, "ctams liko 1 pergale")            return PLUGIN_CONTINUE}
netestavau.
Man sitas varijantas neveike.

TETYYS
Gana aktyvus vartotojas
Posts: 457
Joined: 2011 Dec 26 21:49

Re: CT WIN - T WIN

Post by TETYYS »

Mėnesį testavai? :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest