GhostWD
I'm in love with the var_dump()
- Joined
- Jan 25, 2009
- Messages
- 185
- Solutions
- 6
- Reaction score
- 29
Hi there!
I'm wondering why getPlayerRates(cid) returns me freaky number not same which i set by doPlayerSetRate
when i use this script without param and i haven't changed rate its ok but when i change it i recive
1.1499999761581 sword rate
why it is not
1.15 sword rate
is it okay? TFS 0.4
I'm wondering why getPlayerRates(cid) returns me freaky number not same which i set by doPlayerSetRate
Lua:
function onSay(cid, words, param, channel)
local rates = getPlayerRates(cid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, rates[SKILL_SWORD].." sword rate")
if param == 'set' then
doPlayerSetRate(cid, SKILL_SWORD, 1.15)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, getPlayerRates(cid)[SKILL_SWORD].." sword rate")
end
return true
end
when i use this script without param and i haven't changed rate its ok but when i change it i recive
1.1499999761581 sword rate
why it is not
1.15 sword rate
is it okay? TFS 0.4