Anothai
:3
Help me please got error from this
I've changed map and tried to fix this global too.
I could change map1 to map 2 but later then i got a problem :S
Got error when he will change back to map1!
Got an ideas of this?? Please help me out ^^
I've changed map and tried to fix this global too.
I could change map1 to map 2 but later then i got a problem :S
Got error when he will change back to map1!
Got an ideas of this?? Please help me out ^^
--init war system start
alryInitWarInterval = 0
--map interval in seconds
typicalMapInterval = 10
topInterval = 300
function show_top(show)
local onlineList = getPlayersOnlineList()
local place1 = "--EMPTY--"
local place2 = "--EMPTY--"
for i, uid in ipairs(onlineList) do
if getPlayerFrags(uid) > tonumber(getPlayerFrags(getPlayerByName(place1))) then
place2 = place1
place1 = getPlayerName(uid)
elseif getPlayerFrags(uid) > tonumber(getPlayerFrags(getPlayerByName(place2))) then
place2 = getPlayerName(uid)
end
end
if show == 1 then
broadcastMessage("Best fragers: \n 1. " .. place1 .. " - " .. tonumber(getPlayerFrags(getPlayerByName(place1))) .." frags. \n 2. " .. place2 .. " - " .. tonumber(getPlayerFrags(getPlayerByName(place2))) .." frags.")
setGlobalStorageValue(700, os.time()+topInterval)
else
return "Best fragers: \n 1. " .. place1 .. " - " .. tonumber(getPlayerFrags(getPlayerByName(place1))) .." frags. \n 2. " .. place2 .. " - " .. tonumber(getPlayerFrags(getPlayerByName(place2))) .." frags."
end
end
function loadMap(map_id)
setGlobalStorageValue(667, 0)
--set other time for this round
if getGlobalStorageValue(668) > 0 then
mapInterval = getGlobalStorageValue(668)
setGlobalStorageValue(668, 0)
--use new typical map interval
elseif getGlobalStorageValue(669) > 0 then
mapInterval = getGlobalStorageValue(669)
--use normal map typical interval
else
mapInterval = typicalMapInterval
end
--load map 1
if map_id == 1 then
setGlobalStorageValue(665, os.time()+mapInterval)
doChangeMap(2,3,4)
cleanMap()
broadcastMessage("CHANGED MAP to Ardgare , CLEAN complet. Next map: Underground, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 2)
--load map 2
elseif map_id == 2 then
setGlobalStorageValue(665, os.time()+mapInterval)
doChangeMap(5,6,7)
cleanMap()
broadcastMessage("CHANGED MAP to Venore , CLEAN complet. Next map: Edron, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 3)
end
end
Last edited: