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

If player VIP Loss EXP/ITEMS only 50%

Piltrafa

Active Member
Joined
Nov 10, 2010
Messages
654
Reaction score
29
Its possible that if players got VIP days loss only 50% EXP and ITEMS?

Im using this funcion:
getPlayerVipDays(cid)

Anyone can make a script? if it possible.
Thanks all.
rep+
 
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="viploss" author="C" enabled="yes">
    <event type="login" name="viploss" event="script">
        <![CDATA[
            function onLogin(cid)
                if getPlayerVipDays(cid) > 0 then
                    local f = getConfigValue('deathLostPercent') * 5
                    doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, f)
                    doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, f)
                    doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, f)
                end
                return true
            end
        ]]>
    </event>
</mod>
 
Code:
local rates = {
	PLAYERLOSS_EXPERIENCE,
	PLAYERLOSS_CONTAINERS,
	PLAYERLOSS_ITEMS
}

function onLogin(cid)
	for i = 1, #rates do
		if getPlayerVipDays(cid) >= 1 then
			doPlayerSetRate(cid, i, getConfigValue('deathLostPercent') * 5)
		else
			doPlayerSetRate(cid, i, getConfigValue('deathLostPercent') * 10)
		end
		
		break
	end
	
	return true
end
 
Back
Top