CreateExplosion: Difference between revisions
Jump to navigation
Jump to search
JonChappell (talk | contribs) |
|||
Line 6: | Line 6: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''x:''' A Float value that specifies the X coordinate where the object is spawned at in the GTASA world | ||
*''' | *'''y:''' A Float value that specifies the Y coordinate where the object is spawned at in the GTASA world | ||
*''' | *'''z:''' A Float value that specifies the Z coordinate where the object is spawned at in the GTASA world | ||
*''' | *'''type:''' A whole number specifying the explosion type | ||
{{Explosions}} | {{Explosions}} | ||
Revision as of 11:46, 12 July 2006
Creates an explosion of a certain type at a specified location using x,y,z.
Syntax
createExplosion ( x, y, z, type, [ player creator ] )
Required Arguments
- x: A Float value that specifies the X coordinate where the object is spawned at in the GTASA world
- y: A Float value that specifies the Y coordinate where the object is spawned at in the GTASA world
- z: A Float value that specifies the Z coordinate where the object is spawned at in the GTASA world
- type: A whole number specifying the explosion type
- 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
Optional Arguments
- Creator: The explosion's simulated creator, responsible for it. This person will receive credit on the scoreboard if someone is killed by the explosion.
Example
This code will create an explosion at the player's position when they spawn.
root = getRootElement () addEventHandler ( "onPlayerSpawn", root, "onPlayerSpawn" ) function onPlayerSpawn ( spawnpoint ) createExplosion ( getEntityPosition ( source ), 6, source ) end
See Also