Monomalo00
http://leiends.ml/
- Joined
- Nov 13, 2010
- Messages
- 120
- Solutions
- 1
- Reaction score
- 4
Hii! Any script so that when you give him a scroll, you get "X" premium points in shop? +REP
local points = 30 -- amount of premium points
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 30 Premium Point")
doRemoveItem(item.uid)
end
return true
end
this one adds 30 premium points to your account in use
Code:local points = 30 -- amount of premium points function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(cid) == TRUE then local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid) db.executeQuery(Sql) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 30 Premium Point") doRemoveItem(item.uid) end return true end
local points = 30 -- amount of premium points
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 30 Premium Point")
doRemoveItem(item.uid)
end
return true
end
<action itemid="123" script="points.lua"/>
<action itemid="123" event="script" value="points.lua"/>