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

[OTX] - Edit level up script

vicma

New Member
Joined
Jan 14, 2010
Messages
19
Reaction score
1
SCRIPT:

EXPLICATION:

Actually this script works correctly. BUT there is an annoying problem... this part of the script:

("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!" --

Means The X player is the new top level of the server. This white message should appear to all players ONLY when a lower level reach and pass the higher level in level.. Thats how this part of the script should work, but actually it sends this message everytime when the top player gets 1 lvl more, I mean if TOP Player is lvl 200; if the top player gets level 201 all players receive that message again and again (202 203 204) and again because he is still being the top player but that is really annoying...

So I want to know how to edit this script to show this message only when a new player get the first place on level. NOT everytime top player get 1 level.
Help please. If you have question ask please.
Post automatically merged:

I Use OTX or TFS 0.4 8.6
 
Solution
Line 33 change
if newLevel > tonumber(var[2]) then
to
if newLevel > tonumber(var[2]) and getPlayerName(cid) ~= var[1] then
Line 33 change
if newLevel > tonumber(var[2]) then
to
if newLevel > tonumber(var[2]) and getPlayerName(cid) ~= var[1] then
 
Solution
Back
Top