SetPlayerEnemy - Faction
Jump to navigation
Jump to search
Member of: Faction Script
Sets or clears the enemy flag from this faction for the player.
Syntax[edit | edit source]
Function SetPlayerEnemy(bool abIsEnemy = true) native
Parameters[edit | edit source]
- abIsEnemy: True if the player should be flagged temporarily as an enemy of the faction, false to clear the enemy flag.
- Default: True
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Set the faction's enemy flag
BadGuys.SetPlayerEnemy()
; clear the faction's enemy flag
BadGuys.SetPlayerEnemy(false)
Notes[edit | edit source]
This is the same flag that gets set on a faction when the player commits a crime against it, which allows a faction to attack the player even if the player is an ally of that faction.
The flag is automatically cleared (whether set by script or code) after 24 hours.