Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _setTimer = setTimer
- _addEventHandler = addEventHandler
- _removeEventHandler = removeEventHandler
- _createObject = createObject
- _createMarker = createMarker
- _createColSphere = createColSphere
- _destroyElement = destroyElement
- _playSound = playSound
- _addCommandHandler = addCommandHandler
- _engineImportTXD = engineImportTXD
- _engineReplaceModel = engineReplaceModel
- _removeCommandHandler = removeCommandHandler
- _removeEventHandler = removeEventHandler
- _bindKey = bindKey
- _unbindKey = unbindKey
- _stopSound = stopSound
- x,y = guiGetScreenSize()
- objects = {}
- markers = {}
- timers = {}
- colspheres = {}
- events = {}
- sounds = {}
- commands = {}
- models = {}
- binds = {}
- dlScripts = 0
- dlFiles = 0
- handleSize = false
- handlePercent = false
- pickupID = { nitro = 2221, repair = 2222, vehiclechange = 2223 }
- function playSound( soundPath, looped )
- if looped ~= true then looped = false end
- local sound = _playSound( soundPath, looped)
- sounds[#sounds+1] = sound
- return sound
- end
- function stopSound ( theSound )
- for i,v in pairs(sounds) do
- if v == theSound then
- v = false
- end
- end
- return _stopSound(theSound)
- end
- function bindKey(key, state, func, arguments)
- local number = #binds+1
- binds[number] = {}
- binds[number].key = key
- local result
- if arguments then
- result = _bindKey(key, state, func, arguments)
- else
- result = _bindKey(key, state, func)
- end
- return result
- end
- function unbindKey(key, state, func)
- for i,v in pairs(binds) do
- if v.key == key then
- v.key = {}
- v.key = false
- end
- end
- return _unbindKey(key)
- end
- function addEventHandler(theEvent, parent, func, propagated)
- if not propagated then
- propagated = true
- end
- local num = #events+1
- events[num] = {}
- events[num].event = theEvent
- events[num].parent = parent
- events[num].func = func
- return _addEventHandler(theEvent, parent, func, propagated)
- end
- function removeEventHandler(theEvent, parent, func)
- for i, p in ipairs(events) do
- if p.event == theEvent and p.parent == parent and p.func == func then
- events[i] = nil
- table.remove(events,i)
- end
- end
- return _removeEventHandler(theEvent, parent, func)
- end
- function removeCommandHandler(command)
- for i, p in ipairs(commands) do
- if p == commmand then
- p = false
- end
- end
- return _removeCommandHandler(command)
- end
- function addCommandHandler(command, func)
- commands[#commands+1] = command
- return _addCommandHandler(command, func)
- end
- function setTimer(func, intervall, executes, ...)
- local timer
- if ... then
- timer = _setTimer(func, intervall, executes, unpack(...))
- else
- timer = _setTimer(func, intervall, executes)
- end
- timers[#timers+1] = timer
- return timer
- end
- function engineImportTXD( model, id )
- local search = false
- for i, v in ipairs(models) do
- if v == id then
- search = true
- end
- end
- if search == false then
- models[#models+1] = id
- end
- return _engineImportTXD( model, id )
- end
- function engineReplaceModel( model, id )
- local search = false
- for i, v in ipairs(models) do
- if v == id then
- search = true
- end
- end
- if search == false then
- models[#models+1] = id
- end
- return _engineReplaceModel( model, id)
- end
Advertisement
Add Comment
Please, Sign In to add comment