function Trig_Mods_Actions takes nothing returns nothing local integer l=0 local integer i=1 local integer i1=3 local integer p=0 local string s="" local string sm="Выбран мод: " local string s1=SubString(GetEventPlayerChatString(),0,StringLength(GetEventPlayerChatString())) local unit array d loop exitwhen i==21 set s=SubString(s1,i,i1) if s=="de" then loop exitwhen l==11 call SetPlayerHandicapXP(Player(l),200*0.01) set l=l+1 endloop set l=0 set sm=sm+"|cFF0A60FF Double Experience|r"+"/" endif if s=="ar" then
endif if s=="ap" then loop exitwhen l==11 if IsPlayerAlly(Player(l), Player(5)) then call SetPlayerTechMaxAllowed(Player(l),'U000',1) endif if IsPlayerAlly(Player(l), Player(11)) then call SetPlayerTechMaxAllowed(Player(l),'O001',1) call SetPlayerTechMaxAllowed(Player(l),'E000',1) endif set l=l+1 endloop set l=0 set sm=sm+"|cFF0A60FF All Pick|r"+"/" endif if s=="om" then call DisableTrigger(gg_trg_Down) call DisableTrigger(gg_trg_Up) set sm=sm+"|cFF0A60FF Only Mid|r"+"/" endif if s=="od" then call DisableTrigger(gg_trg_Up) call DisableTrigger(gg_trg_Mid) set sm=sm+"|cFF0A60FF Only Down|r /" endif if s=="ou" then call DisableTrigger(gg_trg_Down) call DisableTrigger(gg_trg_Mid) set sm=sm+"|cFF0A60FF Only Up|r"+"/" endif
/////////////////ВОТ ОНА КАКАШКО!!!!!1111адын!!! if s=="ar" then set sm=sm+"|cFF0A60FF All Random|r /" loop exitwhen p>=11 if GetPlayerSlotState(Player(p))==PLAYER_SLOT_STATE_PLAYING then set d[p]=CreateUnit(Player(p),TypeHero[GetRandomInt(1,max)],GetStartLocationX(GetPlayerStartLocation(Player(p))),GetStartLocationY(GetPlayerStartLocation(Player(p))),bj_UNIT_FACING) call DisplayTextToPlayer(GetLocalPlayer(),0,0,pcn[p]+" получил случайно "+ GetHeroProperName(d[p])) call RemoveUnit(gg_unit_n00B_0113) call RemoveUnit(gg_unit_n000_0175) set max=max-1 set p=p+1 endif endloop ///////////// И ТУТ КОНЧАЕТСО endif set i=i+2 set i1=i1+2 endloop call DisplayTextToPlayer(GetLocalPlayer(),.0,.0,SubString(sm,0,StringLength(sm)-1)) call DisableTrigger(GetTriggeringTrigger()) endfunction function InitTrig_Mods takes nothing returns nothing local trigger trig=CreateTrigger() call TriggerRegisterPlayerChatEvent(trig,Player(0),"-",false ) call TriggerAddAction(trig,function Trig_Mods_Actions ) set trig=null endfunction
if s=="ar" then set sm=sm+"|cFF0A60FF All Random|r /" loop exitwhen p>=11 if GetPlayerSlotState(Player(p))==PLAYER_SLOT_STATE_PLAYING then set d[p]=CreateUnit(Player(p),TypeHero[GetRandomInt(1,max)],GetStartLocationX(GetPlayerStartLocation(Player(p))),GetStartLocationY(GetPlayerStartLocation(Player(p))),bj_UNIT_FACING) call DisplayTextToPlayer(GetLocalPlayer(),0,0,pcn[p]+" получил случайно "+ GetHeroProperName(d[p])) call RemoveUnit(gg_unit_n00B_0113) call RemoveUnit(gg_unit_n000_0175) set max=max-1 set p=p+1 endif endloop не работает из-за того что выделено желтым. Без него все прекрасно робит