Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
if you do this the player will never be able to log back in.
onEquip function executes when the player logs in, if you make them die when they equip it they will relog and it will execute again, causing infinite death.
more than how to fix this im just wondering like why? i would love to know whats the purpose behind this idea like "here take this ring now die" like lol wtf?
function onEquip(player, item, slot, isCheck)
-- remove the item before we kill them
item:remove()
-- kill the player
player:addHealth(-player:getMaxHealth())
return true
end
if you do this the player will never be able to log back in.
onEquip function executes when the player logs in, if you make them die when they equip it they will relog and it will execute again, causing infinite death.
Yeah, if you could explain it a bit better then I may be able to write this one for you. Do you want a ring that, if equipped, makes other players (hit by the one wearing the ring) to die instantly?
function onEquip(player, item, slot, isCheck)
-- remove the item before we kill them
item:remove()
-- kill the player
player:addHealth(-player:getMaxHealth())
return true
end
Yes!
The player by clicking on "use" on the ring, it will die ...
The ring should be in the ring slot to work, if it is in the backpack or anywhere else and give use nothing happens
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getSlotItem(CONST_SLOT_RING) == item then
player:addHealth(-player:getMaxHealth())
return true
end
return false
end