Bassam421
Lockout RPG/PVP Owner
Hello guys i need a script with this in it
And i want the script to give the Pk'er honor points in the database, and he if he dies he will lose one. can some1 do it?
or something like this :
Lua:
db.executeQuery('UPDATE accounts SET honor_points=honor_points+'.. v[2] ..' WHERE id=' .. getPlayerAccountId(cid))
And i want the script to give the Pk'er honor points in the database, and he if he dies he will lose one. can some1 do it?
or something like this :
Lua:
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
local Info = db.getResult("SELECT `players` FROM `honor_points` WHERE `player_id` = " .. getPlayerGUID(cid) .. "-1")
if Info:getID() ~= LUA_ERROR then
local amount= Info:getDataInt("honor_points")
Info:free()
return amount
end
return LUA_ERROR
end
function setPlayerReborn(cid, value)
db.executeQuery("UPDATE `players` SET `honor_points` = " .. value .. " WHERE `id` = " .. getPlayerGUID(cid) .. "+1")
end
Last edited: