• 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!

Action Snake System TFS 1.X [Mocks]

Is it possible block people from throwing things down? Because it's possible to cheat at the moment :p (if someone throws another cake down)
Also is it possible to make a highscore list?
you can edit player onmoveitem and check for the topos area
Code:
function isInArea(center, rangeX, rangeY, pos)
    return (pos.x >= center.x-rangeX and pos.x <= center.x+rangeX and pos.y >= center.y-rangeY and pos.y <= center.y+rangeY)
end
example:
Code:
if isinarea(snakecenter, 5, 5, toposition) then
self:sendtextmessage('sorry not possible')
return false
end
checks in a 5x5 square for toposition, using snakecenter as the center position
 
Is it possible block people from throwing things down? Because it's possible to cheat at the moment :p (if someone throws another cake down)
Also is it possible to make a highscore list?
its also possible to make a highscore list. just save the score to a storage then sort them
 
you can edit player onmoveitem and check for the topos area
Code:
function isInArea(center, rangeX, rangeY, pos)
    return (pos.x >= center.x-rangeX and pos.x <= center.x+rangeX and pos.y >= center.y-rangeY and pos.y <= center.y+rangeY)
end
example:
Code:
if isinarea(snakecenter, 5, 5, toposition) then
self:sendtextmessage('sorry not possible')
return false
end
checks in a 5x5 square for toposition, using snakecenter as the center position

its also possible to make a highscore list. just save the score to a storage then sort them

How do I do that?
 
I would like to make a rank for this example event! Snake there would show the TOP 10 score?
 
im steping on the "large gem" and nothing happen.. I'm in TFS 1.2 someone can tell why?
i added dofile('data/lib/snakesys.lua') to global.lua
 
Back
Top