SetEffectScale
From Multi Theft Auto: Wiki
Function has been disabled. | |
This function sets the scale of a specified effect.
Syntax
bool setEffectScale ( effect theEffect, float scale [, float scaleY, float scaleZ ] )
OOP Syntax Help! I don't understand this!
- Method: effect:setScale(...)
- Variable: .scale
- Counterpart: getEffectScale
Required Arguments
- theEffect: the effect you wish to change the scale of.
- scale: a float containing the new scale. 1.0 is the standard scale, with 0.5 being half the size and 2.0 being twice the size. If the scaleY is set, this will be scaleX.
Optional Arguments
- scaleY: a float containing the new scale on the Y axis
- scaleZ: a float containing the new scale on the Z axis
Returns
- true if the scale was set properly.
- false otherwise.
Example
Click to collapse [-]
Client-- get the position of the player local x, y, z = getElementPosition(getLocalPlayer()) -- create the effect effect = createEffect("carwashspray", x, y, z+1) if ( effect ) then -- if it was created -- set the scale to half the normal scale setEffectScale ( effect, 0.5) end
See also
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed