Kouki
Member
- Joined
- Feb 5, 2016
- Messages
- 67
- Solutions
- 4
- Reaction score
- 13
Hey guys, I try to make skill points scroll ( custom skills ), i have table in db "skill_point" but when i use scroll i got bugged 0 points even if i have some points. Someone can help me? TFS 0.4
Lua:
local points = 1
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
db.executeQuery("UPDATE 'players' SET 'skill_points' = 'skill_points' + "..points.." where id="..getPlayerNameByGUID(guid))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have "..points.." Skill Points")
doRemoveItem(item.uid)
end
return true
end