Kawunnia
New Member
- Joined
- Nov 15, 2018
- Messages
- 23
- Reaction score
- 2
Witam otóż mam problem z premium rune używając jej dodaje mi 50pkt na konto ale jest myk taki ze daje to kazdemu kto jest online do konta punkty.
Uzywam ZnoteAAC
Serwer TFS 1.2
To mam dodane do bazy danych
Uzywam ZnoteAAC
Serwer TFS 1.2
Code:
local cfg = {
points = 50,
effect = CONST_ME_GIFT_WRAPS
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isPlayer(cid) then
return false
end
db.query("UPDATE `znote_accounts` SET `points` = `points` + 50 WHERE `account_id`")
doCreatureSay(cid, "You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
doSendMagicEffect(toPosition, cfg.effect)
doRemoveItem(item.uid, 1)
return true
end
To mam dodane do bazy danych
Code:
UPDATE `znote_accounts` SET `points` = `points` + 50 WHERE `account_id`