strutZ
Australian OT Member {AKA Beastn}
- Joined
- Nov 16, 2014
- Messages
- 1,393
- Solutions
- 7
- Reaction score
- 552
Hey guys,
I have an item which will grant the player x2 exp rate when they use it. Here is the code.
It worked fine on tfs 1.1 ORTS 10.41 but all i have done is used the latest tfs 1.1 recompiled and using ORTS 10.76 and the exp rate doesn't apply? has something changed that i cant seem to find? (Guessing a function or something in player.cpp?) Any help would be awesome tah
I have an item which will grant the player x2 exp rate when they use it. Here is the code.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
if player:getStorageValue(1234) >= os.time() then
player:say('You already have double exp!', TALKTYPE_MONSTER_SAY)
return true
end
player:setStorageValue(1234, os.time() + 86400)
Item(item.uid):remove(1)
player:say('Your 24 hours of double XP has started!', TALKTYPE_MONSTER_SAY)
return true
end
function Player:onGainExperience(source, exp, rawExp)
if self:getStorageValue(1234) >= os.time() then
exp = exp * 2
end
return exp
end
It worked fine on tfs 1.1 ORTS 10.41 but all i have done is used the latest tfs 1.1 recompiled and using ORTS 10.76 and the exp rate doesn't apply? has something changed that i cant seem to find? (Guessing a function or something in player.cpp?) Any help would be awesome tah