• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Say VIP on top of player, If VIP.

SnowFox

New Member
Joined
May 18, 2008
Messages
264
Reaction score
0
Hello OTLand,

Im looking for a script so that if X Player has VIP then every 10 seconds, it will say VIP! with a nice effect on top of them.

Thanks
 
What kind of vip system is it?

I made for this system: http://otland.net/f163/best-vip-system-functions-vip-account-30286/
I atleast think I did xD

ServerDirectory/mods/VIP_Effect.xml
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="VIP_Effect" version="1.0" author="Slaktaren" contact="my ass" enabled="yes">
	
	<globalevent name="VIP_Effect" interval="10" event="script"><![CDATA[
		
		if isVip(getAccountByName(getPlayerName(cid))) then
			doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_BLUE)	
		end
	return TRUE
	]]></event>
</mod>
 
Last edited:
@up: well, I cannot see part where cid is declared xD
you should loop on all online players and instead of cid use current player from array

btw, I am the ninja ;f
 
LUA:
function onThink(interval, lastExecution, thinkInterval)
local msg, storage, color = "VIP!", 45687, 70
	for _, pid in ipairs(getPlayersOnline()) do
		if getPlayerStorageValue(pid, storage) > 0 then
			doSendAnimatedText(getThingPos(pid), msg, color)
	end end
	return true
end
 
so
LUA:
function onThink(interval, lastExecution, thinkInterval)
local msg, storage, color = "VIP!", 45687, 70
        for _, pid in ipairs(getPlayersOnline()) do
                if isPlayerVip(pid) then
                        doSendAnimatedText(getThingPos(pid), msg, color)
        end end
        return true
end
 
Thanks it works, sorry im really noob at scripting but is there a way to make it have a cake effect on them aswell?
 
Code:
function onThink(interval, lastExecution, thinkInterval)
local msg, color, effect = "VIP!", 70, 51
	for _, pid in ipairs(getPlayersOnline()) do
		if isPlayerVip(pid) then
			doSendAnimatedText(getThingPos(pid), msg, color)
			doSendMagicEffect(getThingPos(pid), effect)
		end
	end
return true
end
 
Back
Top