GetProjectileCreator: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Example contains various errors, DON'T ADD AN EXAMPLE IF YOU CAN'T SCRIPT)
Line 15: Line 15:


==Example==
==Example==
This example tells the player who's the projectile creator that killed them.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function killed(killer,weapon,bodypart)
--TODO
  if (weapon == 16 or 17 or 18 or 39) then
      outputChatBox("Who killed you: "..getProjectileCreator(weapon)".",100,0,0)
  end
end
addEventHandler("onClientPedWasted",getRootElement(),killed)
</syntaxhighlight>
</syntaxhighlight>


==See also==
==See also==
{{Client projectile functions}}
{{Client projectile functions}}

Revision as of 11:47, 17 November 2011

This function returns the creator of the specified projectile.

Syntax

element getProjectileCreator ( projectile theProjectile )

Required Arguments

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

Returns

Returns the element which created the projectile if successful, false otherwise.

Example

--TODO

See also