Hello, i do this script:
The idea, was that when GM say a words, he teleport players of one area, to a determinate site(example: 1000, 1000, 7)
And, the GM, stay there, and he didnt be teleported.
Well, the script, works, but not like i want, because only teleport the person who say the words and stay into the area, and the players who are in the area, dont be teleported ... omg
My question is: how can i do, the script work with my idea?
thx, and sorry for my bad english
Code:
function onSay(cid, words, param)
newpos = {x=1031, y=1033, z=7}
for areax = 1029, 1033 do
for areay = 1028, 1037 do
areapos = {x=areax, y=areay, z=7, stackpos=253}
creature = getThingfromPos(areapos)
if creature.itemid > 0 then
if getPlayerAccess(cid) >= 1 then
doTeleportThing(cid,newpos)
elseif getPlayerAccess(cid) == 0 then
doPlayerSendTextMessage(cid,22,"No puedes usar este comando.")
end
end
end
end
The idea, was that when GM say a words, he teleport players of one area, to a determinate site(example: 1000, 1000, 7)
And, the GM, stay there, and he didnt be teleported.
Well, the script, works, but not like i want, because only teleport the person who say the words and stay into the area, and the players who are in the area, dont be teleported ... omg
My question is: how can i do, the script work with my idea?
thx, and sorry for my bad english