Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SafeLoc = {
- [1] = {1},
- [2] = {},
- [3] = {3, 8},
- };
- -- Process SafeLocs on startup
- local temp = {}
- for k,v in pairs(SafeLoc) do
- if (#v <= 0) then
- temp[k] = true
- else
- temp[k] = temp[k] or {}
- for i,j in ipairs(v) do
- temp[k][j] = true
- end
- end
- end
- SafeLoc = temp
- local playerZone, playerArea = 3, 3
- if(SafeLoc[playerZone]) then
- if(SafeLoc[playerZone] == true) then
- print("No safe area but player is in safe zone")
- else
- if (SafeLoc[playerZone][playerArea]) then
- print("Player is in safe zone and area")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement