Sun
Knowledge is power - France is bacon
- Joined
- Jan 26, 2015
- Messages
- 334
- Solutions
- 22
- Reaction score
- 249
Using tfs 0.4
Been trying to workout a script that makes item xxxx appear in the players corpse when they die.
I found a script which supposedly works for tfs 1.0
I've wasted a lot of time trying to adjust it to work for 0.4 but I honestly don't know which functions to use, or if it should be registered in login.lua(everytime I do it the corpse doesn't even appear).
I'd really appreciate if someone could help me with this.
Ty in advance //Cade
Been trying to workout a script that makes item xxxx appear in the players corpse when they die.
I found a script which supposedly works for tfs 1.0
I've wasted a lot of time trying to adjust it to work for 0.4 but I honestly don't know which functions to use, or if it should be registered in login.lua(everytime I do it the corpse doesn't even appear).
Code:
function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
local container = Container(corpse)
if not Player(killer) or not container then
return
end
container:addItem(math.random(100) > 50 and 2671 or 2229, 1)
end
I'd really appreciate if someone could help me with this.
Ty in advance //Cade