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

Lua VIP Door Script

Northnorial

Member
Joined
May 30, 2009
Messages
742
Reaction score
5
Location
Germany
I got that {working} VIP Door Script, but I want, that it's teleporting the player to a certain position.

What I have to edit?

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cidPosition = getCreaturePosition(cid)
		if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
			if cidPosition.x < toPosition.x then
				doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			else
				doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
								doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
			end
			return TRUE
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on our homepage.")
			return TRUE
	end
	return FALSE
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
		doTeleportThing(cid, {x=1111,y=2222,z=3333}, TRUE)
		doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on our homepage.")
	end
	return true
end

doTeleportThing(cid, {x=1111,y=2222,z=3333}, TRUE)

Change that line, change 1111, 2222, 3333 to the position X, Y, Z, that you want for the player to be teleported.
 

Similar threads

Back
Top