vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
i have problem with event teleport, only one player can join.
Code:
function onStepIn(cid, item, pos)
if cid > 0 then
if item.actionid == 10533 then
if(item.itemid == 426) then
local location = {
{x=1163, y=883, z=7},
{x=1167, y=883, z=7},
{x=1169, y=883, z=7},
{x=1172, y=883, z=7},
{x=1162, y=885, z=7},
{x=1164, y=885, z=7},
{x=1171, y=885, z=7},
{x=1173, y=885, z=7},
{x=1162, y=887, z=7},
{x=1164, y=887, z=7},
{x=1171, y=887, z=7},
{x=1173, y=887, z=7},
{x=1163, y=889, z=7},
{x=1167, y=889, z=7},
{x=1169, y=889, z=7},
{x=1172, y=889, z=7},
{x=1165, y=891, z=7},
{x=1167, y=891, z=7},
{x=1169, y=891, z=7},
{x=1171, y=891, z=7},
{x=1173, y=891, z=7}
}
local playerteleported = 1
for i=1,#location do
getplayer = getThingFromPos(location[i])
if getplayer.itemid > 0 then
playerteleported = 1
else
doTeleportThing(cid,location[i])
doPlayerSendTextMessage(cid,22,"WOW")
doPlayerSendTextMessage(cid,21,"YOU JOINED TO EVENT")
playerteleported = 0
end
end
if playerteleported > 0 then
doTeleportThing(cid,{x=1168, y=893, z=7})
doPlayerSendTextMessage(cid,22,"[AnvilEvent] All player ready, sorry!")
end
end
end
end
end