avalock
New Member
Hey guys, i'm trying to write a script to find out where a player has used an item essentially from a list of possibilities.
My config example:
Basically i can't figure out how to get getThingfromPos to find out when player "uses" the item which position he/she is at then return the table id. So i can make the script teleport the players friends to him. Been looking for table tutorials but can't find one here. If there is one and i've missed it could someone also post the link? Thanks!
Edit: i could make a a new elsif for each possibility and know how to do this, but didn't want a huge script if its possible to do it a lot smaller and simpler. Thanks!
My config example:
Lua:
local Zones = {
[1] = {
Name = "One",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
},
[2] = {
Name = "Two",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
},
[3] = {
Name = "One",
StonePos = {x = 0, y = 0, z = 0},
GoTo = {x = 0, y = 0, z = 0},
}}
Basically i can't figure out how to get getThingfromPos to find out when player "uses" the item which position he/she is at then return the table id. So i can make the script teleport the players friends to him. Been looking for table tutorials but can't find one here. If there is one and i've missed it could someone also post the link? Thanks!
Edit: i could make a a new elsif for each possibility and know how to do this, but didn't want a huge script if its possible to do it a lot smaller and simpler. Thanks!
Last edited: