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

Special Doors Problem

TriamerA

The Mystic One.
Joined
Nov 16, 2008
Messages
1,256
Reaction score
17
Location
Poland
drzwio.jpg


So I want that doors open when player has xxxx storage id -.-
I have no idea how to make it, I've been searching for that for a long time.
Please help.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if [B]item.uid == 9999[/B] then
		if(isInArray({[B]getPlayerStorageValue(cid, xxxx)[/B], -1) == TRUE) then
  			doPlayerSendTextMessage(cid, 22, "The door seems to be sealed against unwanted intruders.")
		else
			doPlayerSendTextMessage(cid, 22, "You've absorbed enough energy! You may pass.")
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		end
		return TRUE
	end
	return FALSE
end
item.uid == 9999, change that to the uniqueID you will use for the door.
getPlayerStorageValue(cid, xxxx), the storageID you want to use
 
Back
Top