This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
Releases: drakeee/altv-lua-module
Releases · drakeee/altv-lua-module
Release dev/0.4.3-dev
Added the following new features:
- netOwnerChange event
- playerEnterVehicle event
- playerEnteringVehicle event
- playerLeaveVehicle event
- playerChangeVehicleSeat event
- vehicleAttach event
- vehicleDetach event
- vehicle.getAttached
- vehicle.getAttachedTo
- vehicle.repair
- player.clearBloodDamage
- entity.getVisible
- entity.setVisible
Release dev/0.4.2-dev
Update CPP SDK version.
Release dev/0.4.1-dev
- Fixed an issue whenever you pass nothing to a function instead of a string it will crash the server.
getResourceFromName
renamed togetResourceByName
.Resource.getFromName
renamed toResource.getByName
.- Add the possibility to read both
server.cfg
andresource.cfg
files. There is a global object calledserverConfig
(it will return auserdata:Config
type) which you can access everywhere and can read keys from the config file withgetKey(string key)
function. For resource objects you can access it byconfig
property orgetConfig()
function (also in each resource there is a variable calledlocalResource
which is an object for the current resource the script is running in).
Examples:
print(serverConfig:getKey("announce"))
print(serverConfig:getKey("name"))
print(serverConfig:getKey("description"))
print(inspect(serverConfig:getKey("resources")))
print(inspect(serverConfig:getKey("modules")))
print(localResource.config)
print(localResource.config:getKey("main"))
print(inspect(localResource:getConfig():getKey("required-permissions")))
print(import("resourcename").config:getKey("main")) --import is just an alias for getResourceByName
print(import("resourcename"):getConfig():getKey("main")) --import is just an alias for getResourceByName
print(inspect(Resource.getByName("resourcename"):getConfig():getKey("test-value"))) --you can also access unique keys as well
print(inspect(getResourceByName("resourcename"):getConfig():getKey("test-value"))) --you can also access unique keys as well
print(inspect(getResourceByName("resourcename").config:getKey("test-value"))) --you can also access unique keys as well
Release dev/0.4.0-dev
- Updated to the latest cpp-sdk version (v44).
- Added
tick
server event. - Added
isDebug
function. - Added
fileExists
function. - Added
fileRead
function. - Added
getEntityById
function. - Added
getRootDirectory
function. - Added
getPlayersByName
function. - Added
getNetTime
function. - Added
getVersion
function. - Added
getBranch
function. - Added
DEFAULT_DIMENSION
andGLOBAL_DIMENSION
global variables. - Added
Entity.getAll
function,Entity.all
property, possibility to loop through entities byipairs(Entity)
. - Removed
setSprite
,setColor
,setRoute
,setRouteColor
from Blip class. - Both
print
andlog
functions now take variadic arguments and also will try to convert values into strings (you don't need to call tostring).
Release dev/0.3.22-dev
- Updated to the latest cpp-sdk version (v42).
- Added
GetRequiredPermissions
andGetOptionalPermissions
as resource and global functions.
Release rc/0.3.20-rc
- Fixed an issue where couldn't cancel events.
- Added
log
function. - Merged
dev
intorc
.
Release dev/0.3.19-dev
- Fixed more crashing.
Release dev/0.3.18-dev
- Added Checkpoint, ColShape and VoiceChannel classes.
- Added
driver
property for vehicle. - Fixed when an error happened during resource loading it would crash the server.
- Can now import modules inside resource folder as well.
Release dev/0.3.17-dev
- Fixed a problem when emitting event couldn't handle BaseObjects.
- Separate Lua modules from the module itself.
Release dev/0.3.16-dev
- Added "playerWeaponChange" event.