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

bounty_hunters help

GoalTV

NANI?!
Joined
Jul 23, 2011
Messages
588
Reaction score
53
hello I have problem I try look over google and find anything to fix but dident work I tryd add diffrents mysql codes but dident work
this the error
mysql_real_query(): SELECT * FROM `bounty_hunters` WHERE `sp_id` = 22 AND `killed` = 0; - MYSQL ERROR: Unknown column 'sp_id' in 'where clause' (1054)


and this is the script

Code:
function onKill(cid, target) 
if isPlayer(target) == TRUE then 
pid = cid 
pid2 = getPlayerGUID(target)
    local result_plr = db.getResult("SELECT * FROM `bounty_hunters` WHERE `sp_id` = "..pid2.." AND `killed` = 0;")
    if(result_plr:getID() ~= -1) then
    prize = tonumber(result_plr:getDataInt("prize"))
    bid = tonumber(result_plr:getDataInt("id"))
	result_plr:free()
    else
    prize = 0
	bid = 0
    end 
if (bid ~= 0 and prize ~= 0 and not(getTileInfo(getCreaturePosition(cid)).pvp)) then
    db.executeQuery("UPDATE `bounty_hunters` SET `killed` = 1, `k_id`="..getPlayerGUID(cid)..", `kill_time` = " .. os.time() .. " WHERE `id` = "..bid..";")
	doPlayerAddMoney(cid,prize)
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE,"[Bounty System]: You killed "..getPlayerName(target).."! You gained the bounty that was put on his/her head!")
	doSendMagicEffect(getCreaturePosition(cid), 27) 
	doBroadcastMessage("[Bounty System]: "..getPlayerName(cid).." killed "..getPlayerName(target).." and gained the bounty! ("..prize.." gold)", MESSAGE_EVENT_ADVANCE)
end
end return TRUE
end

- - - Updated - - -

ok closed thread I just deleted the script
 
Back
Top