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

Function

isPedAggressive

ServerPedsTrilogy Hub only

Checks whether an NPC is aggressive, i.e. whether it fights back on its own when someone hurts it. Aggression is set with setPedAggressive or the seventh argument of createPed.

Syntax

bool isPedAggressive(ped ped)

Arguments

pedped
An NPC (a ped element).

Returns

true when the NPC is aggressive.

Example

if isPedAggressive(ped) then outputChatBox("Uważaj, ten gość oddaje!") end

See also