OnGetDefaultName

GM:onGetDefaultName

Description
This hook returns the default char name. Despite it's misleading name this is the hook you want to use you force a default name for a faction. Simply return the name in the hook and if you'd like also a bool to set if it can be changed by the user. See example.

Examples
This example shows how to set a character's name to "CT PVT (random numbers)".

function FACTION:onGetDefaultName return "CT PVT "..math.random(1111, 9999), true -- return name, bool = can player overwrite name in menu? end