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

GlobalEvent VIP Effect if person ghost it don't shows!

H4CK3R

'_'
Joined
Sep 24, 2011
Messages
592
Reaction score
32
Location
/root/sys/class/tty/
Hello otlanders,
Alot of ppls requested VIP Effect and if person is ghost it don't shows!

goto data/globalevents/scripts and create vipEffect.lua

Code:
function onThink(interval, lastExecution)
         for _, name in ipairs(getOnlinePlayers()) do
         local cid = getPlayerByName(name)
               if not isPlayerGhost(cid) and getPlayerVipDays(cid) >= 1 then
                  doSendMagicEffect(getPlayerPosition(cid), 27)
                  doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_RED)
               end
         end
         return true
end

and goto data/globalevents and open globalevents.xml and put this line

Code:
<globalevent name="vipEffect" interval="3" script="vipEffect.lua"/>

Credits goes to PhoOwned!
 
the for statement and the table is useless to have, it could just be like this

Lua:
function onThink(interval)
    if isPlayerGhost(cid) or getPlayerVipDays(cid) == 0 then
    return false
    else
        doSendMagicEffect(getPlayerPosition(cid), 27)
        doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_RED)
    end
    return true
end
 
Last edited:
Back
Top