• 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!

[Script] help in script :p

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
LUA:
function onSay(cid, words, param, channel)
	local v = string.explode(param, ',')
	local player, points = getPlayerByNameWildcard(v[1]), tonumber(v[2])
	return player and points and db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccount(player) .. ";") or doPlayerSendCancel(cid, "Sorry, not possible.")
end

the script is not adding the premium points
:s
 
LUA:
function onSay(cid, words, param, channel)
        local v = string.explode(param, ',')
        local player, points = getPlayerByNameWildcard(v[1]), tonumber(v[2])
        return player and points and db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `name` = '" .. getPlayerAccount(player) .. "';") or doPlayerSendCancel(cid, "Sorry, not possible.")
end
try

you made<< getPlayerAccount(player) >>


so you need to use the<< name>> field not the <<id>> field.
 
Back
Top