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

Can someone can make this thing?

Sir MoX

New Member
Joined
Jan 14, 2009
Messages
285
Reaction score
1
Well hello everybody :p I have a problem very simple xD the problem is in a vocation door that works but the problem is that only sorcerer and pass and I dont know how to do that the Master sorcerers can pass to ok?:

function onUse(cid, item, fromPosition, itemEx, toPosition)
local voc = 1 --- Id de la voc que pasara.
local msg = "Solo sorcerers pueden pasar" --- Mensaje que le saldra si no es la voc requerida.

if getPlayerVocation(cid) == voc then
pos = getPlayerPosition(cid)
if pos.x == toPosition.x then
if pos.y < toPosition.y then
pos.y = toPosition.y + 1
else
pos.y = toPosition.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(toPosition,12)
else
doPlayerSendTextMessage(cid,22,"Only Sorcerers can pass this door")
end
return 1
end
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local vocs = {1, 5} --- Id of VOCS
local msg = "Solo sorcerers pueden pasar" --- Mensaje que le saldra si no es la voc requerida.

	if isInArray(vocs, getPlayerVocation(cid)) == TRUE then
		pos = getPlayerPosition(cid)
		if pos.x == toPosition.x then
			if pos.y < toPosition.y then
				pos.y = toPosition.y + 1
			else
				pos.y = toPosition.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(toPosition,12)
	else
		doPlayerSendTextMessage(cid,22,"Only Sorcerers can pass this door")
	end
return 1
end
 
thanks pitufo for helping me again! I tried to fix it and I do a stupid mistake, I dint put space before the 5
I will try it I hope It works ;D
 
Back
Top