Difference between revisions of "GetProjectileType"

From Multi Theft Auto: Wiki
Line 26: Line 26:
==See also==
==See also==
{{Client projectile functions}}
{{Client projectile functions}}

Revision as of 07:07, 16 December 2011

This function returns the type of the specified projectile.


int getProjectileType ( projectile theProjectile )

Required Arguments

  • theProjectile: The projectile element which type you want to retrieve.


Returns an integer over the type of the projectile or false if invalid arguments were passed.

ID Name/Description
16 Grenade
17 Tear Gas Grenade
18 Molotov
19 Rocket (simple)
20 Rocket (heat seeking)
21 Air Bomb
39 Satchel Charge
58 Flare from hydra (doesn't work)


function projectileCreation()
	local theType = getProjectileType(source)
	outputChatBox("A projectile was created! It's type: "..theType)
addEventHandler("onClientProjectileCreation", getRootElement(), projectileCreation)

See also