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

Fragereward

lol94

Loler
Joined
Dec 23, 2008
Messages
764
Reaction score
55
Location
Mexico
Hello Otland! well my idea is a script when you kill a person you get 100 gps.. but i think is not working

Code:
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)

end
        return TRUE
end

Code:
[02/02/2011 15:08:48] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/fragreward.lua:11: 'end' expected (to close 'function' at line 1) near '<eof>'
[02/02/2011 15:08:49] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/fragreward.lua)
[02/02/2011 15:08:49] data/creaturescripts/scripts/fragreward.lua:11: 'end' expected (to close 'function' at line 1) near '<eof>'

Code:
	<event type="kill" name="FragReward" event="script" value="fragreward.lua"/>

Thank you so much i will rep++ you if you help me :)
 
LUA:
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)
        return TRUE
end
 
LUA:
function onKill(cid, target)
	if isPlayer(target) == TRUE then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
			doPlayerAddItem(cid,2152,100)
		end
	end
	return TRUE
end


kind regards, Evil Hero.
 
Back
Top