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: