• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Players have PZ after mapchange and cant move (warserver) HELP please!

Celsish

New Member
Joined
Apr 6, 2009
Messages
74
Reaction score
0
Hi.
I have war server and it change map every 15 minute but players who just killed someone have PZ when the map is changed and cant move in temple..

so how do i make the pz disappear everytime its mapchange?
 
here you go :)
local config, new = {
minTownId = 1,
maxTownId = 5
}, 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))
end
db.executeQuery("UPDATE players SET town_id = ".. new ..", posx = 0, posy = 0, posz = 0;")
return true



end
 
Lua:
local config, new = {
minTownId = 1,
maxTownId = 5
}, 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))
doRemoveCondition(cid, CONDITION_INFIGHT)
end
db.executeQuery("UPDATE players SET town_id = ".. new ..", posx = 0, posy = 0, posz = 0;")
return true
end
 
its good but have one problem ...
db.executeQuery("UPDATE players SET town_id = ".. new ..", posx = 0, posy = 0, posz = 0;") change position to samples players x=0 y=0 z=0
 
Back
Top