• 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!

Level check event tfs 1.2 movement

jurass

New Member
Joined
Jul 7, 2015
Messages
98
Reaction score
3
Location
Poland
Code:
local t = {
waitingroom = {x = 32300, y = 32026, z = 12},
}

function onStepIn(cid, item, position, lastPosition)

doTeleportThing(cid, t.waitingroom)
doSendMagicEffect(t.waitingroom, CONST_ME_TELEPORT)



if (getGlobalStorageValue(25002) < 0) then
setGlobalStorageValue(25002,1)
setPlayerStorageValue(cid, 25001, 1)
broadcastMessage("Player "..getCreatureName(cid).." joined Last man standing event!", MESSAGE_STATUS_WARNING)

else

setGlobalStorageValue(25002,getGlobalStorageValue(25002)+1)
setPlayerStorageValue(cid, 25001, 1)

broadcastMessage("Player "..getCreatureName(cid).." joined Last man standing event!", MESSAGE_STATUS_WARNING)
end
end

how change to only 150 + level can join teleport ?:)
help :)
 
Add:
Code:
local player = Player(cid)
if not player then
    return false
end
if (player:getLevel() < 150) then
       player:sendTextMessage(MESSAGE_INFO_DESCR, 'You need level 150 to join this event.')
       player:teleportTo(lastPosition, true)
       return false
end
After:
Code:
function onStepIn(cid, item, position, lastPosition)
 
Last edited:
Back
Top