• 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 Script dont work

Apap

New Member
Joined
Sep 27, 2008
Messages
26
Reaction score
0
Location
Poland
PHP:
function onUse(cid, item, frompos, item2, topos)
local rogi = {lewy_gorny = {x=200, y=200, z=3}, prawy_dolny = {x=250, y=250, z=3}}
local gracz = 0
for x=rogi.lewy_gorny.x, rogi.prawy_dolny.x do
	for y=rogi.lewy_gorny.y, rogi.prawy_dolny.y do
		local pozycja = {x=x, y=y, z=rogi.lewy_gorny.z, stackpos=253}
		local gracz = getThingfromPos(pozycja)
		if(isPlayer(gracz) == TRUE) then
			gracz = gracz+1
		end
	end
end
if(gracz == 0) then
	doTeleportThing(cid,{x=220, y=210, z=3})
else
	doPlayerSendCancel(cid,"Gracz jest w srodku.")
end
return TRUE
end
it is dont work please help me of this script
 
Can you explain what are you trying to do and what errors are you haveing, it seems you are cheking if there is a player in that area... if there is 0 players it will teleport you if not a message comes to you, am i correct?
 
Back
Top