09-20-2021, 08:05 PM
Alert if pushed
You can use Alerts -> Moved, but this script also works.
You can use Alerts -> Moved, but this script also works.
local KEEP_PLAYING = false -- Should keep playing alert if get pushed? If false then it will play once.
if connected() then
if TRIGGERED == nil then
TRIGGERED = false
player_x = posx()
player_y = posy()
end
if posx() ~= player_x or posy() ~= player_y then
TRIGGERED = true
end
if TRIGGERED then
playsound('default')
flashclient()
if not KEEP_PLAYING then
TRIGGERED = false
player_x = posx()
player_y = posy()
end
end
else
TRIGGERED = nil
end