Untitled
unknown
plain_text
a year ago
759 B
8
Indexable
local sampev = require('lib.samp.events')
local fileName = getWorkingDirectory() .. '\\race.txt'
function main()
while not isSampAvailable() do wait(0) end
if not doesFileExist(fileName) then
file = io.open(fileName, "w")
file:write('')
file:close()
end
while true do
wait(0)
end
end
function sampev.onSetRaceCheckpoint(type, position, nextPosition, size)
position.x, position.y, position.z = ("%0.3f"):format(position.x), ("%0.3f"):format(position.y), ("%0.3f"):format(position.z)
sampAddChatMessage('x: ' .. position.x .. ', y: ' .. position.y .. ', z: ' .. position.z, -1)
local file = io.open(fileName, "a")
file:write('x: ' .. position.x .. ', y: ' .. position.y .. ', z: ' .. position.z .. '\n')
file:close()
endEditor is loading...
Leave a Comment