Scripting/Server/Classes/Vehicle/EditDecal
(v0.3.5+) Opens the built-in 3D editor on one decal for that player: the camera orbits the car and the decal gets the same move / rotate / scale gizmo as EditObject (drag the arrows, 1/2/3 or G/R/S for the mode - scale changes the width and height - right mouse orbit, wheel zoom, Enter saves, Esc cancels). On Save the decal is updated for everybody at exactly that spot (it no longer snaps to the surface) and onPlayerEditDecal reports the result, so a script can store the design. Returns false when the car or decal does not exist. PC only for now: an Android player answers with a cancel.
Syntax
EditDecal(player, vehicle, decalId)vehicle.EditDecal(player, decalId)Arguments
- Player player
- Vehicle vehicle
- int decalId
Returns
true when the editor opened
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "editdecal" )
{
local result = EditDecal( player, veh, 0 );
MessagePlayer( "EditDecal returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- vehicle.Remove
- vehicle.Respawn
- vehicle.Fix
- vehicle.Explode
- vehicle.SetBurstableTyres
- player.AttachTo
- object.AttachTo
- object.AttachToBone
- vehicle.SetComponentStatus
- vehicle.SetComponentStatus
- vehicle.SetComponentAngle
- vehicle.SetComponentColour
Section: Vehicle
Categories: Server methods | Vehicle