Anothai
:3
This is a part off my Global file!
Lemme explain.
First the map changed from 1 to 2
later then it wont change back to 1 from 2.
Do you have an ideas of this? ^^
Add loop or something? :O
And my map changed from 1 to 2 and wont change back to 1!
Lemme explain.
First the map changed from 1 to 2
later then it wont change back to 1 from 2.
Do you have an ideas of this? ^^
Add loop or something? :O
Code:
--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(1,2,3)
cleanMap()
broadcastMessage("CHANGED MAP to Ardgare, CLEAN complet. Next map: Undergroun, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 2)
--load map 2
elseif map_id == 2 then
setGlobalStorageValue(665, os.time()+mapInterval)
doChangeMap(4,5,6)
cleanMap()
broadcastMessage("CHANGED MAP to Underground , CLEAN complet. Next map: Ardgare, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 3)
end
end
And my map changed from 1 to 2 and wont change back to 1!
Code:
--load map 1
if map_id == 1 then
setGlobalStorageValue(665, os.time()+mapInterval)
doChangeMap(1,2,3)
cleanMap()
broadcastMessage("CHANGED MAP to Ardgare, CLEAN complet. Next map: Undergroun, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 2)
--load map 2
elseif map_id == 2 then
setGlobalStorageValue(665, os.time()+mapInterval)
doChangeMap(4,5,6)
cleanMap()
broadcastMessage("CHANGED MAP to Underground , CLEAN complet. Next map: Ardgare, time to next map: " .. mapInterval / 60 .. " minutes")
setGlobalStorageValue(666, 3)
Last edited: