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

Help script dont give money onkill dont working

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
283
Solutions
3
Reaction score
123
Location
Exive me
GitHub
none
This script dont give money what is the problem?


PHP:
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,3)
else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Tu no puedes recivir dinero al matar con tu misma IP.")
        end
end
        return TRUE
end
 
you must add this in creaturescript.xml
Code:
<event type="kill" name="killl" event="script" value="m.lua"/>

and this in creaturescript-->scripts-->login.lua (before the return true in end of script)
Code:
registerCreatureEvent(cid, "killl")
 
Back
Top