• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[actions]

domelxp

Member
Joined
Mar 1, 2010
Messages
243
Reaction score
5
i need to script :
item who give 200 points to sms shop for who recive this item
. thx
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local points = 1
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 22, "You have received ".. points ..".")
db.executeQuery("INSERT INTO `table` (`cid`, `points`) VALUES ('"..getPlayerGUID(cid).."', '"..points.."');")
return true
end
I do not know much of SQL code, sorry if is not works.
You need to modify the function db.ExecuteQuery,`table`to your players table, and local points to the points to receive.
 
Back
Top