• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Sex Door

Santy

Member
Joined
Aug 14, 2007
Messages
654
Reaction score
22
It is a sex door that only males can pass.. if u wanna change it to female, change the "if sex = 1 then" to "if sex = 0 then"

Code:
function onUse(cid, item, frompos, item2, topos)
sex = getPlayerSex(cid)
pos = getPlayerPosition(cid)

	if item.uid == lolx then
		if sex == 1 then
			if pos.x == topos.x then
				if pos.y < topos.y then
					pos.y = topos.y + 1
				else
					pos.y = topos.y - 1
				end
			elseif pos.y == topos.y then
				if pos.x < topos.x then
					pos.x = topos.x + 1
				else
					pos.x = topos.x - 1
				end
			else
				doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
				return 1
			end

			doTeleportThing(cid,pos)
			doSendMagicEffect(topos,12)
		else
			doPlayerSendTextMessage(cid,22,'You do not have the right sex to pass this door.')
		end
		return 1
	else
		return 0
	end
end
 
Last edited:
And... How do you make this work?
Doesn't work with
<action uniqueid="xxxx" script="sexdoor.lua" />
nor
<action actionid="xxxx" script="sexdoor.lua" />
 
I think you should fix the error I pointed out in your script ^.-
Anyways, I don't like it. Sexist hunting areas? nah.

I was gonna use it for male and female restrooms but okay.

I guess we all can just use the middle one...
 
Back
Top