• 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!

Help Please

killing

Member
Joined
Feb 23, 2012
Messages
815
Reaction score
11
Location
BIH
How to make when player use this i want to this item delete..(disappears)
Like "You have left 2 XXXX,you have left 1 XXXX..I want to player can loss this item when he use it.

LUA:
local storage = 11989
local protectiontime = 15
 
local function endProtection(cid)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Protection ended.")
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
	if getPlayerStorageValue(cid, storage) >= os.time() then
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) 
		doPlayerSendCancel(cid, "You are still protected by this doll.")
		return true
	end
	setPlayerStorageValue(cid, storage, os.time()+protectiontime)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are now protected by this doll for 15 seconds.')
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
	addEvent(endProtection, 15000, cid)
	return true
end
 
Back
Top