Defines the whitelisted Metropolice Force faction (FACTION_MPF), a Combine faction whose units get the cp_c08 Civil Protection models and a generated recruit name with a random unit number.

Summary

Methods

Returns a random recruit name for a new unit, such as CP.C24.RCT:042.
Called when a player is transferred to the faction.

Methods

FACTION:GetName(player, character)

shared gamemodes/cwhl2rp/schema/factions/sh_mpf.lua:24

Returns a random recruit name for a new unit, such as CP.C24.RCT:042.

Parameters

  • player Player The player
  • character Character The character

Returns

  • String The name

FACTION:OnTransferred(player, faction, name)

shared gamemodes/cwhl2rp/schema/factions/sh_mpf.lua:37

Called when a player is transferred to the faction.

Characters coming from Overwatch need the transfer's third argument and have the part of their name before its last five digits replaced with CP.C24.RCT:; everyone else gets a new recruit name. The character gets the first Civil Protection model of their gender.

Parameters

  • player Player The player
  • faction Faction The faction the player comes from
  • name String optional, defaults to nil Required when coming from Overwatch

Returns

  • Boolean false to refuse the transfer
  • String The reason

Defined in