Skip to content

API: Natives

Jonathan Öhrström edited this page Aug 15, 2017 · 16 revisions

Natives

betterwarden.inc

cmenu.inc


IsClientWarden

Checks if the given client is currently warden.

Parameters
    int CLIENT - Client index
Returns
    TRUE - If successful

Example

if(IsClientWarden(client)) {
  return;
}
WardenExists

Checks if there currently is a warden.

Parameters
    Nothing
Returns
    TRUE - If successful

Example

if(WardenExists) {
  return;
}
SetWarden

Makes the given client warden for the round.

Parameters
    int CLIENT - Client index
Returns
    TRUE - If successful

Example

int client = -1;
public void OnMapStart() {
  SetWarden(client);
}
RemoveWarden

Removes the current warden.

Parameters
    Nothing
Returns
    TRUE - If successful

Example

public void OnMapEnd {
  RemoveWarden();
}
GetCurrentWarden

Fetch the current wardens' client index.

Parameters
    Nothing
Returns
    CLIENT - Client index of the current warden.

Example

public void OnWardenCreated(int client) {
  int warden = GetCurrentWarden();
}
GetTeamAliveClientCount

Gets the amount of alive players in the specified team.

Parameters
    TEAM - Team index number.
Returns
    COUNT - Number of alive players.

Example

public void OnMapStart() {
  int team1 = GetTeamAliveClientCount(CS_TEAM_T);
}

Clone this wiki locally