• 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 Red Skull Problem

Dawg

Member
Joined
Mar 23, 2014
Messages
180
Reaction score
22
I made it so when players die they don't drop any items... So when they die with a red skull, they're still not dropping items, which is a problem :p

All I've done is added this to my login.lua:
Code:
doSetCreatureDropLoot(cid, false)

I still want people to not drop anything when they die normally, but I want them to lose all of their items when they die with a red skull, just like normal.

Anyone got any ideas?
Thanks :)
 
I made it so when players die they don't drop any items... So when they die with a red skull, they're still not dropping items, which is a problem :p

All I've done is added this to my login.lua:
Code:
doSetCreatureDropLoot(cid, false)

I still want people to not drop anything when they die normally, but I want them to lose all of their items when they die with a red skull, just like normal.

Anyone got any ideas?
Thanks :)

Code:
if getPlayerSkullType(cid) < SKULL_RED then
    doSetCreatureDropLoot(cid, false)
else
    doSetCreatureDropLoot(cid, true)
end

This kinda fix it, but you have to do an onKill creaturescript to set de creature drop loot back to true when a player gets red skull, otherwise he won't drop loot it until he logout and login.
 
Code:
if getPlayerSkullType(cid) < SKULL_RED then
    doSetCreatureDropLoot(cid, false)
else
    doSetCreatureDropLoot(cid, true)
end

This kinda fix it, but you have to do an onKill creaturescript to set de creature drop loot back to true when a player gets red skull, otherwise he won't drop loot it until he logout and login.
Where do I put this script?
 
onPrepareDeath creaturescript
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getPlayerSkullType(cid) < SKULL_RED then
  doSetCreatureDropLoot(cid, false)
else
  doSetCreatureDropLoot(cid, true)
end
return true
end
 
onPrepareDeath creaturescript
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getPlayerSkullType(cid) < SKULL_RED then
  doSetCreatureDropLoot(cid, false)
else
  doSetCreatureDropLoot(cid, true)
end
return true
end
works perfectly :)
 
Back
Top