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

Lua Frag Reward BUG!

Sebaso

New Member
Joined
Jun 28, 2009
Messages
40
Reaction score
0
Location
Poland
Hello everybody.. I've got a big problem with script frag reward. I want if i will kill somebody and i will have got frag to get automatic egg.. But my problem is if i hit someone and no kill him and i too get egg... My script

Code:
function onKill(cid, target, lastHit)
    if (isPlayer(target) == TRUE) then
        doPlayerAddItem(cid, 4850, 1)
    end
    return true
end
 
Code:
function onKill(cid, target, lastHit)
    if isPlayer(target)[B][COLOR="Red"] and lastHit[/COLOR][/B] then
        doPlayerAddItem(cid, 4850, 1)
    end
    return true
end
 
can you give me file xml to this script because i dont have enyone error but i dont get reward for kill player:thumbup:


my creaturescripts.xml

<event type="kill" name="reward" event="script" value="fragreward.lua"/>
 
Last edited:
Try adding this line to your login.lua in the creaturescripts directory:

Code:
	registerCreatureEvent(cid, "reward")
 
Back
Top