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

VIP Players

Epic

Banned User
Joined
Mar 30, 2009
Messages
1,142
Reaction score
1
Location
Barcelona (Spain)
How can i make the players that have used the "Vip Medal" item, have a colored text above him saying "Vip player!" forever? Thanks :D
 
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 5785 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! VIP Player! Forever!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,'You are not a VIP.')
doRemoveItem(item.uid, 1)
end
else
end
return 1
end


Edit your Vip item.lua in actions
 
Edit your Vip item.lua in actions

Code:
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 5785 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
doCreatureSay(cid, "Another Noob that have donated and can accest Vip Island :D Jk!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,'You are not a donator.')
doRemoveItem(item.uid, 1)
end
else
end
return 1
end

I already have that, but the thing i want it's this:

When some have recieved that item, over his head, to have always a colored text that says "Vip player". Like a banner in his head. You know what i mean? :D
 
Client-sided, I believe.
Unless you're talking about it saying "VIP Player!" when you use it, as an animation.
Otherwise, Client-Sided.

Red
 
lol... there must be a code... u think what Epic is trying to say is that if anyone is a vip player, a text will appear on him (Capture the flag, when someone has the flag it says "Flag!" on the player) saying "Vip!"
 
You can start an onThink event that will sendAnimatedText over the vip player like.... each second?
 
vip medal item id 5785.
Code:
-- Credits StreamSide, Empty and Kaorus
function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getCreatureName(cid)
    -- if getPlayerStorageValue(cid,11551) < 1 then
        if getPlayerLevel(cid) > 1 then
            getPlayerStorageValue(cid, 11551)
		doPlayerSetTown(cid, 16)
            doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
            doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
            setPlayerStorageValue(cid, 11551, (getPlayerStorageValue(cid,11551) + [COLOR="red"][B]15)) --- vip days![/B][/COLOR]
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
            doRemoveItem(item.uid, 1)
        end
    -- else
    --    doPlayerSendCancel(cid,"You are already a donator.")
    -- end    
return TRUE
end


action id 11551.
Code:
-- Credits StreamSide and Empty
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
		if (item.actionid == 11551 and getPlayerStorageValue(cid,11551) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			else
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on the WEB.")
			return TRUE
	end
	return FALSE
end
 
Last edited:
Now i edited my script so u can only change check it .. and my script is when u use it u get a new town..= vip island :) REP?

for i reslase it XD and help..
 

PHP:
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 5785 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,'You are not a donator.')
doRemoveItem(item.uid, 1)
end
else
end
return 1
end


the msg doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP! You can now enter the VIP-area and use unique features!. ",
 
That wasn't what he wanted... you know 'Capture the Flag', when you have the flag, a text appears on you saying "FLAG!"... that's what he wants, but instead of 'flag!' it says 'vip!' on VIP player...
 
1 Create a file named vip.lua in creaturescripts/scripts
Code:
function onThink(cid, interval, lastExecution)
playerpos = getPlayerPosition(cid)
if getPlayerStorageValue(cid, 11551) == 1 then
doSendAnimatedText(playerpos, "Vip", math.random(1,254))
doSendMagicEffect(playerpos, math.random(12,14))
end
	return TRUE
end

2 Go to your creaturescripts.xml and add the following line:
Code:
    <event type="think" name="Vip" event="script" value="vip.lua"/>
3 Go to your creaturescripts/login.lua and add this line whereever you want:
Code:
registerCreatureEvent(cid, "Vip")
Enjoy
 
Back
Top