• 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.lua Script

XenoriaServer

New Member
Joined
May 29, 2018
Messages
10
Reaction score
1
Hello guys, I'm using this vip script

-- Credits StreamSide and Empty
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid,11551) < 1 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11551)
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) + 15))
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



The problem is when you use the vip medal, only the player who used it becomes vip, and I want that all account's players becomes vip in the same account. For example, I have two characters in my Account: Otland 1, and otland2. If I use vip medal in Otland 1, I cannot enter in vip area with Otland 2, but yes with Otland 1. How can I change this?
 
The problem is when you use the vip medal, only the playerwho used it becomes vip, and I want that all account's players becomes vip in the same account. For example, I have two characters in my Account: Otland 1, and otland2. If I use vip medal in Otland 1, I cannot enter in vip area with Otland 2, but yes with Otland 1. How can I change this?
The question you asked is the answer. Instead of assigning a storage to the player you should assign it to the account. Then you'll need a way to reference the account rather than the player for anything VIP related. Doing it this way makes it less of a headache because what if the player creates another character on the same account?
 

Similar threads

Back
Top