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

Solved Function onKill dont work.

medium

New Member
Joined
Nov 2, 2011
Messages
54
Reaction score
0
I kill enemy player and i dont give soul and i dont give Message :
Code:
function onKill(cid, target, lastHit)

if isPlayer(target) == TRUE and isPlayer(cid) == TRUE then 
doPlayerAddSoul(cid, 5)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "+5 soul for kill " .. getCreatureName(target):lower())
end
return true
end
Code:
<event type="kill" name="soulpozabiciu" event="script" value="soulpozabiciutypa.lua"/>
Path is good. Please help me!
 
In creaturescripts/scripts/login.lua, add this line behind the others.
Code:
    registerCreatureEvent(cid, "soulpozabiciu")
 
Yes, seriously thank you. I couldn't use ANY functionality of the onKill function. This should be added to documentation somewhere, it has been a nightmare trying to find a solution.
 
Back
Top