-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvars.h
111 lines (91 loc) · 3.2 KB
/
cvars.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* ======== Basic Admin tool ========
* Copyright (C) 2004-2007 Erling K. Sæterdal
* No warranties of any kind
*
* License: zlib/libpng
*
* Author(s): Erling K. Sæterdal ( EKS )
* Credits:
* Menu code based on code from CSDM ( http://www.tcwonline.org/~dvander/cssdm ) Created by BAILOPAN
* Helping on misc errors/functions: BAILOPAN,karma,LDuke,sslice,devicenull,PMOnoTo,cybermind ( most who idle in #sourcemod on GameSurge realy )
* ============================ */
#ifndef _INCLUDE_CVARS_H
#define _INCLUDE_CVARS_H
#include "hl2sdk/convar.h"
#include "icvar.h"
extern ConVar g_VarMapVotesRequired;
extern ConVar g_VarPlayerVotesRequired;
extern ConVar g_VarReservedSlotsRedirectAddress;
extern ConVar g_VarReservedSlotsRedirect;
extern ConVar g_VarPubTimeLeft;
extern ConVar g_VarHideAdminAction;
extern ConVar g_VarInterfaceSM;
// SQL Cvars
extern ConVar g_VarSQLEnabled;
extern ConVar g_VarSQLUserName;
extern ConVar g_VarSQLPassword;
extern ConVar g_VarSQLDateBase;
extern ConVar g_VarSQLServerIP;
extern ConVar g_VarSQLAdminTable;
extern ConVar g_VarSQLLogTable;
extern ConVar g_VarSQLAmxBansServerTable;
class BATVars
{
public:
//void SetICvar(ICvar *pICvar) {g_pCVar = pICvar; }
//ICvar *GetICVar() {return g_pCVar; }
int GetMapVotesRequired() { return g_VarMapVotesRequired.GetInt(); }
int GetPlayerVotesRequired() { return g_VarPlayerVotesRequired.GetInt(); }
int GetHideAdminName() { return g_VarHideAdminAction.GetInt(); }
const char *GetReservedSlotsRedirectAddress() { return g_VarReservedSlotsRedirectAddress.GetString(); }
bool GetReservedSlotsDoRedirect() { return g_VarReservedSlotsRedirect.GetBool(); }
bool PubTimeleftEnabled() { return g_VarPubTimeLeft.GetBool(); }
int GetSMInterface() { return g_VarInterfaceSM.GetInt(); }
int GetMapExtendOption();
bool ReloadSettingsOnMapChange();
bool AllowNonAdminPlayersToSendAdminSay();
bool GetUseSigScanner();
int GetMapExtendTimes();
int GetReservedSlotCount();
int GetReservedSlots();
int GetAuthTime();
int GetPubMsgMode();
int GetMapRockTheVote();
int GetMenuType();
int GetAdminInterfaceEnabled();
int GetVoteBanTime();
int GetWinLimit();
int GetRoundLimit();
float GetPubMsgTime();
float GetMapChangeDelay();
void GetSQLInfo();
const char *GetHostName();
const char *GetServerRules();
const char *GetBATLanguage();
ConVar* GetTimelimitCvar() {return g_pTimeLimit;}
ConVar* GetWinlimitCvar() {return g_pWinLimit;}
ConVar* SetNextMap() {return g_pNextMap;}
void SetupCallBacks();
const char* GetCvarString(char *CvarName);
int GetCvarInt(char *CvarName);
ConVar * GetCvarPointer(char *CvarName);
bool HookCvars();
private:
static void cbUpdateSQLInfo();
static void cbUpdateAuthTime();
static void cbUpdatePubMsg();
static void cbUpdatePublicVoteCmds();
static void cbBATMenuType();
static void cbRulesCVAR();
static void cbUpdateVotingCvars();
ConVar *g_pTimeLimit;
ConVar *g_pWinLimit;
ConVar *g_pHostName;
ConVar *g_pChatTime;
ConVar *g_pRoundLimit;
ConVar *g_pNextMap; // Nextmap for INs or any other map
};
extern BATVars g_BATVars;
extern char g_RulesURL[512];
extern bool g_RulesURLSet;
#endif //_INCLUDE_CVARS_H