ScriptingChanges: Difference between revisions
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE: | {{DISPLAYTITLE:Scripting Changes}} | ||
This page shows information about significant changes in the scripting interface for previous versions of GTAC. | This page shows information about significant changes in the scripting interface for previous versions of GTAC. | ||
== Server 1.4.0 and newer == | == Server 1.4.0 and newer == | ||
Renamed <code>gta.createCivilian</code> to <code>gta.createPed</code><br/> | * Renamed <code>gta.createCivilian</code> to <code>gta.createPed</code><br/> | ||
Renamed <code>vehicle.carLock</code> to <code>vehicle.lockedStatus</code><br/> | * Removed <code>element.owner</code><br/> | ||
* Renamed <code>ped.setWeaponAmmunition</code> to <code>ped.setWeaponSlotAmmunition</code><br/> | |||
* Renamed <code>ped.getWeaponAmmunition</code> to <code>ped.getWeaponSlotAmmunition</code><br/> | |||
* Renamed <code>ped.setWeaponClipAmmunition</code> to <code>ped.setWeaponSlotClipAmmunition</code><br/> | |||
* Renamed <code>ped.getWeaponClipAmmunition</code> to <code>ped.getWeaponSlotClipAmmunition</code><br/> | |||
* Renamed <code>ped.setWeaponAmmunitionForWeaponId</code> to <code>ped.setWeaponAmmunition</code><br/> | |||
* Renamed <code>ped.getWeaponAmmunitionForWeaponId</code> to <code>ped.getWeaponAmmunition</code><br/> | |||
* Renamed <code>ped.setWeaponClipAmmunitionForWeaponId</code> to <code>ped.setWeaponClipAmmunition</code><br/> | |||
* Renamed <code>ped.getWeaponClipAmmunitionForWeaponId</code> to <code>ped.getWeaponClipAmmunition</code><br/> | |||
* Renamed <code>vehicle.carLock</code> to <code>vehicle.lockedStatus</code><br/> | |||
* Renamed <code>gta.findGroundZForCoord</code> to <code>gta.findGroundZCoordinate</code><br/> | |||
* Renamed event <code>OnWastePed</code> to <code>OnPedWastedFromAttackerClient</code><br/> | |||
* Added <code>hasCommandHandler</code><br/> | |||
* Added <code>int vehicle.lightsStatus</code> to go with existing <code>bool vehicle.lights</code> | |||
* Added <code>element.transient</code><br/> | |||
* Added <code>element.findSyncer</code><br/> | |||
* Added <code>element.forceSyncer</code><br/> | |||
* Added <code>element.alwaysExistForSyncer</code><br/> | |||
* Added <code>element.distanceStreaming</code><br/> | |||
* Added <code>element.defaultExistance</code><br/> | |||
* Added <code>element.setExistsFor</code><br/> | |||
* Added <code>element.clearExistsFor</code><br/> | |||
* Added <code>element.streamInDistance</code><br/> | |||
* Added <code>element.streamOutDistance</code><br/> | |||
* Added <code>element.existsFor</code><br/> | |||
* Added <code>element.creator</code><br/> | |||
* Added <code>element.interior</code><br/> | |||
* Added <code>server.setPassword</code> function<br/> | |||
* Added <code>server.httpURL</code> (readonly)<br/> | |||
* Added <code>OnReceivePacket</code> scripting event | |||
== Client 1.4.0 and newer == | == Client 1.4.0 and newer == | ||
Renamed <code>gta.createCivilian</code> to <code>gta.createPed.</code><br/> | * Renamed <code>gta.createCivilian</code> to <code>gta.createPed.</code><br/> | ||
Renamed <code>gta.currentWeather</code> to <code>gta.weather</code><br/> | * Renamed <code>gta.currentWeather</code> to <code>gta.weather</code><br/> | ||
Renamed <code>currentWeather</code> to <code>gta.weather</code> for IV<br/> | * Renamed <code>currentWeather</code> to <code>gta.weather</code> for IV<br/> | ||
Renamed <code>forceWeather</code> to <code>gta.forceWeather</code> for IV<br/> | * Renamed <code>forceWeather</code> to <code>gta.forceWeather</code> for IV<br/> | ||
Renamed <code>setWindSpeed</code> to <code>gta.setWindSpeed</code> for IV<br/> | * Renamed <code>setWindSpeed</code> to <code>gta.setWindSpeed</code> for IV<br/> | ||
Renamed <code>vehicle.carWanderRandomly</code> to <code>vehicle.wanderRandomly</code><br/> | * Renamed <code>vehicle.carWanderRandomly</code> to <code>vehicle.wanderRandomly</code><br/> | ||
* Changed <code>vehicle.driveTo</code> to take a Vec3 instead of 3 floats<br/> | |||
* Changed <code>vehicle.flyTo</code> to take a Vec3 instead of 3 floats<br/> | |||
* Changed <code>gta.findGroundZ</code> to take a Vec2 instead of 2 floats<br/> | |||
* Changed <code>gta.findRoofZ</code> to take a Vec3 instead of 3 floats<br/> | |||
* Changed <code>int element.syncer</code> to be <code>Client element.syncer</code><br/> | |||
* Changed <code>element.setSyncer</code> to take a Client object<br/> | |||
Added entity.model as alias for entity.modelIndex</code><br/> | * Added <code>entity.model</code> as alias for entity.modelIndex</code><br/> | ||
* Added <code>int vehicle.lightsStatus</code> to go with existing <code>bool vehicle.lights</code><br/> | |||
* Added <code>ped.getVehicleNearestDoorPosition</code> for III and VC<br/> | |||
* Added <code>ped.getNearestPassengerDoorPosition</code> for III and VC<br/> | |||
* Added <code>ped.getPositionToOpenVehicleDoor</code> for III and VC<br/> | |||
* Added <code>ped.instantVehicleExit</code> for III and VC<br/> | |||
* Added <code>ped.instantVehicleJack</code> for III and VC<br/> | |||
* Added <code>ped.crouchingTime</code> for VC<br/> | |||
* Added pool count functions (getBuildingCount, getObjectCount) | |||
Added | |||
== Client/Server 1.3.0 and newer == | == Client/Server 1.3.0 and newer == |
Latest revision as of 08:10, 17 May 2022
This page shows information about significant changes in the scripting interface for previous versions of GTAC.
Server 1.4.0 and newer
- Renamed
gta.createCivilian
togta.createPed
- Removed
element.owner
- Renamed
ped.setWeaponAmmunition
toped.setWeaponSlotAmmunition
- Renamed
ped.getWeaponAmmunition
toped.getWeaponSlotAmmunition
- Renamed
ped.setWeaponClipAmmunition
toped.setWeaponSlotClipAmmunition
- Renamed
ped.getWeaponClipAmmunition
toped.getWeaponSlotClipAmmunition
- Renamed
ped.setWeaponAmmunitionForWeaponId
toped.setWeaponAmmunition
- Renamed
ped.getWeaponAmmunitionForWeaponId
toped.getWeaponAmmunition
- Renamed
ped.setWeaponClipAmmunitionForWeaponId
toped.setWeaponClipAmmunition
- Renamed
ped.getWeaponClipAmmunitionForWeaponId
toped.getWeaponClipAmmunition
- Renamed
vehicle.carLock
tovehicle.lockedStatus
- Renamed
gta.findGroundZForCoord
togta.findGroundZCoordinate
- Renamed event
OnWastePed
toOnPedWastedFromAttackerClient
- Added
hasCommandHandler
- Added
int vehicle.lightsStatus
to go with existingbool vehicle.lights
- Added
element.transient
- Added
element.findSyncer
- Added
element.forceSyncer
- Added
element.alwaysExistForSyncer
- Added
element.distanceStreaming
- Added
element.defaultExistance
- Added
element.setExistsFor
- Added
element.clearExistsFor
- Added
element.streamInDistance
- Added
element.streamOutDistance
- Added
element.existsFor
- Added
element.creator
- Added
element.interior
- Added
server.setPassword
function - Added
server.httpURL
(readonly) - Added
OnReceivePacket
scripting event
Client 1.4.0 and newer
- Renamed
gta.createCivilian
togta.createPed.
- Renamed
gta.currentWeather
togta.weather
- Renamed
currentWeather
togta.weather
for IV - Renamed
forceWeather
togta.forceWeather
for IV - Renamed
setWindSpeed
togta.setWindSpeed
for IV - Renamed
vehicle.carWanderRandomly
tovehicle.wanderRandomly
- Changed
vehicle.driveTo
to take a Vec3 instead of 3 floats - Changed
vehicle.flyTo
to take a Vec3 instead of 3 floats - Changed
gta.findGroundZ
to take a Vec2 instead of 2 floats - Changed
gta.findRoofZ
to take a Vec3 instead of 3 floats - Changed
int element.syncer
to beClient element.syncer
- Changed
element.setSyncer
to take a Client object - Added
entity.model
as alias for entity.modelIndex - Added
int vehicle.lightsStatus
to go with existingbool vehicle.lights
- Added
ped.getVehicleNearestDoorPosition
for III and VC - Added
ped.getNearestPassengerDoorPosition
for III and VC - Added
ped.getPositionToOpenVehicleDoor
for III and VC - Added
ped.instantVehicleExit
for III and VC - Added
ped.instantVehicleJack
for III and VC - Added
ped.crouchingTime
for VC - Added pool count functions (getBuildingCount, getObjectCount)
Client/Server 1.3.0 and newer
Element type ELEMENT_CIVILIAN
was removed. Use ELEMENT_PED
instead.
Client/Server 1.3.0 and newer
The setErrorMode
function was removed from scripting.
Client 1.1.1 and newer
The game
namespace was removed from all names that used it, for both server-side and client-side functionality, as listed below.
New Name | Old Name |
---|---|
addMovingParticleEffect | game.addMovingParticleEffect |
addParticleEffect | game.addParticleEffect |
addToWorld | game.addToWorld |
aspectRatio | game.aspectRatio |
cameraInterior | game.cameraInterior |
cameraTarget | game.cameraTarget |
createBlipAttachedTo | game.createBlipAttachedTo |
createBlip | game.createBlip |
createBuilding | game.createBuilding |
createCivilian | game.createCivilian |
createEffect | game.createEffect |
createElement | game.createElement |
createObject | game.createObject |
createPickup | game.createPickup |
createPlayer | game.createPlayer |
createRenderTarget | game.createRenderTarget |
createSingleParticle | game.createSingleParticle |
createSphere | game.createSphere |
createVehicle | game.createVehicle |
drawRectangle | game.drawRectangle |
fadeCamera | game.fadeCamera |
findGroundZForCoord | game.findGroundZForCoord |
game | game.game |
getPeds | game.getPeds |
getRandomSkin | game.getRandomSkin |
getScreenFromWorldPosition | game.getScreenFromWorldPosition |
getVehicles | game.getVehicles |
getWorldFromScreenPosition | game.getWorldFromScreenPosition |
height | game.height |
messages.addJumpQ | game.messages.addJumpQ |
messages.clear | game.messages.clear |
removeFromWorld | game.removeFromWorld |
restoreCamera | game.restoreCamera |
rwRenderStateSet | game.rwRenderStateSet |
setCameraLookAt | game.setCameraLookAt |
setCameraLookAtEntity | game.setCameraLookAtEntity |
setCameraTarget | game.setCameraTarget |
setCiviliansEnabled | game.setCiviliansEnabled |
setEffect | game.setEffect |
setMainHUDEnabled | game.setMainHUDEnabled |
setRenderTarget | game.setRenderTarget |
setTrafficEnabled | game.setTrafficEnabled |
time.hour | game.time.hour |
time.minute | game.time.minute |
time.second | game.time.second |
weather.current | game.weather.current |
weather.force | game.weather.force |
weather.forceSnowing | game.weather.forceSnowing |
weather.snowing | game.weather.snowing |
width | game.width |
Client 1.0.19 and newer
The game
namespace was removed from all names that used it, for both server-side and client-side functionality, as listed below.
New Name | Old Name |
---|---|
createBlipAttachedTo | game.createBlipAttachedTo |
createEffect | game.createEffect |
createElement | game.createElement |
createVehicle | game.createVehicle |
world | game.getWorld |
fadeCamera | game.fadeCamera |