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

Function

isPedAiming

ServerPedsIdentical to MTA:SA

Checks whether a ped is aiming a weapon (holding the right mouse button or aiming on a gamepad). The state comes from the player's game and refreshes several times per second.

Syntax

bool isPedAiming(ped ped)

Arguments

pedped
A player or an NPC.

Returns

true when aiming.

Example

if isPedAiming(player) then outputServerLog(getPlayerName(player) .. " celuje") end

See also