Thorn
Spriting since 2013
Hi, look i have a reward medal script but i have 2 errors: 1 is that when a person die the medal is drop anyway (i want to be dropped only when someone kill someone)
and the second thing is that the written thing is bad, is says this:
i want something like:
is an example, but something like that
well here is my reward lua:
oooh and the unjustified part to erase it plz
and if it possible that the reward appears inmediately in your bp instead of inside the dead body 
and the second thing is that the written thing is bad, is says this:
PHP:
00:25 You see a Oscar's Frag Trophy.
It weighs 1.00 oz.
He died at level 154[Unjustified]
i want something like:
PHP:
you see oscar's frag thophy. he was killed by XX
is an example, but something like that
well here is my reward lua:
LUA:
function onDeath(cid, corpse, deathList)
if isPlayer(cid) then
local v = {
target_name = getCreatureName(cid),
target_level = getPlayerLevel(cid) ;
} ;
local reward = doAddContainerItem(corpse.uid, 5785, 1)
doItemSetAttribute(reward, "description", "" ..
( getPlayerSex(cid) == 0 and "She" or "He" ) .. " died at level " .. v.target_level ..
(getCreatureSkullType(cid) <= SKULL_GREEN and "[Unjustified]" or "[Justified]"))
doItemSetAttribute(reward, "name"," " .. v.target_name .. "'s Frag Trophy")
end
return true
end
oooh and the unjustified part to erase it plz
Last edited by a moderator: