OnClientExplosion: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(It's not documented, revert. Undo revision 29897 by Jaysds (talk))
(Resolved needs checking)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client event}}  
{{Client event}}  
{{Needs Checking|This event is cancelable (#4218) --[[User:Sebassje|Sebas]] 21:24, 18 May 2010 (UTC)}}
This event is triggered every time an explosion is created on the current clients scene (inside the streamer)
This event is triggered every time an explosion is created on the current clients scene (inside the streamer)


Line 16: Line 15:
==Source==
==Source==
The [[event system#Event source|source]] of this event is the explosions creator element (object/vehicle/player)
The [[event system#Event source|source]] of this event is the explosions creator element (object/vehicle/player)
===Canceling===
If this event is [[Event system #Canceling|canceled]], the explosion will not occur.


==Example==
==Example==

Revision as of 11:31, 27 June 2012

This event is triggered every time an explosion is created on the current clients scene (inside the streamer)

Parameters

float x, float y, float z, int theType
  • x: the X Coordinate of where the explosion was created
  • y: the Y Coordinate of where the explosion was created
  • z: the z Coordinate of where the explosion was created
  • theType: the type of explosion created, Values are:
    • 0: Grenade
    • 1: Molotov
    • 2: Rocket
    • 3: Rocket Weak
    • 4: Car
    • 5: Car Quick
    • 6: Boat
    • 7: Heli
    • 8: Mine
    • 9: Object
    • 10: Tank Grenade
    • 11: Small
    • 12: Tiny


Source

The source of this event is the explosions creator element (object/vehicle/player)

Canceling

If this event is canceled, the explosion will not occur.

Example

This example outputs the type of element that created the explosion into the chatbox.

function ClientExplosionFunction(x,y,z,theType)
	outputChatBox("Explosion created by a "..getElementType(source))
end
addEventHandler("onClientExplosion",getRootElement(),ClientExplosionFunction)

See Also

Other client events


Client event functions