• 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 Trohpy System

imback1

Unknown member
Joined
Jul 11, 2013
Messages
785
Solutions
1
Reaction score
46
Hello

i wants a scripts of trophy on humans i mean when someone kill another one ,find a throphy on his human and when i look on it i find my name/level and his name/level and data too if is it possible
 
Type should be death.
Code:
<event type="death" name="Reward" event="script" value="reward.lua"/>
AHAHAHH doesn't work mm i think teamviewer is only way now? isn't it?
upload all what you made on ur server 0.3.6 and download it on my pc and work with team viewer :S to check it
 
creaturescripts.xml
Code:
<event type="death" name="Reward" event="script" value="reward.lua"/>

login.lua
Code:
registerCreatureEvent(cid, "Reward")

reward.lua
Code:
function onDeath(cid, corpse, deathList)
     if isPlayer(deathList[1]) then
         local item = doAddContainerItem(corpse.uid, 5943, 1)
         doItemSetAttribute(item, "description", "This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1])..".")
         doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You killed " .. getCreatureName(cid) .. ".")
         doSendMagicEffect(getPlayerPosition(deathList[1]), CONST_ME_MAGIC_BLUE)
     end
     return true
end
Save the scripts and restart your server, don't reload.
If you get errors, post them.
 
login.lua
Code:
registerCreatureEvent(cid, "Reward")

where i put this? on scripts? or on creaturescripts folder? btw there is script named login on scripts for account manager

and i tried it on creaturescripts folder and on scripts folder and its same thing nothing

How did you added it, did you restarted the server? Works fine for me (TFS 0.3.6).
yea restarted it and nothing i need you to connect with me on TV
 
Last edited by a moderator:
in login.lua brother
search for this in login.lua
registerCreatureEvent(cid, "ReportBug")
and after it add this
registerCreatureEvent(cid, "Reward")
OMG FINALLY !!! the problem was that i didnt know where can i put registerCreatureEvent(cid, "Reward") i thought that i need to create a new .lua and write it on it :D THX!
 
Back
Top