Slafesko
New Member
- Joined
- Jan 6, 2016
- Messages
- 101
- Reaction score
- 2
Simply i was trying to do doPlayerSetRate(cid, type, value) function to change exp
So i tried it with 2 ways and none of them has worked, what i need to do is when someone get rebirth 1+ his exp downgrade to half
and if this player have rebirth 1+ and Vip his exp change to 0.75
And if player is normal without rebirths and with VIP get
i hope so you understand me :S
Code:
function onLogin(cid)
local reb = getPlayerStorageValue(cid,85987)
local n = getPlayerVipDays(cid)
if reb > 0 and n < 1 then
doPlayerSetRate(cid, SKILL__LEVEL, 0.5)
end
if n > 0 and reb < 1 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 1.5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have got 50% extra exp.")
end
if reb > 0 and n > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 0.75)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've got 50% extra exp.")
end
return true
end
Code:
function onLogin(cid)
local reb = getPlayerStorageValue(cid,85987)
local n = getPlayerVipDays(cid)
if reb > 0 and n < 1 then
doPlayerSetRate(cid, SKILL__LEVEL, 0.5)
elseif n > 0 and reb < 1 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 1.5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have got 50% extra exp.")
elseif reb > 0 and n > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 0.75)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've got 50% extra exp.")
end
return true
end
Code:
if reb > 0 and n < 1 then
doPlayerSetRate(cid, SKILL__LEVEL, 0.5)
Code:
elseif reb > 0 and n > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 0.75)
Code:
elseif n > 0 and reb < 1 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "You have ".. n .." vip days left.")
doPlayerSetRate(cid, SKILL__LEVEL, 1.5)