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

Solved Char only, not whole account :/?

WiLDTuRTLE

Member
Joined
Feb 26, 2011
Messages
478
Reaction score
5
Well I got a promotion BOX , it works fine but i noticed that once you used it on one char, you cant use it on another non-promoted char it says "already vip" any way i can make it that it only promote the char and not the account? thanks

Code:
 function onUse(cid, item, frompos, item2, topos)
                        if getPlayerGroupId(cid) ~= 1 then
                                doPlayerSetGroupId(cid, 1)
						doPlayerSetPromotionLevel(cid, 2)
			              doCreatureSay(cid, "You are now VIP!", TALKTYPE_ORANGE_1)
			              doSendMagicEffect(getCreaturePosition(cid), 14)
                                doRemoveItem(item.uid)
                        else
                                doCreatureSay(cid, "You are already VIP!", TALKTYPE_ORANGE_1)
                                return true
                        end
                return 1
                end
 
small change
this one check if the player is promoted or not
so that it will check players' vip only
LUA:
function onUse(cid, item, frompos, item2, topos)
                        if getPlayerPromotionLevel(cid) <= 1 then
                                doPlayerSetGroupId(cid, 1)
						doPlayerSetPromotionLevel(cid, 2)
			              doCreatureSay(cid, "You are now VIP!", TALKTYPE_ORANGE_1)
			              doSendMagicEffect(getCreaturePosition(cid), 14)
                                doRemoveItem(item.uid)
                        else
                                doCreatureSay(cid, "You are already VIP!", TALKTYPE_ORANGE_1)
                                return true
                        end
                return 1
                end
IF NOT WORKING JUST POST AGAIN.
 
small change
this one check if the player is promoted or not
so that it will check players' vip only
LUA:
function onUse(cid, item, frompos, item2, topos)
                        if getPlayerPromotionLevel(cid) <= 1 then
                                doPlayerSetGroupId(cid, 1)
						doPlayerSetPromotionLevel(cid, 2)
			              doCreatureSay(cid, "You are now VIP!", TALKTYPE_ORANGE_1)
			              doSendMagicEffect(getCreaturePosition(cid), 14)
                                doRemoveItem(item.uid)
                        else
                                doCreatureSay(cid, "You are already VIP!", TALKTYPE_ORANGE_1)
                                return true
                        end
                return 1
                end
IF NOT WORKING JUST POST AGAIN.

You are doing it wrong, his VIP is on the second promotion and you are just checking if the player have first promotion :P

BTW, why are you checking/adding the Player Group?
 
Fixed by myself, thanks for the lines though!!

if anyone wants it its,

Code:
function onUse(cid, item, frompos, item2, topos)
                        if getPlayerPromotionLevel(cid) ~= 1 then
						doPlayerSetPromotionLevel(cid, 2)
			              doCreatureSay(cid, "You are now VIP!", TALKTYPE_ORANGE_1)
			              doSendMagicEffect(getCreaturePosition(cid), 14)
                                doRemoveItem(item.uid)
                        else
                                doCreatureSay(cid, "You are already VIP!", TALKTYPE_ORANGE_1)
                                return true
                        end
                return 1
                end
 
Last edited:
Back
Top