Ghazer
Member
- Joined
- Mar 13, 2009
- Messages
- 350
- Reaction score
- 6
is there anyone who can help me?, i need to take out the function of removing the protecion zone lock in the map changing because its geting buged with the skull system mod i would like to kick all the players on the map changings instead of removing the pz lock
changemap:
changemap:
Code:
local config, new = {
minTownId = 1,
maxTownId = 6
}, 0
function onThink(interval, lastExecution)
for _, pid in ipairs(getPlayersOnline()) do
local town = getPlayerTown(pid)
new = town < config.maxTownId and town + 1 or config.minTownId
doPlayerSetTown(pid, new)
doTeleportThing(pid, getTownTemplePosition(new))
doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
doCreatureAddMana(pid, getCreatureMaxMana(pid))
doBroadcastMessage("Map has been changed! Next map change will be in 30 minutes!", MESSAGE_STATUS_WARNING)
end
db.executeQuery("UPDATE players SET town_id = ".. new ..", posx = 0, posy = 0, posz = 0;")
return true
end
Last edited: