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

Annihilator

Xleniz

New Member
Joined
Jul 6, 2009
Messages
178
Reaction score
3
Location
Sweden
I'm making annihilator but getting lots of errors. I think the problem is "end".
Thx.

Code:
local xyz1 = { x = 1901, y = 1934, z = 7 }
local xyz2 = { x = 1902, y = 1934, z = 7 }
local xyz3 = { x = 1903, y = 1934, z = 7 }
local xyz4 = { x = 1904, y = 1934, z = 7 }

local xyzz1 = { x = 1899, y = 1933, z = 8 }
local xyzz2 = { x = 1901, y = 1933, z = 8 }
local xyzz3 = { x = 1903, y = 1933, z = 8 }
local xyzz4 = { x = 1905, y = 1933, z = 8 }


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getThingFromPos(xyz1)) then
	if(getThingFromPos(xyz2)) then
	if(getThingFromPos(xyz3)) then
	if(getThingfromPos(xyz4)) then
	doTeleportThing(player1, xyzz1, true)
	doTeleportThing(player2, xyzz2, true)
	doTeleportThing(player3, xyzz3, true)
	doTeleportThing(player4, xyzz4, true)
	end
	else
	doPlayerSendCancel("You need 4 players")
	end
	end
	else
	doPlayerSendCancel("You need 4 players")
	end
	end
	else
	doPlayerSendCancel("You need 4 players")
	end
	end
	else
	doPlayerSendCancel("You need 4 players")
	end
	end
	return true
end
 
LUA:
local xyz1 = { x = 1901, y = 1934, z = 7, stackpos= 253 }
local player1 = getThingFromPos(xyz1)
local xyz2 = { x = 1902, y = 1934, z = 7, stackpos= 253}
local player2 = getThingFromPos(xyz2)
local xyz3 = { x = 1903, y = 1934, z = 7, stackpos= 253 }
local player3 = getThingFromPos(xyz3)
local xyz4 = { x = 1904, y = 1934, z = 7, stackpos= 253 }
local player4 = getThingFromPos(xyz4)

local xyzz1 = { x = 1899, y = 1933, z = 8 }
local xyzz2 = { x = 1901, y = 1933, z = 8 }
local xyzz3 = { x = 1903, y = 1933, z = 8 }
local xyzz4 = { x = 1905, y = 1933, z = 8 }


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(player1) and isPlayer(player2) and isPlayer(player3) and isPlayer(player4) then
	doTeleportThing(player1.uid, xyzz1, true)
	doTeleportThing(player2.uid, xyzz2, true)
	doTeleportThing(player3.uid, xyzz3, true)
	doTeleportThing(player4.uid, xyzz4, true)
	else
	doPlayerSendCancel("You need 4 players")
	end
end
 
Last edited:
Back
Top