-
Notifications
You must be signed in to change notification settings - Fork 3
API: Natives
betterwarden.inc
- IsClientWarden
- WardenExists
- SetWarden
- RemoveWarden
- GetCurrentWarden
- GetTeamAliveClientCount
- IsClientWardenAdmin
wardenmenu.inc
- IsEventDayActive
- IsHnsActive
- IsGravFreedayActive
- IsWarActive
- IsFreedayActive
- ClientHasFreeday
- GiveClientFreeday
- RemoveClientFreeday
- SetClientBeacon
- ExecWarday
- ExecFreeday
- ExecHnS
- ExecGravday
IsClientWarden | |
---|---|
Checks if the given client is currently warden. |
|
Parameters int CLIENT - Client index |
Returns TRUE - If yes |
if(IsClientWarden(client)) { return Plugin_Handled; }
WardenExists | |
---|---|
Checks if there currently is a warden. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(WardenExists()) { return Plugin_Handled; }
SetWarden | |
---|---|
Makes the given client warden for the round. |
|
Parameters int CLIENT - Client index |
Returns TRUE - If successful |
int client; public void OnMapStart() { SetWarden(client); }
RemoveWarden | |
---|---|
Removes the current warden. |
|
Parameters Nothing |
Returns TRUE - If successful |
public void OnMapEnd { RemoveWarden(); }
GetCurrentWarden | |
---|---|
Fetch the current wardens' client index. |
|
Parameters Nothing |
Returns CLIENT - Client index of the current warden |
public fetchWarden() { int warden = GetCurrentWarden(); return warden; }
GetTeamAliveClientCount | |
---|---|
Gets the amount of alive players in the specified team. |
|
Parameters TEAM - Team index number |
Returns COUNT - Number of alive players |
public void OnMapStart() { int team1 = GetTeamAliveClientCount(CS_TEAM_T); }
IsClientWardenAdmin | |
---|---|
Checks if the client is a Better Warden admin |
|
Parameters CLIENT - Client index |
Returns TRUE - If yes |
public Action command(int client, int args) { if(!IsClientWardenAdmin(client)) { return Plugin_Handled; } }
IsEventDayActive | |
---|---|
Check if there is a event day currently active. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(IsEventDayActive()) { return Plugin_Handled; }
IsHnsActive | |
---|---|
Check if a Hide and Seek game is running. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(IsHnsActive()) { return Plugin_Handled; }
IsGravFreedayActive | |
---|---|
Check if a Gravity Freeday is running. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(IsGravFreedayActive()) { return Plugin_Handled; }
IsWarActive | |
---|---|
Check if a warday is running. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(IsWarActive()) { return Plugin_Handled; }
IsFreedayActive | |
---|---|
Check if a freeday is running. |
|
Parameters Nothing |
Returns TRUE - If yes |
if(IsFreedayActive()) { return Plugin_Handled; }
ClientHasFreeday | |
---|---|
Check if the specified client already has a freeday. |
|
Parameters CLIENT - Client index |
Returns TRUE - If yes |
if(ClientHasFreeday(client)) { return Plugin_Handled; }
GiveClientFreeday | |
---|---|
Give a client a freeday |
|
Parameters CLIENT - Client index |
Returns TRUE - If successful |
int client; if(WardenExists()) { GiveClientFreeday(client); }
RemoveClientFreeday | |
---|---|
Remove a client's freeday |
|
Parameters CLIENT - Client index |
Returns TRUE - If successful |
int client; if(!WardenExists()) { RemoveClientFreeday(client); }
SetClientBeacon | |
---|---|
Sets a beacon on a client. Just like the one in the SM Admin Menu. |
|
Parameters CLIENT - Client index beaconState - State of the beacon |
Returns TRUE - If successful |
int client; if(ClientHasFreeday(client)) { SetClientBeacon(client, true); }
ExecWarday | |
---|---|
Executes a warday. This will execute whether or not a game is already running. Make sure to check before with IsEventDayActive()! |
|
Parameters Nothing |
Returns TRUE - If successful |
public void OnMapStart() { ExecWarday(); }
ExecFreeday | |
---|---|
Executes a freeday. This will execute whether or not a game is already running. Make sure to check before with IsEventDayActive()! |
|
Parameters Nothing |
Returns TRUE - If successful |
public void OnMapStart() { ExecFreeday(); }
ExecHnS | |
---|---|
Executes a HnS. This will execute whether or not a game is already running. Make sure to check before with IsEventDayActive()! |
|
Parameters WINNERS - Number of winners |
Returns TRUE - If successful |
public void OnMapStart() { ExecHnS(2); }
ExecGravday | |
---|---|
Executes a Gravity Freeday. This will execute whether or not a game is already running. Make sure to check before with IsEventDayActive()! |
|
Parameters Nothing |
Returns TRUE - If successful |
public void OnMapStart() { ExecGravday(); }
BW © Jonathan Öhrström, built with contributions by developers!