ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getProjectileTarget

Function

getProjectileTarget

ServerProjectilesIdentical to MTA:SA

Returns the target of a homing projectile.

Syntax

element getProjectileTarget(projectile theProjectile)

Arguments

theProjectileprojectile
The projectile.

Returns

The target, or false when there is none.

Example

addEventHandler("onProjectileCreation", root, function()
    local target = getProjectileTarget(source)
    if target then outputDebugString("Cel: " .. getElementType(target)) end
end)

See also