темы если че такой не нашел :/ дело кароче такое,эт скрип для мульти,но все равно,мож кто знает че тут делаеца в камандах,я немного разабрал,но пока чет нече не понятно.спс :dedok:
function LR(x) LandReinforcement(x) end function Rad(x) local z = RandomInt(x) return z end function Inital_Reinf() for i = 0, max_player do if IsPlayerPresent(i) == 1 then if Init_count < max_init then if (GetNUnitsInScriptGroup(i + 1) + GetNUnitsInScriptGroup((i + 1) * 10)) < min_init then pre_lr = (i + 1) * 10 LR(pre_lr) Init_count = Init_count + 1 end end end end end function Check_Player() local sas = 0 local sae = sps - 1 local sbs = sps local sbe = max_player -- Vorschleife seite_d = 0 while sas <= sae do if IsPlayerPresent(sas) == 1 then seite_d = seite_d + 1 end sas = sas + 1 end seite_u = 0 while sbs <= sbe do if IsPlayerPresent(sbs) == 1 then seite_u = seite_u + 1 end sbs = sbs + 1 end -- Vorschleife Ende sas = 0 sae = sps - 1 sbs = sps sbe = max_player tmpd = 1000 tmpu = 1000 for z = 0, max_player do if IsPlayerPresent(z) == 0 then if z < sps then if seite_d > 0 then while sas <= sae do if IsPlayerPresent(sas) == 1 then if GetNUnitsInPlayerUF(sas) < tmpd then tmpd = GetNUnitsInPlayerUF(sas) min_ply_d = sas end end sas = sas + 1 end sp_min_d = min_ply_d + 1 reinf_d = sp_min_d * 100 + std_reinf LR(reinf_d) end else if seite_u > 0 then while sbs <= sbe do if IsPlayerPresent(sbs) == 1 then if GetNUnitsInPlayerUF(sbs) < tmpu then tmpu = GetNUnitsInPlayerUF(sbs) min_ply_u = sbs end end sbs = sbs + 1 end sp_min_u = min_ply_u + 1 reinf_u = sp_min_u * 100 + std_reinf LR(reinf_u) end end end end std_reinf = std_reinf + 1 if std_reinf > max_reinf then std_reinf = 0 end end function factory() local sw = 0 local spa = 120 local spb = 130 for n = 0, max_player do if sw == sps then sw = 0 end if IsPlayerPresent(n) == 1 then if (GetNUnitsInArea(n, "office_1") > 0) and (GetObjectHPs(1000) > 100 ) and (GetObjectHPs(1100 + sw) > 100 ) then if Office1[n] == reinf_fac then LR(spa + Rad(rd)) Office1[n] = 0 end Office1[n] = Office1[n] + 1 end if (GetNUnitsInArea(n, "office_2") > 0) and (GetObjectHPs(2000) > 100 ) and (GetObjectHPs(2100 + sw) > 100 ) then if Office2[n] == reinf_fac then LR(spb + Rad(rd)) Office2[n] = 0 end Office2[n] = Office2[n] + 1 end end sw = sw + 1 spa = spa + 100 spb = spb + 100 end end function factory_inf() local sw = 0 local spa = 140 local spb = 150 for m = 0, max_player do if sw == sps then sw = 0 end if IsPlayerPresent(m) == 1 then if (GetNUnitsInArea(m, "office_3") > 0) and (GetObjectHPs(3000) > 100 ) and (GetObjectHPs(3100 + sw) > 100 ) then if Office3[m] == reinf_fac then LR(spa) Office3[m] = 0 end Office3[m] = Office3[m] + 1 end if (GetNUnitsInArea(m, "office_4") > 0) and (GetObjectHPs(4000) > 100 ) and (GetObjectHPs(4100 + sw) > 100 ) then if Office4[m] == reinf_fac then LR(spb) Office4[m] = 0 end Office4[m] = Office4[m] + 1 end end sw = sw + 1 spa = spa + 100 spb = spb + 100 end end function Reinf() local SC_ID = 100 local num = {} for y = 0, max_player do if IsPlayerPresent(y) == 1 then num[y] = SC_ID + std_reinf LR(num[y]) end SC_ID = SC_ID + 100 end RunScript("Check_Player",20000,1) end function Init() max_reinf = 5 -- Maximale Verstдrkungen max_player = 4 -- Maximale Spieler Zahl max_init = 4 -- Wieviel Initial Verstдrkung kommen soll min_init = 4 -- Ab wann Initial Verstдrkung kommt reinf_fac = 0 -- Bis wie weit gezдhlt wird rd = 3 -- Random for Factory ------------------------------------------------------- -- Nicht diesen Block дndern -- Not change the block -- sps = max_player / 2 std_reinf = 0 max_player = max_player - 1 Init_count = {} Office1 = {} Office2 = {} Office3 = {} Office4 = {} for e = 0, max_player do Init_count[e] = 0 Office1[e] = 0 Office2[e] = 0 Office3[e] = 0 Office4[e] = 0 end ------------------------------------------------------- RunScript("Info0", 10000) RunScript("Info1", 20000) RunScript("Info2", 30000) RunScript("Info3", 50000) RunScript("Info4", 60000) RunScript("Inital_Reinf",30000) RunScript("Reinf",600000) --600000-- -- RunScript("factory",12500) -- RunScript("factory_inf",10000) end