Definitions - Phil25/RTD GitHub Wiki

ROLLFLAG

Used during rolls for selecting perks for clients.

#define ROLLFLAG_NONE			0
#define ROLLFLAG_OVERRIDE_DISABLED	(1 << 0)	/* Accept disabled perks */
#define ROLLFLAG_OVERRIDE_CLASS		(1 << 1)	/* If client is specified, ignore their class */
#define ROLLFLAG_OVERRIDE_LOADOUT	(1 << 2)	/* Ignore whether the client has irrelevant loadout */
#define ROLLFLAG_IGNORE_PERK_REPEATS	(1 << 3)	/* Ignore whether the perk was rolled recently */
#define ROLLFLAG_IGNORE_PLAYER_REPEATS	(1 << 4)	/* Ignore whether the client has rolled the perk recently */

RTDCall

Prototype for external perk calls.

typedef RTDCall = function void(int client, RTDPerk perk, bool bEnable)

Parameters

  • int client — Client index to operate the perk on.
  • RTDPerk perkRTDPerk object.
  • bool bEnable — Whether the perk should be applied or removed.

Example usage

public void MyPerkCall(int client, RTDPerk perk, bool bEnable){
    if(bEnable)
        PrintToChat(client, "Enabling perk %d", perk.Id);
    else
        PrintToChat(client, "Disabling perk %d", perk.Id);
}

Client and perk are guaranteed to be valid.