Guten Tag Community, ich habe wieder ein Problem mit meinem Redo befehl. Ich habe folgendes Problem: Ich schreibe ganz normal /redo in den Chat und dort wird auch der Text angezeigt. Aber die Map wird nicht als Redo gesettet. Ich hoffe ihr könnt mir helfen. Habe gerade auch nen Blackout *wacko*
Lua
function redoforadmin(thePlayer)
if thePlayer then
local currentMap = exports.mapmanager:getRunningGamemodeMap()
local account = getPlayerAccount(thePlayer)
local mapQueue = {}
if (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("Admin"))) or (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("Leader"))) or (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("SuperModerator"))) or (isObjectInACLGroup("user." ..getAccountName(account), aclGetGroup("Console"))) then
local mapName = getMapName(currentMap)
if #mapQueue ~= 0 then
for i=#mapQueue,1 do
mapQueue[i+1] = mapQueue[i]
end
mapQueue[1] = mapName
triggerEvent("onUserpanelWantNextmap",getRootElement(),mapQueue[1])
end
redo[mapName] = setTimer(function(mapName) redo[mapName] = false end,900000,1,mapName)
outputChatBox("#ff0000[Admin-Redo]#FFFFFF " ..getPlayerName(thePlayer).. " #ffffffadded this map to map queue as redo!", getRootElement(), 0, 240, 0, true)
callClientFunction(getRootElement(),"updateMapQueue",mapQueue)
refreshScoreboard(thePlayer)
mapTimer[mapName] = setTimer(resetMapTimer,60000*35,1,mapName)
if #mapQueue == 1 then
triggerEvent("onUserpanelWantNextmap",getRootElement(),mapName)
end
callClientFunction(getRootElement(),"setMapQueue",mapQueue)
end
else
outputChatBox("This option is just for admins!",thePlayer,255,255,255,true)
end
end
addCommandHandler("redo",redoforadmin)
Alles anzeigen