Here you are
go in your lib folder and add in your function.lua this code:
then go into talkaction/talkactions.xml and post the following:
then in talkactions/scripts create file name removepoint.lua and post the following:
if there any problems i will be glad to help you
Rep Me if it help you
go in your lib folder and add in your function.lua this code:
Lua:
function doRemovePremiumPoints(cid, days)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` - " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end
then go into talkaction/talkactions.xml and post the following:
XML:
<talkaction log="yes" words="/removepoints" access="5" event="script" value="removepoint.lua"/>
then in talkactions/scripts create file name removepoint.lua and post the following:
Lua:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return true
end
local pid = cid
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
sender = getPlayerByNameWildcard(cid)
doRemovePremiumPoints(pid, t[1])
doPlayerSendTextMessage(cid, "You have removed ".. t[1] .." premium points to ".. t[2])
doPlayerSendTextMessage(pid, sender .." just removed you ".. t[1] .." premium points.")
return true
end
if there any problems i will be glad to help you
Rep Me if it help you