Open Kaczynski34 opened 8 years ago
Wogóle logujesz się na konto? Podaj ewentualne błędy z DB3 (/debugscript 3), oraz wklej oryginalną zawartość https://github.com/lpiob/MTA-XyzzyRP/blob/master/resources/%5BXyzzyRP%5D/lss-core/commands_misc.lua.
Możesz napisać mi te range przez te Commands_misc.
Proszę oto to co mam napisane w commands_misc.lua --[[ @author Lukasz Biegaj wielebny@bestplay.pl @author Karer karer.programmer@gmail.com @author WUBE wube@lss-rp.pl @copyright 2011-2013 Lukasz Biegaj wielebny@bestplay.pl @license Dual GPLv2/MIT ]]--
function cmd_admins(plr) local supporterzy={} local admini={} for i,v in ipairs(getElementsByType("player")) do if (isAdmin(v)) then local t local login=getElementData(v,"auth:login") if (login) then t=login.."("..getElementData(v,"id")..")" --[[ if (getElementData(v,"pmoff")) then t=login.."(-)" else t=login.."("..getElementData(v,"id")..")" end ]]-- table.insert(admini,t) end
--[[ if (getElementData(v,"pmoff")) then t=login.."(-)" else t=login.."("..getElementData(v,"id")..")" end ]]--
end outputChatBox("Admini:", plr, 100,0,0) if (#admini>0) then outputChatBox(" " .. table.concat(admini,", "), plr) else outputChatBox(" brak", plr) end
outputChatBox("Support:", plr, 100,100,255) if (#supporterzy>0) then outputChatBox(" " .. table.concat(supporterzy,", "), plr) else outputChatBox(" brak", plr) end end addCommandHandler("admins", cmd_admins, false, false)
local function outputChatBoxSplitted(text, target, c1,c2,c3, ca) if (string.len(text)<128) then outputChatBox(text, target, c1,c2,c3,ca) return end local t="" for i,v in string.gmatch(text,"(.)") do if (string.len(t)>0 and string.len(t)+string.len(i)>=128) then outputChatBox(t, target, c1,c2,c3,ca) t=" " end t=t..i end if (string.len(t)>0 and t~=" ") then outputChatBox(t, target, c1,c2,c3,ca) end
end
addCommandHandler("losowanie",function(player,cmd,yes,no) if (not yes) or (not no) then outputChatBox("(( /losowanie [JEZELI TAK] [JEZELI NIE] ))",player) return end local rand = math.random(1,2) if rand==1 then --yes message = yes else--no message = no end local character = getElementData(player,"character") if (not character) then outputChatBox("Najpierw dołącz do gry", player, 255, 0, 0,true) return end local x,y,z = getElementPosition(player) exports["lss-admin"]:gameView_add("IC " .. character.imie .. " " .. character.nazwisko .. "/"..getPlayerID(player)..": /do - /losowanie " .. message) local strefa = createColSphere(x,y,z,30) local gracze = getElementsWithinColShape(strefa, "player")
end)