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

Frag Reward not working!

Extrodus

|| Blazera.net ||
Joined
Dec 22, 2008
Messages
2,692
Solutions
7
Reaction score
550
Location
Canada
Hello, My frag reward isn't giving players money when they kill eachother. Here is the script,
function onKill(cid, target)
if isPlayer(target) == TRUE then
if getPlayerIp(cid) ~= getPlayerIp(target) then
loot = 2152
item = doPlayerAddItem(cid,loot,1)
elseif getPlayerName(cid) == getPlayerName(target) then
doPlayerAddItem(cid,loot,1)
else
end
return TRUE
end

Here is the error in console;

[30/09/2010 22:51:04] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/fragreward.lua:11: 'end' expected (to close 'function' at line 1) near '<eof>'
[30/09/2010 22:51:04] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/fragreward.lua)
[30/09/2010 22:51:04] data/creaturescripts/scripts/fragreward.lua:11: 'end' expected (to close 'function' at line 1) near '<eof>'

If anyone could help me out it'd be much appreciated, the players are sort of upset it doesn't work.

Thank you for your time!

Regards,
Extrodus
 
LUA:
local loot = 2152

function onKill(cid, target, lastHit)
    if isPlayer(cid) and isPlayer(target) and lastHit then
        if getPlayerIp(cid) ~= getPlayerIp(target) then
            doPlayerAddItem(cid, loot, 1)
        end
    end
    return true
end
 
Back
Top