Exedion
Active Member
- Joined
- Jun 11, 2007
- Messages
- 628
- Reaction score
- 30
Hello to all in otland! well, i have some time without post anything in this forum, but i need professional help ^^ i'm making my own VIP System for my coming soon distro, but i don't have experience with that system... i'm making one idea for the exp stages with your player status, example:
- if your player is free account, the exp stage work normaly for you
- if your player have premium account, will add +1 to your exp stage
[premium exp stage = 5+1 = 6]
- if your player is free account with vip feature, will add +1 to your exp stage
[normal+vip exp stage = 5+1 = 6]
- if you have premium account and vip feature, the player exp stage will add +2
[premium+vip exp stage = 5+2 = 7]
this will affect all exp stages, example:
[level 8 to level 20 = 5 exp stage +2 premium-vip stage = 7]
[level 20 to level 30 = 4 exp stage +2 premium-vip stage =6]
i make one script and one function for this, i think no have error but when i trie login in the world, the player logout at the same time!
take a look of the script:
Version 1.0
Version 2.0
Function
what is wrong?
my vip system is based with groupid, the groupid 2 have vip privilegies and is the checking base for vip areas, but i need a script (don't know how make) with a storageValue, the value is the time when the player make vip, and when the player login, the script compare the storageValue time, with actually time, when passed one month, the script chague the groupid of the player to 1 (normal player), can help?
- if your player is free account, the exp stage work normaly for you
- if your player have premium account, will add +1 to your exp stage
[premium exp stage = 5+1 = 6]
- if your player is free account with vip feature, will add +1 to your exp stage
[normal+vip exp stage = 5+1 = 6]
- if you have premium account and vip feature, the player exp stage will add +2
[premium+vip exp stage = 5+2 = 7]
this will affect all exp stages, example:
[level 8 to level 20 = 5 exp stage +2 premium-vip stage = 7]
[level 20 to level 30 = 4 exp stage +2 premium-vip stage =6]
i make one script and one function for this, i think no have error but when i trie login in the world, the player logout at the same time!
take a look of the script:
Version 1.0
Code:
stages = {normal = 0}, {premium = 1}, {vip = 2}
function onLogin(cid)
if isPlayer == TRUE and isPremium == FALSE and isVIP == FALSE then
exp = stages.normal
elseif isPlayer == TRUE and isPremium == TRUE and isVIP == FALSE then
exp = stages.premium
elseif isPlayer == TRUE and isPremium == FALSE and isVIP == TRUE then
exp = stages.premium
elseif isPlayer == TRUE and isPremium == TRUE and isVIP == TRUE then
exp = stages.vip
end
return setPlayerExtraExpRate(cid, exp)
end
Version 2.0
Code:
function onLogin(cid)
local normal = 0
local premium = 1
local vip = 2
if isPlayer == TRUE and isPremium == FALSE and isVIP == FALSE then
setPlayerExtraExpRate(cid,normal)
elseif isPlayer == TRUE and isPremium == TRUE and isVIP == FALSE then
setPlayerExtraExpRate(cid,premium)
elseif isPlayer == TRUE and isPremium == FALSE and isVIP == TRUE then
setPlayerExtraExpRate(cid,premium)
elseif isPlayer == TRUE and isPremium == TRUE and isVIP == TRUE then
setPlayerExtraExpRate(cid,vip)
else
return
end
end
Function
Code:
function isVIP(cid)
if(isPlayer(cid) == FALSE) then
debugPrint("isVIP: Player not found.")
return false
end
return (isInArray({2}, getPlayerGroupId(cid)) == TRUE)
end
what is wrong?
my vip system is based with groupid, the groupid 2 have vip privilegies and is the checking base for vip areas, but i need a script (don't know how make) with a storageValue, the value is the time when the player make vip, and when the player login, the script compare the storageValue time, with actually time, when passed one month, the script chague the groupid of the player to 1 (normal player), can help?
Last edited: