Compare commits
48 Commits
amxmodx-1.
...
amxmodx-1.
Author | SHA1 | Date | |
---|---|---|---|
7e90fe8a70 | |||
68f1ce7a52 | |||
e5b0ed3af1 | |||
49e70063fa | |||
7aa4cf70be | |||
b661873426 | |||
8e290cdf31 | |||
42f23a832a | |||
13e619bf97 | |||
4332d6c271 | |||
627b3f0f98 | |||
b7b55d060a | |||
b110021f4f | |||
96c49f4ff9 | |||
f53c877670 | |||
b237317e50 | |||
73b2ceb855 | |||
b64fb4678d | |||
d6ed1a8d8a | |||
b762174c30 | |||
86838bead1 | |||
e6c15d9f05 | |||
266ed797c5 | |||
93cb2060dd | |||
0cd1782d01 | |||
75a5dadd4d | |||
f03449acbd | |||
34f127b9aa | |||
0c345ceebc | |||
c5dc780635 | |||
fe0e461c76 | |||
935da9f0de | |||
36e9f29d55 | |||
c66c076a03 | |||
4eaea443e1 | |||
299f1b5f62 | |||
4e7bf7e348 | |||
d048996b50 | |||
a34c8daf34 | |||
6cd5a51c8e | |||
5cabf748ca | |||
1905ea7295 | |||
89158f9342 | |||
db7dc509e0 | |||
c15a23a2a7 | |||
3e0866e57a | |||
551e5298cc | |||
dfea3e8a13 |
@ -226,6 +226,8 @@ void CSPForward::Set(int func, AMX *amx, int numParams, const ForwardParam *para
|
|||||||
name[0] = '\0';
|
name[0] = '\0';
|
||||||
amx_GetPublic(amx, func, name);
|
amx_GetPublic(amx, func, name);
|
||||||
m_Name.assign(name);
|
m_Name.assign(name);
|
||||||
|
m_ToDelete = false;
|
||||||
|
m_InExec = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSPForward::Set(const char *funcName, AMX *amx, int numParams, const ForwardParam *paramTypes)
|
void CSPForward::Set(const char *funcName, AMX *amx, int numParams, const ForwardParam *paramTypes)
|
||||||
@ -236,6 +238,8 @@ void CSPForward::Set(const char *funcName, AMX *amx, int numParams, const Forwar
|
|||||||
m_HasFunc = (amx_FindPublic(amx, funcName, &m_Func) == AMX_ERR_NONE);
|
m_HasFunc = (amx_FindPublic(amx, funcName, &m_Func) == AMX_ERR_NONE);
|
||||||
isFree = false;
|
isFree = false;
|
||||||
m_Name.assign(funcName);
|
m_Name.assign(funcName);
|
||||||
|
m_ToDelete = false;
|
||||||
|
m_InExec = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
||||||
@ -248,13 +252,15 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
|||||||
cell realParams[FORWARD_MAX_PARAMS];
|
cell realParams[FORWARD_MAX_PARAMS];
|
||||||
cell *physAddrs[FORWARD_MAX_PARAMS];
|
cell *physAddrs[FORWARD_MAX_PARAMS];
|
||||||
|
|
||||||
if (!m_HasFunc)
|
if (!m_HasFunc || m_ToDelete)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(m_Amx);
|
CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(m_Amx);
|
||||||
if (!pPlugin->isExecutable(m_Func))
|
if (!pPlugin->isExecutable(m_Func))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
m_InExec = true;
|
||||||
|
|
||||||
Debugger *pDebugger = (Debugger *)m_Amx->userdata[UD_DEBUGGER];
|
Debugger *pDebugger = (Debugger *)m_Amx->userdata[UD_DEBUGGER];
|
||||||
if (pDebugger)
|
if (pDebugger)
|
||||||
pDebugger->BeginExec();
|
pDebugger->BeginExec();
|
||||||
@ -356,6 +362,8 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_InExec = false;
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +460,20 @@ bool CForwardMngr::isIdValid(int id) const
|
|||||||
|
|
||||||
cell CForwardMngr::executeForwards(int id, cell *params)
|
cell CForwardMngr::executeForwards(int id, cell *params)
|
||||||
{
|
{
|
||||||
int retVal = (id & 1) ? m_SPForwards[id >> 1]->execute(params, m_TmpArrays) : m_Forwards[id >> 1]->execute(params, m_TmpArrays);
|
int retVal;
|
||||||
|
if (id & 1)
|
||||||
|
{
|
||||||
|
CSPForward *fwd = m_SPForwards[id >> 1];
|
||||||
|
retVal = fwd->execute(params, m_TmpArrays);
|
||||||
|
if (fwd->m_ToDelete)
|
||||||
|
{
|
||||||
|
fwd->m_ToDelete = false;
|
||||||
|
unregisterSPForward(id);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
retVal = m_Forwards[id >> 1]->execute(params, m_TmpArrays);
|
||||||
|
}
|
||||||
|
|
||||||
m_TmpArraysNum = 0;
|
m_TmpArraysNum = 0;
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
@ -524,8 +545,15 @@ void CForwardMngr::unregisterSPForward(int id)
|
|||||||
if (!isIdValid(id) || m_SPForwards.at(id >> 1)->isFree)
|
if (!isIdValid(id) || m_SPForwards.at(id >> 1)->isFree)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_SPForwards.at(id >> 1)->isFree = true;
|
CSPForward *fwd = m_SPForwards.at(id >> 1);
|
||||||
m_FreeSPForwards.push(id);
|
|
||||||
|
if (fwd->m_InExec)
|
||||||
|
{
|
||||||
|
fwd->m_ToDelete = true;
|
||||||
|
} else {
|
||||||
|
fwd->isFree = true;
|
||||||
|
m_FreeSPForwards.push(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num, int fwd_type)
|
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num, int fwd_type)
|
||||||
|
@ -143,6 +143,7 @@ public:
|
|||||||
// Single plugin forward
|
// Single plugin forward
|
||||||
class CSPForward
|
class CSPForward
|
||||||
{
|
{
|
||||||
|
friend class CForwardMngr;
|
||||||
const char *m_FuncName;
|
const char *m_FuncName;
|
||||||
int m_NumParams;
|
int m_NumParams;
|
||||||
|
|
||||||
@ -152,6 +153,8 @@ class CSPForward
|
|||||||
int m_Func;
|
int m_Func;
|
||||||
bool m_HasFunc;
|
bool m_HasFunc;
|
||||||
String m_Name;
|
String m_Name;
|
||||||
|
bool m_InExec;
|
||||||
|
bool m_ToDelete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool isFree;
|
bool isFree;
|
||||||
|
@ -87,6 +87,10 @@ void MenuMngr::removeMenuId(int id)
|
|||||||
{
|
{
|
||||||
if (c->menuid == id)
|
if (c->menuid == id)
|
||||||
{
|
{
|
||||||
|
if (m_watch_iter.a == c)
|
||||||
|
{
|
||||||
|
++m_watch_iter;
|
||||||
|
}
|
||||||
if (lc)
|
if (lc)
|
||||||
lc->next = c->next;
|
lc->next = c->next;
|
||||||
else
|
else
|
||||||
@ -140,4 +144,13 @@ void MenuMngr::clear()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MenuMngr::iterator MenuMngr::SetWatchIter(MenuMngr::iterator iter)
|
||||||
|
{
|
||||||
|
MenuMngr::iterator old = m_watch_iter;
|
||||||
|
|
||||||
|
m_watch_iter = iter;
|
||||||
|
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
|
||||||
int MenuMngr::MenuIdEle::uniqueid = 0;
|
int MenuMngr::MenuIdEle::uniqueid = 0;
|
||||||
|
@ -76,7 +76,8 @@ private:
|
|||||||
} *headcmd;
|
} *headcmd;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MenuMngr() { headid = 0; headcmd = 0; }
|
MenuMngr() : m_watch_iter(end())
|
||||||
|
{ headid = NULL; headcmd = NULL; }
|
||||||
~MenuMngr();
|
~MenuMngr();
|
||||||
|
|
||||||
// Interface
|
// Interface
|
||||||
@ -89,6 +90,7 @@ public:
|
|||||||
|
|
||||||
class iterator
|
class iterator
|
||||||
{
|
{
|
||||||
|
friend class MenuMngr;
|
||||||
MenuCommand* a;
|
MenuCommand* a;
|
||||||
public:
|
public:
|
||||||
iterator(MenuCommand*aa) : a(aa) {}
|
iterator(MenuCommand*aa) : a(aa) {}
|
||||||
@ -101,6 +103,11 @@ public:
|
|||||||
|
|
||||||
inline iterator begin() const { return iterator(headcmd); }
|
inline iterator begin() const { return iterator(headcmd); }
|
||||||
inline iterator end() const { return iterator(0); }
|
inline iterator end() const { return iterator(0); }
|
||||||
|
|
||||||
|
MenuMngr::iterator SetWatchIter(MenuMngr::iterator iter);
|
||||||
|
inline MenuMngr::iterator GetWatchIter() { return m_watch_iter; }
|
||||||
|
private:
|
||||||
|
MenuMngr::iterator m_watch_iter;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //MENUS_H
|
#endif //MENUS_H
|
||||||
|
@ -1219,7 +1219,7 @@ static cell AMX_NATIVE_CALL register_concmd(AMX *amx, cell *params) /* 4 param *
|
|||||||
cmd->setCmdType(CMD_ConsoleCommand);
|
cmd->setCmdType(CMD_ConsoleCommand);
|
||||||
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
|
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
|
||||||
|
|
||||||
return 1;
|
return cmd->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
|
static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
|
||||||
@ -1253,7 +1253,7 @@ static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
|
|||||||
|
|
||||||
cmd->setCmdType(CMD_ClientCommand);
|
cmd->setCmdType(CMD_ClientCommand);
|
||||||
|
|
||||||
return 1;
|
return cmd->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param */
|
static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param */
|
||||||
@ -1288,7 +1288,7 @@ static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param *
|
|||||||
cmd->setCmdType(CMD_ServerCommand);
|
cmd->setCmdType(CMD_ServerCommand);
|
||||||
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
|
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
|
||||||
|
|
||||||
return 0;
|
return cmd->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_concmd(AMX *amx, cell *params) /* 7 param */
|
static cell AMX_NATIVE_CALL get_concmd(AMX *amx, cell *params) /* 7 param */
|
||||||
@ -4263,7 +4263,19 @@ static cell AMX_NATIVE_CALL is_user_hacking(AMX *amx, cell *params)
|
|||||||
|
|
||||||
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell));
|
cell value = params[2];
|
||||||
|
|
||||||
|
if (!value)
|
||||||
|
{
|
||||||
|
memset(get_amxaddr(amx, params[1]), 0, params[3] * sizeof(cell));
|
||||||
|
} else {
|
||||||
|
int size = params[3];
|
||||||
|
cell *addr = get_amxaddr(amx, params[1]);
|
||||||
|
for (int i=0; i<size; i++)
|
||||||
|
{
|
||||||
|
addr[i] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
#define AMXXLOG_Log g_log.Log
|
#define AMXXLOG_Log g_log.Log
|
||||||
#define AMXXLOG_Error g_log.LogError
|
#define AMXXLOG_Error g_log.LogError
|
||||||
#define AMX_VERSION "1.76b"
|
#define AMX_VERSION "1.76c"
|
||||||
|
|
||||||
extern AMX_NATIVE_INFO core_Natives[];
|
extern AMX_NATIVE_INFO core_Natives[];
|
||||||
extern AMX_NATIVE_INFO time_Natives[];
|
extern AMX_NATIVE_INFO time_Natives[];
|
||||||
|
@ -904,6 +904,7 @@ void C_ClientCommand(edict_t *pEntity)
|
|||||||
|
|
||||||
while (a)
|
while (a)
|
||||||
{
|
{
|
||||||
|
g_menucmds.SetWatchIter(a);
|
||||||
if ((*a).matchCommand(menuid, bit_key) && (*a).getPlugin()->isExecutable((*a).getFunction()))
|
if ((*a).matchCommand(menuid, bit_key) && (*a).getPlugin()->isExecutable((*a).getFunction()))
|
||||||
{
|
{
|
||||||
if (pPlayer->newmenu != -1)
|
if (pPlayer->newmenu != -1)
|
||||||
@ -940,7 +941,12 @@ void C_ClientCommand(edict_t *pEntity)
|
|||||||
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
|
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++a;
|
if (g_menucmds.GetWatchIter() != a)
|
||||||
|
{
|
||||||
|
a = g_menucmds.GetWatchIter();
|
||||||
|
} else {
|
||||||
|
++a;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -598,7 +598,7 @@ int set_amxnatives(AMX* amx, char error[128])
|
|||||||
if ((err = amx_Exec(amx, &retval, idx)) != AMX_ERR_NONE)
|
if ((err = amx_Exec(amx, &retval, idx)) != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
Debugger::GenericMessage(amx, err);
|
Debugger::GenericMessage(amx, err);
|
||||||
AMXXLOG_Log("An error occurred in plugins_native. This is dangerous!");
|
AMXXLOG_Log("An error occurred in plugin_natives. This is dangerous!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,10 +778,6 @@
|
|||||||
RelativePath="..\md5.h"
|
RelativePath="..\md5.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\menus.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\messages.h"
|
RelativePath="..\messages.h"
|
||||||
>
|
>
|
||||||
|
@ -343,13 +343,16 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int slots = 0;
|
int slots = 0;
|
||||||
|
int option_display = 0;
|
||||||
|
|
||||||
for (item_t i = start; i <= end; i++)
|
for (item_t i = start; i <= end; i++)
|
||||||
{
|
{
|
||||||
pItem = m_Items[i];
|
pItem = m_Items[i];
|
||||||
|
|
||||||
if (pItem->access && !(pItem->access & g_players[player].flags[0]))
|
if (pItem->access && !(pItem->access & g_players[player].flags[0]))
|
||||||
|
{
|
||||||
enabled = false;
|
enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (pItem->handler != -1)
|
if (pItem->handler != -1)
|
||||||
{
|
{
|
||||||
@ -373,22 +376,32 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enabled)
|
||||||
|
{
|
||||||
|
keys |= (1<<option);
|
||||||
|
}
|
||||||
|
|
||||||
|
option_display = ++option;
|
||||||
|
if (option_display == 10)
|
||||||
|
{
|
||||||
|
option_display = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
keys |= (1<<option);
|
keys |= (1<<option);
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
{
|
{
|
||||||
_snprintf(buffer, sizeof(buffer)-1, "\\r%d.\\w %s\n", ++option, pItem->name.c_str());
|
_snprintf(buffer, sizeof(buffer)-1, "\\r%d.\\w %s\n", option_display, pItem->name.c_str());
|
||||||
} else {
|
} else {
|
||||||
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", ++option, pItem->name.c_str());
|
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", option_display, pItem->name.c_str());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_AutoColors)
|
if (m_AutoColors)
|
||||||
{
|
{
|
||||||
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", ++option, pItem->name.c_str());
|
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", option_display, pItem->name.c_str());
|
||||||
} else {
|
} else {
|
||||||
_snprintf(buffer, sizeof(buffer)-1, "#. %s\n", pItem->name.c_str());
|
_snprintf(buffer, sizeof(buffer)-1, "#. %s\n", pItem->name.c_str());
|
||||||
option++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slots++;
|
slots++;
|
||||||
|
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FN_META_DETACH
|
#ifdef FN_META_DETACH
|
||||||
return FN_META_DETACH();
|
FN_META_DETACH();
|
||||||
#endif // FN_META_DETACH
|
#endif // FN_META_DETACH
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
|
|||||||
#endif // FN_AlertMessage
|
#endif // FN_AlertMessage
|
||||||
|
|
||||||
#ifdef FN_EngineFprintf
|
#ifdef FN_EngineFprintf
|
||||||
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
|
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
|
||||||
#endif // FN_EngineFprintf
|
#endif // FN_EngineFprintf
|
||||||
|
|
||||||
#ifdef FN_PvAllocEntPrivateData
|
#ifdef FN_PvAllocEntPrivateData
|
||||||
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
|
|||||||
#endif // FN_GetBonePosition
|
#endif // FN_GetBonePosition
|
||||||
|
|
||||||
#ifdef FN_FunctionFromName
|
#ifdef FN_FunctionFromName
|
||||||
unsigned long FN_FunctionFromName(const char *pName);
|
uint32 FN_FunctionFromName(const char *pName);
|
||||||
#endif // FN_FunctionFromName
|
#endif // FN_FunctionFromName
|
||||||
|
|
||||||
#ifdef FN_NameForFunction
|
#ifdef FN_NameForFunction
|
||||||
const char *FN_NameForFunction(unsigned long function);
|
const char *FN_NameForFunction(uint32);
|
||||||
#endif // FN_NameForFunction
|
#endif // FN_NameForFunction
|
||||||
|
|
||||||
#ifdef FN_ClientPrintf
|
#ifdef FN_ClientPrintf
|
||||||
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
|
|||||||
#endif // FN_CRC32_Final
|
#endif // FN_CRC32_Final
|
||||||
|
|
||||||
#ifdef FN_RandomLong
|
#ifdef FN_RandomLong
|
||||||
long FN_RandomLong(long lLow, long lHigh);
|
int32 FN_RandomLong(int32 lLow, int32 lHigh);
|
||||||
#endif // FN_RandomLong
|
#endif // FN_RandomLong
|
||||||
|
|
||||||
#ifdef FN_RandomFloat
|
#ifdef FN_RandomFloat
|
||||||
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
|
|||||||
#endif // FN_AlertMessage_Post
|
#endif // FN_AlertMessage_Post
|
||||||
|
|
||||||
#ifdef FN_EngineFprintf_Post
|
#ifdef FN_EngineFprintf_Post
|
||||||
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
|
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
|
||||||
#endif // FN_EngineFprintf_Post
|
#endif // FN_EngineFprintf_Post
|
||||||
|
|
||||||
#ifdef FN_PvAllocEntPrivateData_Post
|
#ifdef FN_PvAllocEntPrivateData_Post
|
||||||
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
|
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
|
||||||
#endif // FN_PvAllocEntPrivateData_Post
|
#endif // FN_PvAllocEntPrivateData_Post
|
||||||
|
|
||||||
#ifdef FN_PvEntPrivateData_Post
|
#ifdef FN_PvEntPrivateData_Post
|
||||||
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
|
|||||||
#endif // FN_GetBonePosition_Post
|
#endif // FN_GetBonePosition_Post
|
||||||
|
|
||||||
#ifdef FN_FunctionFromName_Post
|
#ifdef FN_FunctionFromName_Post
|
||||||
unsigned long FN_FunctionFromName_Post(const char *pName);
|
uint32 FN_FunctionFromName_Post(const char *pName);
|
||||||
#endif // FN_FunctionFromName_Post
|
#endif // FN_FunctionFromName_Post
|
||||||
|
|
||||||
#ifdef FN_NameForFunction_Post
|
#ifdef FN_NameForFunction_Post
|
||||||
const char *FN_NameForFunction_Post(unsigned long function);
|
const char *FN_NameForFunction_Post(uint32);
|
||||||
#endif // FN_NameForFunction_Post
|
#endif // FN_NameForFunction_Post
|
||||||
|
|
||||||
#ifdef FN_ClientPrintf_Post
|
#ifdef FN_ClientPrintf_Post
|
||||||
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
|
|||||||
#endif // FN_CRC32_Final_Post
|
#endif // FN_CRC32_Final_Post
|
||||||
|
|
||||||
#ifdef FN_RandomLong_Post
|
#ifdef FN_RandomLong_Post
|
||||||
long FN_RandomLong_Post(long lLow, long lHigh);
|
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
|
||||||
#endif // FN_RandomLong_Post
|
#endif // FN_RandomLong_Post
|
||||||
|
|
||||||
#ifdef FN_RandomFloat_Post
|
#ifdef FN_RandomFloat_Post
|
||||||
|
@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,7,6,2
|
FILEVERSION 1,7,6,3187
|
||||||
PRODUCTVERSION 1,7,6,2
|
PRODUCTVERSION 1,7,6,3187
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -45,12 +45,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "AMX Mod X"
|
VALUE "Comments", "AMX Mod X"
|
||||||
VALUE "FileDescription", "AMX Mod X"
|
VALUE "FileDescription", "AMX Mod X"
|
||||||
VALUE "FileVersion", "1.76b"
|
VALUE "FileVersion", "1.76c"
|
||||||
VALUE "InternalName", "amxmodx"
|
VALUE "InternalName", "amxmodx"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2004-2006, AMX Mod X Dev Team"
|
VALUE "LegalCopyright", "Copyright (c) 2004-2006, AMX Mod X Dev Team"
|
||||||
VALUE "OriginalFilename", "amxmodx_mm.dll"
|
VALUE "OriginalFilename", "amxmodx_mm.dll"
|
||||||
VALUE "ProductName", "AMX Mod X"
|
VALUE "ProductName", "AMX Mod X"
|
||||||
VALUE "ProductVersion", "1.76b"
|
VALUE "ProductVersion", "1.76c"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -244,9 +244,14 @@ void CPlayer::saveBDefused(){
|
|||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
|
||||||
bool ignoreBots (edict_t *pEnt, edict_t *pOther){
|
bool ignoreBots(edict_t *pEnt, edict_t *pOther)
|
||||||
if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
|
{
|
||||||
|
rankBots = (int)csstats_rankbots->value ? true : false;
|
||||||
|
if (!rankBots && (pEnt->v.flags & FL_FAKECLIENT || (pOther && pOther->v.flags & FL_FAKECLIENT)))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ cvar_t *csstats_rank;
|
|||||||
|
|
||||||
cvar_t* csstats_rankbots;
|
cvar_t* csstats_rankbots;
|
||||||
cvar_t* csstats_pause;
|
cvar_t* csstats_pause;
|
||||||
cvar_t init_csstats_rankbots ={"csstats_rankbots","1"};
|
cvar_t init_csstats_rankbots ={"csstats_rankbots","0"};
|
||||||
cvar_t init_csstats_pause = {"csstats_pause","0"};
|
cvar_t init_csstats_pause = {"csstats_pause","0"};
|
||||||
|
|
||||||
struct sUserMsg
|
struct sUserMsg
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "CSX"
|
#define MODULE_NAME "CSX"
|
||||||
#define MODULE_VERSION "1.76a"
|
#define MODULE_VERSION "1.76c"
|
||||||
#define MODULE_AUTHOR "AMX Mod X Dev Team"
|
#define MODULE_AUTHOR "AMX Mod X Dev Team"
|
||||||
#define MODULE_URL "http://www.amxmodx.org/"
|
#define MODULE_URL "http://www.amxmodx.org/"
|
||||||
#define MODULE_LOGTAG "CSX"
|
#define MODULE_LOGTAG "CSX"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@ -24,8 +25,8 @@ int Journal::Replay(VaultMap *pMap)
|
|||||||
|
|
||||||
BinaryReader br(m_fp);
|
BinaryReader br(m_fp);
|
||||||
|
|
||||||
int8_t len8;
|
uint8_t len8;
|
||||||
int16_t len16;
|
uint16_t len16;
|
||||||
char *key = NULL;
|
char *key = NULL;
|
||||||
char *val = NULL;
|
char *val = NULL;
|
||||||
String sKey;
|
String sKey;
|
||||||
|
@ -2773,7 +2773,7 @@ void ValidateMacros_DontCallThis_Smiley()
|
|||||||
MF_FindLibrary(NULL, LibType_Class);
|
MF_FindLibrary(NULL, LibType_Class);
|
||||||
MF_AddLibraries(NULL, LibType_Class, NULL);
|
MF_AddLibraries(NULL, LibType_Class, NULL);
|
||||||
MF_RemoveLibraries(NULL);
|
MF_RemoveLibraries(NULL);
|
||||||
MF_OverrideNatives(NULL);
|
MF_OverrideNatives(NULL, "");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "nVault"
|
#define MODULE_NAME "nVault"
|
||||||
#define MODULE_VERSION "1.76"
|
#define MODULE_VERSION "1.76c"
|
||||||
#define MODULE_AUTHOR "AMX Mod X Dev Team"
|
#define MODULE_AUTHOR "AMX Mod X Dev Team"
|
||||||
#define MODULE_URL "http://www.amxmodx.org/"
|
#define MODULE_URL "http://www.amxmodx.org/"
|
||||||
#define MODULE_LOGTAG "nVault"
|
#define MODULE_LOGTAG "nVault"
|
||||||
|
@ -169,6 +169,8 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
iter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
-M
|
-M
|
||||||
-$M16384,1048576
|
-$M16384,1048576
|
||||||
-K$00400000
|
-K$00400000
|
||||||
-LE"c:\programme\borland\delphi7\Projects\Bpl"
|
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
-LN"c:\programme\borland\delphi7\Projects\Bpl"
|
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
||||||
-DmadExcept
|
-DmadExcept
|
||||||
-w-UNSAFE_TYPE
|
-w-UNSAFE_TYPE
|
||||||
-w-UNSAFE_CODE
|
-w-UNSAFE_CODE
|
||||||
|
@ -115,7 +115,7 @@ AutoIncBuild=1
|
|||||||
MajorVer=1
|
MajorVer=1
|
||||||
MinorVer=4
|
MinorVer=4
|
||||||
Release=3
|
Release=3
|
||||||
Build=1
|
Build=3
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
@ -126,7 +126,7 @@ CodePage=1252
|
|||||||
[Version Info Keys]
|
[Version Info Keys]
|
||||||
CompanyName=AMX Mod X Dev Team
|
CompanyName=AMX Mod X Dev Team
|
||||||
FileDescription=
|
FileDescription=
|
||||||
FileVersion=1.4.3.1
|
FileVersion=1.4.3.3
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=AMX Mod X Dev Team
|
LegalCopyright=AMX Mod X Dev Team
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -80,7 +80,7 @@ function IEInstalled: Boolean;
|
|||||||
function GetAMXXDir(ListenServer: Boolean): String;
|
function GetAMXXDir(ListenServer: Boolean): String;
|
||||||
|
|
||||||
function CloseDocument(eDocument: TDocument; SaveActiveDoc, RemoveTab: Boolean): Boolean;
|
function CloseDocument(eDocument: TDocument; SaveActiveDoc, RemoveTab: Boolean): Boolean;
|
||||||
function AddExtension(eFilename, eHighlighter: String): String;
|
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
|
||||||
|
|
||||||
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
|
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
|
||||||
|
|
||||||
@ -468,11 +468,15 @@ begin
|
|||||||
Collection.Close(eDocument.Index, RemoveTab);
|
Collection.Close(eDocument.Index, RemoveTab);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function AddExtension(eFilename, eHighlighter: String): String;
|
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
|
||||||
begin
|
begin
|
||||||
if ExtractFileExt(eFilename) = '' then begin
|
if ExtractFileExt(eFilename) = '' then begin
|
||||||
if eHighlighter = 'Pawn' then
|
if eHighlighter = 'Pawn' then begin
|
||||||
Result := eFilename + '.sma';
|
if (ExtractFileExt(Document.Title) = '.inc') then
|
||||||
|
Result := eFilename + '.inc'
|
||||||
|
else
|
||||||
|
Result := eFilename + '.sma';
|
||||||
|
end;
|
||||||
if eHighlighter = 'C++' then
|
if eHighlighter = 'C++' then
|
||||||
Result := eFilename + '.cpp';
|
Result := eFilename + '.cpp';
|
||||||
if eHighlighter = 'HTML' then
|
if eHighlighter = 'HTML' then
|
||||||
|
@ -7375,8 +7375,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
|
|||||||
ColorHighLight = 8623776
|
ColorHighLight = 8623776
|
||||||
ColorShadow = 8623776
|
ColorShadow = 8623776
|
||||||
Caption = 'Generate'
|
Caption = 'Generate'
|
||||||
ModalResult = 1
|
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
ModalResult = 1
|
||||||
end
|
end
|
||||||
object cmdCancel: TFlatButton
|
object cmdCancel: TFlatButton
|
||||||
Left = 334
|
Left = 334
|
||||||
@ -7388,8 +7388,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
|
|||||||
ColorHighLight = 8623776
|
ColorHighLight = 8623776
|
||||||
ColorShadow = 8623776
|
ColorShadow = 8623776
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
ModalResult = 2
|
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
ModalResult = 2
|
||||||
end
|
end
|
||||||
object pnlText: TPanel
|
object pnlText: TPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
@ -7430,7 +7430,7 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
|
|||||||
ColorFlat = clWhite
|
ColorFlat = clWhite
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Text = '12,0'
|
Text = '12,0'
|
||||||
OnChange = txtTimeToShowChange
|
OnExit = txtTimeToShowExit
|
||||||
OnKeyPress = txtTimeToShowKeyPress
|
OnKeyPress = txtTimeToShowKeyPress
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -47,10 +47,10 @@ type
|
|||||||
procedure cmdSelectColorClick(Sender: TObject);
|
procedure cmdSelectColorClick(Sender: TObject);
|
||||||
procedure txtTextChange(Sender: TObject);
|
procedure txtTextChange(Sender: TObject);
|
||||||
procedure txtTimeToShowKeyPress(Sender: TObject; var Key: Char);
|
procedure txtTimeToShowKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure txtTimeToShowChange(Sender: TObject);
|
|
||||||
procedure chkXCenterClick(Sender: TObject);
|
procedure chkXCenterClick(Sender: TObject);
|
||||||
procedure chkYCenterClick(Sender: TObject);
|
procedure chkYCenterClick(Sender: TObject);
|
||||||
procedure txtPosExit(Sender: TObject);
|
procedure txtPosExit(Sender: TObject);
|
||||||
|
procedure txtTimeToShowExit(Sender: TObject);
|
||||||
private
|
private
|
||||||
eDown: Boolean;
|
eDown: Boolean;
|
||||||
eStartPos: TPoint;
|
eStartPos: TPoint;
|
||||||
@ -89,7 +89,7 @@ begin
|
|||||||
lblHudMsg.Left := 0
|
lblHudMsg.Left := 0
|
||||||
else if lblHudMsg.Left > pnlHudmessage.Width then
|
else if lblHudMsg.Left > pnlHudmessage.Width then
|
||||||
lblHudMsg.Left := pnlHudmessage.Width;
|
lblHudMsg.Left := pnlHudmessage.Width;
|
||||||
txtXPos.Text := FloatToStr(RoundTo(lblHudMsg.Left / pnlHudmessage.Width, -2));
|
txtXPos.Text := FloatToStrF(lblHudMsg.Left / pnlHudmessage.Width, ffFixed, -2, 2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Y Pos }
|
{ Y Pos }
|
||||||
@ -99,7 +99,7 @@ begin
|
|||||||
lblHudMsg.Top := 0
|
lblHudMsg.Top := 0
|
||||||
else if lblHudMsg.Top > pnlHudmessage.Height then
|
else if lblHudMsg.Top > pnlHudmessage.Height then
|
||||||
lblHudMsg.Top := pnlHudmessage.Height;
|
lblHudMsg.Top := pnlHudmessage.Height;
|
||||||
txtYPos.Text := FloatToStr(RoundTo(lblHudMsg.Top / pnlHudmessage.Height, -2));
|
txtYPos.Text := FloatToStrF(lblHudMsg.Top / pnlHudmessage.Height, ffFixed, -2, 2);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -169,7 +169,7 @@ procedure TfrmHudMsgGenerator.txtTextKeyPress(Sender: TObject;
|
|||||||
var Key: Char);
|
var Key: Char);
|
||||||
begin
|
begin
|
||||||
if Key = #13 then begin
|
if Key = #13 then begin
|
||||||
txtText.SelText := '\n';
|
txtText.SelText := '^n';
|
||||||
Key := #0;
|
Key := #0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -195,7 +195,7 @@ begin
|
|||||||
if txtText.Text = '' then
|
if txtText.Text = '' then
|
||||||
lblHudMsg.Caption := 'Custom Hudmessage'
|
lblHudMsg.Caption := 'Custom Hudmessage'
|
||||||
else
|
else
|
||||||
lblHudMsg.Caption := StringReplace(txtText.Text, '\n', #13, [rfReplaceAll]);
|
lblHudMsg.Caption := StringReplace(txtText.Text, '^n', #13, [rfReplaceAll]);
|
||||||
|
|
||||||
if chkXCenter.Checked then
|
if chkXCenter.Checked then
|
||||||
CenterX;
|
CenterX;
|
||||||
@ -210,20 +210,6 @@ begin
|
|||||||
Key := ',';
|
Key := ',';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmHudMsgGenerator.txtTimeToShowChange(Sender: TObject);
|
|
||||||
var eVal: Real;
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
eVal := Round(StrToFloat(txtTimeToShow.Text));
|
|
||||||
if eVal < 0 then begin
|
|
||||||
eVal := 0.0;
|
|
||||||
txtTimeToShow.Text := FloatToStr(eVal);
|
|
||||||
end;
|
|
||||||
except
|
|
||||||
txtTimeToShow.Text := '12,0';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmHudMsgGenerator.chkXCenterClick(Sender: TObject);
|
procedure TfrmHudMsgGenerator.chkXCenterClick(Sender: TObject);
|
||||||
var eChar: Char;
|
var eChar: Char;
|
||||||
begin
|
begin
|
||||||
@ -276,4 +262,16 @@ begin
|
|||||||
txtYPos.OnKeyPress(txtXPos, eChar);
|
txtYPos.OnKeyPress(txtXPos, eChar);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmHudMsgGenerator.txtTimeToShowExit(Sender: TObject);
|
||||||
|
var eVal: Real;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
eVal := Round(StrToFloat(txtTimeToShow.Text));
|
||||||
|
if eVal < 0 then
|
||||||
|
txtTimeToShow.Text := '0,0';
|
||||||
|
except
|
||||||
|
txtTimeToShow.Text := '12,0';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -4544,7 +4544,6 @@ object frmMain: TfrmMain
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnClick = cmdCancelClick
|
OnClick = cmdCancelClick
|
||||||
CaptionGlowColor = clBtnFace
|
CaptionGlowColor = clBtnFace
|
||||||
DropDownArrow = True
|
|
||||||
LinkFont.Charset = DEFAULT_CHARSET
|
LinkFont.Charset = DEFAULT_CHARSET
|
||||||
LinkFont.Color = clBlue
|
LinkFont.Color = clBlue
|
||||||
LinkFont.Height = -11
|
LinkFont.Height = -11
|
||||||
@ -6569,6 +6568,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object IdFTP: TIdFTP
|
object IdFTP: TIdFTP
|
||||||
MaxLineAction = maSplit
|
MaxLineAction = maSplit
|
||||||
|
ReadTimeout = 0
|
||||||
ProxySettings.ProxyType = fpcmNone
|
ProxySettings.ProxyType = fpcmNone
|
||||||
ProxySettings.Port = 0
|
ProxySettings.Port = 0
|
||||||
Left = 722
|
Left = 722
|
||||||
|
@ -894,7 +894,7 @@ end;
|
|||||||
procedure TfrmMain.mnuSaveAsClick(Sender: TObject);
|
procedure TfrmMain.mnuSaveAsClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if sdSave.Execute then begin
|
if sdSave.Execute then begin
|
||||||
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter);
|
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter, ActiveDoc);
|
||||||
ActiveDoc.Save;
|
ActiveDoc.Save;
|
||||||
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
|
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
|
||||||
end;
|
end;
|
||||||
@ -1296,7 +1296,7 @@ begin
|
|||||||
b := Integer(frmAllFilesForm.lstFiles.Items.Objects[a]);
|
b := Integer(frmAllFilesForm.lstFiles.Items.Objects[a]);
|
||||||
if TDocument(Collection.Items[b]).Untitled then begin
|
if TDocument(Collection.Items[b]).Untitled then begin
|
||||||
if sdSave.Execute then begin
|
if sdSave.Execute then begin
|
||||||
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter);
|
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter, TDocument(Collection.Items[b]));
|
||||||
TDocument(Collection.Items[b]).Save;
|
TDocument(Collection.Items[b]).Save;
|
||||||
TJvTabBarItem(tbDocs.Tabs[b]).Caption := TDocument(Collection.Items[b]).Title;
|
TJvTabBarItem(tbDocs.Tabs[b]).Caption := TDocument(Collection.Items[b]).Title;
|
||||||
end
|
end
|
||||||
@ -1547,7 +1547,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
frmMain.sdSave.FilterIndex := 1;
|
frmMain.sdSave.FilterIndex := 1;
|
||||||
if frmMain.sdSave.Execute then begin
|
if frmMain.sdSave.Execute then begin
|
||||||
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1571,7 +1571,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
frmMain.sdSave.FilterIndex := 2;
|
frmMain.sdSave.FilterIndex := 2;
|
||||||
if frmMain.sdSave.Execute then begin
|
if frmMain.sdSave.Execute then begin
|
||||||
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1595,7 +1595,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
frmMain.sdSave.FilterIndex := 0;
|
frmMain.sdSave.FilterIndex := 0;
|
||||||
if frmMain.sdSave.Execute then begin
|
if frmMain.sdSave.Execute then begin
|
||||||
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1706,6 +1706,7 @@ procedure TfrmMain.mnuHudmessageClick(Sender: TObject);
|
|||||||
function Dot(eIn: string): string;
|
function Dot(eIn: string): string;
|
||||||
begin
|
begin
|
||||||
Result := StringReplace(eIn, ',', '.', [rfReplaceAll]);
|
Result := StringReplace(eIn, ',', '.', [rfReplaceAll]);
|
||||||
|
Result := StringReplace(Result, '.00', '.0', [rfReplaceAll]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var eStr: string;
|
var eStr: string;
|
||||||
@ -2231,7 +2232,7 @@ begin
|
|||||||
sciEditor.Lines.Add(#9 + 'if (socket_change(sck' + frmConnGen.txtName.Text + ', 100)) {');
|
sciEditor.Lines.Add(#9 + 'if (socket_change(sck' + frmConnGen.txtName.Text + ', 100)) {');
|
||||||
sciEditor.Lines.Add(#9 + #9 + 'new buf[512], lines[30][100], count = 0');
|
sciEditor.Lines.Add(#9 + #9 + 'new buf[512], lines[30][100], count = 0');
|
||||||
sciEditor.Lines.Add(#9 + #9 + 'socket_recv(sck' + frmConnGen.txtName.Text + ', buf, 511)');
|
sciEditor.Lines.Add(#9 + #9 + 'socket_recv(sck' + frmConnGen.txtName.Text + ', buf, 511)');
|
||||||
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 50, 119, buf, 13)');
|
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 29, 99, buf, 13)');
|
||||||
sciEditor.Lines.Add(#9 + #9 + 'for(new i=0;i<count;i++) {');
|
sciEditor.Lines.Add(#9 + #9 + 'for(new i=0;i<count;i++) {');
|
||||||
sciEditor.Lines.Add(#9 + #9 + #9 + '/* Process items here */');
|
sciEditor.Lines.Add(#9 + #9 + #9 + '/* Process items here */');
|
||||||
sciEditor.Lines.Add(#9 + #9 + '}');
|
sciEditor.Lines.Add(#9 + #9 + '}');
|
||||||
|
@ -3,4 +3,4 @@ source = /home/users/dvander/amxx
|
|||||||
makeopts =
|
makeopts =
|
||||||
output = /home/users/dvander/done
|
output = /home/users/dvander/done
|
||||||
devenv = /usr/bin/make
|
devenv = /usr/bin/make
|
||||||
release = amxmodx-1.76
|
release = amxmodx-1.76c
|
||||||
|
@ -3,4 +3,4 @@ source = R:\amxmodx
|
|||||||
makeopts =
|
makeopts =
|
||||||
output = c:\real\done
|
output = c:\real\done
|
||||||
devenv = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com
|
devenv = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com
|
||||||
release = amxmodx-1.76b
|
release = amxmodx-1.76c
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
; Licensed under the GNU General Public License
|
; Licensed under the GNU General Public License
|
||||||
; Originally written by -=HaXoMaTiC=-
|
; Originally written by -=HaXoMaTiC=-
|
||||||
!define PRODUCT_NAME "AMX Mod X Installer"
|
!define PRODUCT_NAME "AMX Mod X Installer"
|
||||||
!define PRODUCT_VERSION "1.76b"
|
!define PRODUCT_VERSION "1.76c"
|
||||||
!define PRODUCT_PUBLISHER "AMX Mod X Dev Team"
|
!define PRODUCT_PUBLISHER "AMX Mod X Dev Team"
|
||||||
!define PRODUCT_WEB_SITE "http://www.amxmodx.org/"
|
!define PRODUCT_WEB_SITE "http://www.amxmodx.org/"
|
||||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Installer.exe"
|
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Installer.exe"
|
||||||
@ -149,38 +149,27 @@ Section "MainSection" SEC01
|
|||||||
File "installer\files\base\data\lang\timeleft.txt"
|
File "installer\files\base\data\lang\timeleft.txt"
|
||||||
SetOutPath "$INSTDIR\files\base\dlls"
|
SetOutPath "$INSTDIR\files\base\dlls"
|
||||||
File "installer\files\base\dlls\amxmodx_mm.dll"
|
File "installer\files\base\dlls\amxmodx_mm.dll"
|
||||||
File "installer\files\base\dlls\amxmodx_mm_amd64.so"
|
|
||||||
File "installer\files\base\dlls\amxmodx_mm_i386.so"
|
File "installer\files\base\dlls\amxmodx_mm_i386.so"
|
||||||
File "installer\files\base\dlls\metamod.dll"
|
File "installer\files\base\dlls\metamod.dll"
|
||||||
File "installer\files\base\dlls\metamod_amd64.so"
|
|
||||||
File "installer\files\base\dlls\metamod_i386.so"
|
File "installer\files\base\dlls\metamod_i386.so"
|
||||||
SetOutPath "$INSTDIR\files\base\modules"
|
SetOutPath "$INSTDIR\files\base\modules"
|
||||||
File "installer\files\base\modules\nvault_amxx.dll"
|
File "installer\files\base\modules\nvault_amxx.dll"
|
||||||
File "installer\files\base\modules\nvault_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\nvault_amxx_i386.so"
|
File "installer\files\base\modules\nvault_amxx_i386.so"
|
||||||
File "installer\files\base\modules\engine_amxx.dll"
|
File "installer\files\base\modules\engine_amxx.dll"
|
||||||
File "installer\files\base\modules\engine_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\engine_amxx_i386.so"
|
File "installer\files\base\modules\engine_amxx_i386.so"
|
||||||
File "installer\files\base\modules\fakemeta_amxx.dll"
|
File "installer\files\base\modules\fakemeta_amxx.dll"
|
||||||
File "installer\files\base\modules\fakemeta_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\fakemeta_amxx_i386.so"
|
File "installer\files\base\modules\fakemeta_amxx_i386.so"
|
||||||
File "installer\files\base\modules\fun_amxx.dll"
|
File "installer\files\base\modules\fun_amxx.dll"
|
||||||
File "installer\files\base\modules\fun_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\fun_amxx_i386.so"
|
File "installer\files\base\modules\fun_amxx_i386.so"
|
||||||
File "installer\files\base\modules\geoip_amxx.dll"
|
File "installer\files\base\modules\geoip_amxx.dll"
|
||||||
File "installer\files\base\modules\geoip_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\geoip_amxx_i386.so"
|
File "installer\files\base\modules\geoip_amxx_i386.so"
|
||||||
File "installer\files\base\modules\sqlite_amxx.dll"
|
File "installer\files\base\modules\sqlite_amxx.dll"
|
||||||
File "installer\files\base\modules\sqlite_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\sqlite_amxx_i386.so"
|
File "installer\files\base\modules\sqlite_amxx_i386.so"
|
||||||
File "installer\files\base\modules\mysql_amxx.dll"
|
File "installer\files\base\modules\mysql_amxx.dll"
|
||||||
File "installer\files\base\modules\mysql_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\mysql_amxx_i386.so"
|
File "installer\files\base\modules\mysql_amxx_i386.so"
|
||||||
File "installer\files\base\modules\regex_amxx.dll"
|
File "installer\files\base\modules\regex_amxx.dll"
|
||||||
File "installer\files\base\modules\regex_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\regex_amxx_i386.so"
|
File "installer\files\base\modules\regex_amxx_i386.so"
|
||||||
File "installer\files\base\modules\sockets_amxx.dll"
|
File "installer\files\base\modules\sockets_amxx.dll"
|
||||||
File "installer\files\base\modules\sockets_amxx_amd64.so"
|
|
||||||
File "installer\files\base\modules\sockets_amxx_i386.so"
|
File "installer\files\base\modules\sockets_amxx_i386.so"
|
||||||
SetOutPath "$INSTDIR\files\base\plugins"
|
SetOutPath "$INSTDIR\files\base\plugins"
|
||||||
File "installer\files\base\plugins\admin.amxx"
|
File "installer\files\base\plugins\admin.amxx"
|
||||||
@ -329,10 +318,8 @@ Section "MainSection" SEC01
|
|||||||
File "installer\files\cstrike\data\WinCSX.exe"
|
File "installer\files\cstrike\data\WinCSX.exe"
|
||||||
SetOutPath "$INSTDIR\files\cstrike\modules"
|
SetOutPath "$INSTDIR\files\cstrike\modules"
|
||||||
File "installer\files\cstrike\modules\cstrike_amxx.dll"
|
File "installer\files\cstrike\modules\cstrike_amxx.dll"
|
||||||
File "installer\files\cstrike\modules\cstrike_amxx_amd64.so"
|
|
||||||
File "installer\files\cstrike\modules\cstrike_amxx_i386.so"
|
File "installer\files\cstrike\modules\cstrike_amxx_i386.so"
|
||||||
File "installer\files\cstrike\modules\csx_amxx.dll"
|
File "installer\files\cstrike\modules\csx_amxx.dll"
|
||||||
File "installer\files\cstrike\modules\csx_amxx_amd64.so"
|
|
||||||
File "installer\files\cstrike\modules\csx_amxx_i386.so"
|
File "installer\files\cstrike\modules\csx_amxx_i386.so"
|
||||||
SetOutPath "$INSTDIR\files\cstrike\plugins"
|
SetOutPath "$INSTDIR\files\cstrike\plugins"
|
||||||
File "installer\files\cstrike\plugins\miscstats.amxx"
|
File "installer\files\cstrike\plugins\miscstats.amxx"
|
||||||
@ -585,10 +572,8 @@ Section Uninstall
|
|||||||
Delete "$INSTDIR\files\cstrike\plugins\restmenu.amxx"
|
Delete "$INSTDIR\files\cstrike\plugins\restmenu.amxx"
|
||||||
Delete "$INSTDIR\files\cstrike\plugins\miscstats.amxx"
|
Delete "$INSTDIR\files\cstrike\plugins\miscstats.amxx"
|
||||||
Delete "$INSTDIR\files\cstrike\modules\csx_amxx_i386.so"
|
Delete "$INSTDIR\files\cstrike\modules\csx_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\cstrike\modules\csx_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\cstrike\modules\csx_amxx.dll"
|
Delete "$INSTDIR\files\cstrike\modules\csx_amxx.dll"
|
||||||
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx_i386.so"
|
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx.dll"
|
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx.dll"
|
||||||
Delete "$INSTDIR\files\cstrike\data\csstats.amxx"
|
Delete "$INSTDIR\files\cstrike\data\csstats.amxx"
|
||||||
Delete "$INSTDIR\files\cstrike\data\WinCSX.amxx"
|
Delete "$INSTDIR\files\cstrike\data\WinCSX.amxx"
|
||||||
@ -729,37 +714,26 @@ Section Uninstall
|
|||||||
Delete "$INSTDIR\files\base\plugins\adminchat.amxx"
|
Delete "$INSTDIR\files\base\plugins\adminchat.amxx"
|
||||||
Delete "$INSTDIR\files\base\plugins\admin.amxx"
|
Delete "$INSTDIR\files\base\plugins\admin.amxx"
|
||||||
Delete "$INSTDIR\files\base\modules\nvault_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\nvault_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\nvault_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\nvault_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\nvault_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\sockets_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\sockets_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\sockets_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\sockets_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\sockets_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\regex_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\regex_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\regex_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\regex_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\regex_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\sqlite_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\sqlite_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\sqlite_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\sqlite_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\sqlite_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\mysql_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\mysql_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\mysql_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\mysql_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\mysql_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\geoip_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\geoip_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\geoip_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\geoip_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\geoip_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\fun_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\fun_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\fun_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\fun_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\fun_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\fakemeta_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\fakemeta_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\fakemeta_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\fakemeta_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\fakemeta_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\modules\engine_amxx_i386.so"
|
Delete "$INSTDIR\files\base\modules\engine_amxx_i386.so"
|
||||||
Delete "$INSTDIR\files\base\modules\engine_amxx_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\modules\engine_amxx.dll"
|
Delete "$INSTDIR\files\base\modules\engine_amxx.dll"
|
||||||
Delete "$INSTDIR\files\base\dlls\metamod_i386.so"
|
Delete "$INSTDIR\files\base\dlls\metamod_i386.so"
|
||||||
Delete "$INSTDIR\files\base\dlls\metamod_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\dlls\metamod.dll"
|
Delete "$INSTDIR\files\base\dlls\metamod.dll"
|
||||||
Delete "$INSTDIR\files\base\dlls\amxmodx_mm_i386.so"
|
Delete "$INSTDIR\files\base\dlls\amxmodx_mm_i386.so"
|
||||||
Delete "$INSTDIR\files\base\dlls\amxmodx_mm_amd64.so"
|
|
||||||
Delete "$INSTDIR\files\base\dlls\amxmodx_mm.dll"
|
Delete "$INSTDIR\files\base\dlls\amxmodx_mm.dll"
|
||||||
Delete "$INSTDIR\files\base\data\lang\timeleft.txt"
|
Delete "$INSTDIR\files\base\data\lang\timeleft.txt"
|
||||||
Delete "$INSTDIR\files\base\data\lang\time.txt"
|
Delete "$INSTDIR\files\base\data\lang\time.txt"
|
||||||
|
Binary file not shown.
@ -3,10 +3,10 @@ unit UnitInstall;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages,
|
uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages,
|
||||||
TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs;
|
TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils;
|
||||||
|
|
||||||
type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF);
|
type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF);
|
||||||
type TOS = (osWindows, osLinux32, osLinux64);
|
type TOS = (osWindows, osLinux32{, osLinux64});
|
||||||
|
|
||||||
procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True);
|
procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True);
|
||||||
procedure AddDone(Additional: String = '');
|
procedure AddDone(Additional: String = '');
|
||||||
@ -213,7 +213,7 @@ begin
|
|||||||
if Pos('_amd64', ExtractFileName(eFile)) <> 0 then
|
if Pos('_amd64', ExtractFileName(eFile)) <> 0 then
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
osLinux64: begin
|
{osLinux64: begin
|
||||||
if ExtractFileExt(eFile) = '.dll' then
|
if ExtractFileExt(eFile) = '.dll' then
|
||||||
Result := True;
|
Result := True;
|
||||||
if ExtractFileExt(eFile) = '.exe' then
|
if ExtractFileExt(eFile) = '.exe' then
|
||||||
@ -221,7 +221,7 @@ begin
|
|||||||
|
|
||||||
if Pos('_i386', ExtractFileName(eFile)) <> 0 then
|
if Pos('_i386', ExtractFileName(eFile)) <> 0 then
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -350,10 +350,10 @@ begin
|
|||||||
eStr[i] := '//' + eStr[i];
|
eStr[i] := '//' + eStr[i];
|
||||||
end;
|
end;
|
||||||
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"');
|
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"');
|
||||||
if OS = osLinux64 then
|
//if OS = osLinux64 then
|
||||||
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"')
|
// eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"')
|
||||||
else
|
//else
|
||||||
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
|
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
|
||||||
FileSetAttr(ePath + 'liblist.gam', 0);
|
FileSetAttr(ePath + 'liblist.gam', 0);
|
||||||
eStr.SaveToFile(ePath + 'liblist.gam');
|
eStr.SaveToFile(ePath + 'liblist.gam');
|
||||||
FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers
|
FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers
|
||||||
@ -614,10 +614,12 @@ begin
|
|||||||
|
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := frmMain.trvDirectories.Selected;
|
CurNode := frmMain.trvDirectories.Selected;
|
||||||
repeat
|
if (Assigned(CurNode)) then begin
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
repeat
|
||||||
CurNode := CurNode.Parent;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
until (not Assigned(CurNode));
|
CurNode := CurNode.Parent;
|
||||||
|
until (not Assigned(CurNode));
|
||||||
|
end;
|
||||||
|
|
||||||
Screen.Cursor := crAppStart;
|
Screen.Cursor := crAppStart;
|
||||||
frmMain.cmdCancel.Show;
|
frmMain.cmdCancel.Show;
|
||||||
|
@ -6101,14 +6101,14 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblStep2: TLabel
|
object lblStep2: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 254
|
Top = 230
|
||||||
Width = 244
|
Width = 244
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '4. Connect to server and select the mod directory:'
|
Caption = '4. Connect to server and select the mod directory:'
|
||||||
end
|
end
|
||||||
object lblStep4: TLabel
|
object lblStep4: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 214
|
Top = 188
|
||||||
Width = 117
|
Width = 117
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '3. Select a game addon:'
|
Caption = '3. Select a game addon:'
|
||||||
@ -6122,7 +6122,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblStep5: TLabel
|
object lblStep5: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 358
|
Top = 334
|
||||||
Width = 64
|
Width = 64
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = '5. Click Next.'
|
Caption = '5. Click Next.'
|
||||||
@ -6312,7 +6312,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object cmdConnect: TFlatButton
|
object cmdConnect: TFlatButton
|
||||||
Left = 416
|
Left = 416
|
||||||
Top = 269
|
Top = 247
|
||||||
Width = 71
|
Width = 71
|
||||||
Height = 20
|
Height = 20
|
||||||
ColorFocused = 16245198
|
ColorFocused = 16245198
|
||||||
@ -6326,30 +6326,34 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlDirectory: TPanel
|
object pnlDirectory: TPanel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 270
|
Top = 246
|
||||||
Width = 367
|
Width = 367
|
||||||
Height = 83
|
Height = 83
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
DesignSize = (
|
||||||
|
367
|
||||||
|
83)
|
||||||
object trvDirectories: TTreeView
|
object trvDirectories: TTreeView
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 365
|
Width = 365
|
||||||
Height = 81
|
Height = 81
|
||||||
Align = alClient
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
BorderStyle = bsNone
|
BorderStyle = bsNone
|
||||||
Images = ilImages
|
Images = ilImages
|
||||||
Indent = 19
|
Indent = 19
|
||||||
|
ReadOnly = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = trvDirectoriesChange
|
|
||||||
OnCollapsing = trvDirectoriesCollapsing
|
OnCollapsing = trvDirectoriesCollapsing
|
||||||
OnExpanding = trvDirectoriesExpanding
|
OnExpanding = trvDirectoriesExpanding
|
||||||
OnExpanded = trvDirectoriesExpanded
|
OnExpanded = trvDirectoriesExpanded
|
||||||
|
OnMouseDown = trvDirectoriesMouseDown
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cboGameAddon: TFlatComboBox
|
object cboGameAddon: TFlatComboBox
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 230
|
Top = 204
|
||||||
Width = 443
|
Width = 443
|
||||||
Height = 21
|
Height = 21
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
@ -6372,27 +6376,9 @@ object frmMain: TfrmMain
|
|||||||
Left = 44
|
Left = 44
|
||||||
Top = 158
|
Top = 158
|
||||||
Width = 441
|
Width = 441
|
||||||
Height = 50
|
Height = 25
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object lblOSNote: TLabel
|
|
||||||
Left = 4
|
|
||||||
Top = 24
|
|
||||||
Width = 435
|
|
||||||
Height = 22
|
|
||||||
Caption =
|
|
||||||
'Note: Most linux servers run on a 32-bit platform. If you are no' +
|
|
||||||
't sure what platform your server is using, you can still ask you' +
|
|
||||||
'r provider for further information about this topic.'
|
|
||||||
Enabled = False
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -9
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = []
|
|
||||||
ParentFont = False
|
|
||||||
WordWrap = True
|
|
||||||
end
|
|
||||||
object optWindows: TFlatRadioButton
|
object optWindows: TFlatRadioButton
|
||||||
Left = 5
|
Left = 5
|
||||||
Top = 5
|
Top = 5
|
||||||
@ -6417,6 +6403,7 @@ object frmMain: TfrmMain
|
|||||||
Width = 82
|
Width = 82
|
||||||
Height = 14
|
Height = 14
|
||||||
Caption = 'Linux (64-bit)'
|
Caption = 'Linux (64-bit)'
|
||||||
|
Enabled = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -6769,6 +6756,7 @@ object frmMain: TfrmMain
|
|||||||
object IdFTP: TIdFTP
|
object IdFTP: TIdFTP
|
||||||
Intercept = IdLogFile
|
Intercept = IdLogFile
|
||||||
MaxLineAction = maException
|
MaxLineAction = maException
|
||||||
|
ReadTimeout = 0
|
||||||
RecvBufferSize = 1024
|
RecvBufferSize = 1024
|
||||||
SendBufferSize = 1024
|
SendBufferSize = 1024
|
||||||
OnWork = IdFTPWork
|
OnWork = IdFTPWork
|
||||||
|
@ -108,10 +108,9 @@ type
|
|||||||
pnlOS: TPanel;
|
pnlOS: TPanel;
|
||||||
optWindows: TFlatRadioButton;
|
optWindows: TFlatRadioButton;
|
||||||
optLinux32: TFlatRadioButton;
|
optLinux32: TFlatRadioButton;
|
||||||
optLinux64: TFlatRadioButton;
|
|
||||||
lblOSNote: TLabel;
|
|
||||||
lblStep5: TLabel;
|
lblStep5: TLabel;
|
||||||
lblFTP: TLabel;
|
lblFTP: TLabel;
|
||||||
|
optLinux64: TFlatRadioButton;
|
||||||
procedure jvwStepsCancelButtonClick(Sender: TObject);
|
procedure jvwStepsCancelButtonClick(Sender: TObject);
|
||||||
procedure cmdCancelClick(Sender: TObject);
|
procedure cmdCancelClick(Sender: TObject);
|
||||||
procedure cmdNextClick(Sender: TObject);
|
procedure cmdNextClick(Sender: TObject);
|
||||||
@ -123,7 +122,6 @@ type
|
|||||||
procedure cmdProxySettingsClick(Sender: TObject);
|
procedure cmdProxySettingsClick(Sender: TObject);
|
||||||
procedure txtPortChange(Sender: TObject);
|
procedure txtPortChange(Sender: TObject);
|
||||||
procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode);
|
procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode);
|
||||||
procedure trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
|
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode;
|
procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode;
|
||||||
const AWorkCount: Integer);
|
const AWorkCount: Integer);
|
||||||
@ -137,6 +135,8 @@ type
|
|||||||
procedure frbFTPClick(Sender: TObject);
|
procedure frbFTPClick(Sender: TObject);
|
||||||
procedure frbLocalClick(Sender: TObject);
|
procedure frbLocalClick(Sender: TObject);
|
||||||
procedure trvModsClick(Sender: TObject);
|
procedure trvModsClick(Sender: TObject);
|
||||||
|
procedure trvDirectoriesMouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
private
|
private
|
||||||
OldProgress: Integer;
|
OldProgress: Integer;
|
||||||
CurrProgress: Integer;
|
CurrProgress: Integer;
|
||||||
@ -148,7 +148,7 @@ var
|
|||||||
frmMain: TfrmMain;
|
frmMain: TfrmMain;
|
||||||
gMultiAccount: Boolean;
|
gMultiAccount: Boolean;
|
||||||
|
|
||||||
const VERSION = '1.76b';
|
const VERSION = '1.76c';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -214,10 +214,12 @@ begin
|
|||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := trvDirectories.Selected;
|
CurNode := trvDirectories.Selected;
|
||||||
repeat
|
if (Assigned(CurNode)) then begin
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
repeat
|
||||||
CurNode := CurNode.Parent;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
until (not Assigned(CurNode));
|
CurNode := CurNode.Parent;
|
||||||
|
until (not Assigned(CurNode));
|
||||||
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
IdFTP.ChangeDir(ePath);
|
IdFTP.ChangeDir(ePath);
|
||||||
@ -236,6 +238,7 @@ begin
|
|||||||
if eStr.IndexOf('liblist.gam') = -1 then begin
|
if eStr.IndexOf('liblist.gam') = -1 then begin
|
||||||
MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING);
|
MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING);
|
||||||
eStr.Free;
|
eStr.Free;
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
exit;
|
exit;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -246,7 +249,7 @@ begin
|
|||||||
cmdConnect.Enabled := False;
|
cmdConnect.Enabled := False;
|
||||||
optWindows.Enabled := False;
|
optWindows.Enabled := False;
|
||||||
optLinux32.Enabled := False;
|
optLinux32.Enabled := False;
|
||||||
optLinux64.Enabled := False;
|
//optLinux64.Enabled := False;
|
||||||
cboGameAddon.Enabled := False;
|
cboGameAddon.Enabled := False;
|
||||||
// preinstall...
|
// preinstall...
|
||||||
MakeDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
MakeDir(ExtractFilePath(ParamStr(0)) + 'temp');
|
||||||
@ -277,10 +280,10 @@ begin
|
|||||||
|
|
||||||
if optWindows.Checked then
|
if optWindows.Checked then
|
||||||
eOS := osWindows
|
eOS := osWindows
|
||||||
else if optLinux32.Checked then
|
else //if optLinux32.Checked then
|
||||||
eOS := osLinux32
|
eOS := osLinux32;
|
||||||
else
|
//else
|
||||||
eOS := osLinux64;
|
// eOS := osLinux64;
|
||||||
|
|
||||||
jspInstallProgress.Show;
|
jspInstallProgress.Show;
|
||||||
frmMain.Height := 382;
|
frmMain.Height := 382;
|
||||||
@ -576,7 +579,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if frbFTP.Checked then begin // FTP
|
else if frbFTP.Checked then begin // FTP
|
||||||
frmMain.Height := 445;
|
frmMain.Height := 421;
|
||||||
jspFTP.Show;
|
jspFTP.Show;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -639,6 +642,7 @@ begin
|
|||||||
cmdConnect.Enabled := True;
|
cmdConnect.Enabled := True;
|
||||||
cmdConnect.Caption := 'Disconnect';
|
cmdConnect.Caption := 'Disconnect';
|
||||||
cmdCancel.Caption := '&Close';
|
cmdCancel.Caption := '&Close';
|
||||||
|
cmdNext.Enabled := True;
|
||||||
|
|
||||||
CurNode := nil;
|
CurNode := nil;
|
||||||
if eStr.Count <> 0 then begin
|
if eStr.Count <> 0 then begin
|
||||||
@ -816,10 +820,12 @@ begin
|
|||||||
// get complete path
|
// get complete path
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := Node;
|
CurNode := Node;
|
||||||
repeat
|
if (Assigned(CurNode)) then begin
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
repeat
|
||||||
CurNode := CurNode.Parent;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
until (not Assigned(CurNode));
|
CurNode := CurNode.Parent;
|
||||||
|
until (not Assigned(CurNode));
|
||||||
|
end;
|
||||||
// change dir and add directories in it
|
// change dir and add directories in it
|
||||||
try
|
try
|
||||||
Repaint;
|
Repaint;
|
||||||
@ -838,11 +844,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
|
|
||||||
begin
|
|
||||||
cmdNext.Enabled := Assigned(trvDirectories.Selected);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmMain.FormDestroy(Sender: TObject);
|
procedure TfrmMain.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FileList.Free;
|
FileList.Free;
|
||||||
@ -936,4 +937,15 @@ begin
|
|||||||
cmdNext.Enabled := (Assigned(trvMods.Selected));
|
cmdNext.Enabled := (Assigned(trvMods.Selected));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.trvDirectoriesMouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
var Node: TTreeNode;
|
||||||
|
begin
|
||||||
|
Node := trvDirectories.GetNodeAt(X, Y);
|
||||||
|
if (Assigned(Node)) then begin
|
||||||
|
if (Node.DisplayRect(True).Right < X) then
|
||||||
|
trvDirectories.Selected := nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -460,7 +460,7 @@ public adminSql()
|
|||||||
new qcolAccess = SQL_FieldNameToNum(query, "access")
|
new qcolAccess = SQL_FieldNameToNum(query, "access")
|
||||||
new qcolFlags = SQL_FieldNameToNum(query, "flags")
|
new qcolFlags = SQL_FieldNameToNum(query, "flags")
|
||||||
|
|
||||||
while (SQL_MoreResults(query))
|
while ((g_aNum < MAX_ADMINS) && (SQL_MoreResults(query)))
|
||||||
{
|
{
|
||||||
SQL_ReadResult(query, qcolAuth, g_aName[g_aNum], 31)
|
SQL_ReadResult(query, qcolAuth, g_aName[g_aNum], 31)
|
||||||
SQL_ReadResult(query, qcolPass, g_aPassword[g_aNum], 31)
|
SQL_ReadResult(query, qcolPass, g_aPassword[g_aNum], 31)
|
||||||
|
@ -45,8 +45,20 @@ new g_Modified
|
|||||||
new g_blockPos[112]
|
new g_blockPos[112]
|
||||||
new g_saveFile[64]
|
new g_saveFile[64]
|
||||||
new g_Restricted[] = "* This item is restricted *"
|
new g_Restricted[] = "* This item is restricted *"
|
||||||
new g_szWeapRestr[27] = "0000000000000000000000000"
|
new g_szWeapRestr[27] = "00000000000000000000000000"
|
||||||
new g_szEquipAmmoRestr[10] = "000000000"
|
new g_szEquipAmmoRestr[10] = "000000000"
|
||||||
|
new g_InBuyMenu[33]
|
||||||
|
new g_RegisteredMenus[10]
|
||||||
|
|
||||||
|
new g_menuStrings[6][] =
|
||||||
|
{
|
||||||
|
"BuyPistol",
|
||||||
|
"BuyShotgun",
|
||||||
|
"BuySubMachineGun",
|
||||||
|
"BuyRifle",
|
||||||
|
"BuyMachineGun",
|
||||||
|
"BuyItem"
|
||||||
|
}
|
||||||
|
|
||||||
new g_menusNames[7][] =
|
new g_menusNames[7][] =
|
||||||
{
|
{
|
||||||
@ -295,6 +307,19 @@ new g_Aliases2[MAXMENUPOS][] =
|
|||||||
new g_Autobuy[33][AUTOBUYLENGTH + 1]
|
new g_Autobuy[33][AUTOBUYLENGTH + 1]
|
||||||
//new g_Rebuy[33][AUTOBUYLENGTH + 1]
|
//new g_Rebuy[33][AUTOBUYLENGTH + 1]
|
||||||
|
|
||||||
|
bool:IsOurMenuID(id)
|
||||||
|
{
|
||||||
|
for (new i=1; i<=g_RegisteredMenus[0]; i++)
|
||||||
|
{
|
||||||
|
if (g_RegisteredMenus[i] == id)
|
||||||
|
{
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
setWeapon(a, action)
|
setWeapon(a, action)
|
||||||
{
|
{
|
||||||
new b, m = g_Keys[a][0] * 8
|
new b, m = g_Keys[a][0] * 8
|
||||||
@ -605,7 +630,30 @@ public client_command(id)
|
|||||||
new arg[13]
|
new arg[13]
|
||||||
|
|
||||||
if (read_argv(0, arg, 12) > 11) /* Longest buy command has 11 chars so if command is longer then don't care */
|
if (read_argv(0, arg, 12) > 11) /* Longest buy command has 11 chars so if command is longer then don't care */
|
||||||
|
{
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
if (equali(arg, "menuselect") && is_user_connected(id))
|
||||||
|
{
|
||||||
|
new menu, newmenu
|
||||||
|
new inMenu = player_menu_info(id, menu, newmenu)
|
||||||
|
|
||||||
|
if (!inMenu && g_InBuyMenu[id])
|
||||||
|
{
|
||||||
|
new key[12], num
|
||||||
|
|
||||||
|
read_argv(1, key, 11)
|
||||||
|
num = str_to_num(key) - 1
|
||||||
|
|
||||||
|
return checkRest(id, g_InBuyMenu[id], num)
|
||||||
|
} else if ((!menu || newmenu != -1)
|
||||||
|
|| !IsOurMenuID(menu)) {
|
||||||
|
g_InBuyMenu[id] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
new a = 0
|
new a = 0
|
||||||
|
|
||||||
@ -631,7 +679,9 @@ public blockcommand(id)
|
|||||||
public cmdMenu(id, level, cid)
|
public cmdMenu(id, level, cid)
|
||||||
{
|
{
|
||||||
if (cmd_access(id, level, cid, 1))
|
if (cmd_access(id, level, cid, 1))
|
||||||
displayMenu(id, g_Position[id] = 0)
|
{
|
||||||
|
displayMenu(id, g_Position[id] = 0)
|
||||||
|
}
|
||||||
|
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
@ -641,9 +691,18 @@ checkRest(id, menu, key)
|
|||||||
new team = get_user_team(id)
|
new team = get_user_team(id)
|
||||||
|
|
||||||
if (team != 1 && team != 2)
|
if (team != 1 && team != 2)
|
||||||
|
{
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
if (g_blockPos[(menu * 8 + key) + (get_user_team(id) - 1) * 56])
|
new pos = (menu * 8 + key) + (get_user_team(id) - 1) * 56
|
||||||
|
|
||||||
|
if (pos < 0 || pos >= 112)
|
||||||
|
{
|
||||||
|
return PLUGIN_CONTINUE
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_blockPos[pos])
|
||||||
{
|
{
|
||||||
engclient_cmd(id, "menuselect", "10")
|
engclient_cmd(id, "menuselect", "10")
|
||||||
client_print(id, print_center, "%s", g_Restricted)
|
client_print(id, print_center, "%s", g_Restricted)
|
||||||
@ -799,6 +858,70 @@ public fn_autobuy(id)
|
|||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HookEvent_ShowMenu(id)
|
||||||
|
{
|
||||||
|
new menustring[24]
|
||||||
|
|
||||||
|
read_data(4, menustring, 23)
|
||||||
|
|
||||||
|
/* Early breakouts */
|
||||||
|
new curidx
|
||||||
|
if (menustring[curidx++] != '#')
|
||||||
|
{
|
||||||
|
g_InBuyMenu[id] = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Strip D */
|
||||||
|
if (menustring[curidx] == 'D')
|
||||||
|
{
|
||||||
|
curidx++
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Strip AS_ */
|
||||||
|
if (menustring[curidx] == 'A'
|
||||||
|
&& menustring[curidx+1] == 'S'
|
||||||
|
&& menustring[curidx+2] == '_')
|
||||||
|
{
|
||||||
|
curidx += 3
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Strip any team tags */
|
||||||
|
if (menustring[curidx] == 'C'
|
||||||
|
&& menustring[curidx+1] == 'T'
|
||||||
|
&& menustring[curidx+2] == '_')
|
||||||
|
{
|
||||||
|
curidx += 3
|
||||||
|
} else if (menustring[curidx] == 'T'
|
||||||
|
&& menustring[curidx+1] == '_') {
|
||||||
|
curidx += 2
|
||||||
|
}
|
||||||
|
|
||||||
|
if (menustring[curidx] != 'B')
|
||||||
|
{
|
||||||
|
g_InBuyMenu[id] = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for (new i=0; i<6; i++)
|
||||||
|
{
|
||||||
|
if (equali(menustring[curidx], g_menuStrings[i]))
|
||||||
|
{
|
||||||
|
g_InBuyMenu[id] = i+1
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_InBuyMenu[id] = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
RegisterMenuID(const menuname[])
|
||||||
|
{
|
||||||
|
new id = register_menuid(menuname, 1)
|
||||||
|
g_RegisteredMenus[++g_RegisteredMenus[0]] = id
|
||||||
|
return id
|
||||||
|
}
|
||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Restrict Weapons", AMXX_VERSION_STR, "AMXX Dev Team")
|
register_plugin("Restrict Weapons", AMXX_VERSION_STR, "AMXX Dev Team")
|
||||||
@ -811,12 +934,12 @@ public plugin_init()
|
|||||||
register_clcmd("amx_restmenu", "cmdMenu", ADMIN_CFG, "- displays weapons restriction menu")
|
register_clcmd("amx_restmenu", "cmdMenu", ADMIN_CFG, "- displays weapons restriction menu")
|
||||||
register_menucmd(register_menuid("#Buy", 1), 511, "menuBuy")
|
register_menucmd(register_menuid("#Buy", 1), 511, "menuBuy")
|
||||||
register_menucmd(register_menuid("Restrict Weapons"), 1023, "actionMenu")
|
register_menucmd(register_menuid("Restrict Weapons"), 1023, "actionMenu")
|
||||||
register_menucmd(register_menuid("BuyPistol", 1), 511, "menuPistol")
|
register_menucmd(RegisterMenuID("BuyPistol"), 511, "menuPistol")
|
||||||
register_menucmd(register_menuid("BuyShotgun", 1), 511, "menuShotgun")
|
register_menucmd(RegisterMenuID("BuyShotgun"), 511, "menuShotgun")
|
||||||
register_menucmd(register_menuid("BuySub", 1), 511, "menuSub")
|
register_menucmd(RegisterMenuID("BuySub"), 511, "menuSub")
|
||||||
register_menucmd(register_menuid("BuyRifle", 1), 511, "menuRifle")
|
register_menucmd(RegisterMenuID("BuyRifle"), 511, "menuRifle")
|
||||||
register_menucmd(register_menuid("BuyMachine", 1), 511, "menuMachine")
|
register_menucmd(RegisterMenuID("BuyMachine"), 511, "menuMachine")
|
||||||
register_menucmd(register_menuid("BuyItem", 1), 511, "menuItem")
|
register_menucmd(RegisterMenuID("BuyItem"), 511, "menuItem")
|
||||||
register_menucmd(-28, 511, "menuBuy")
|
register_menucmd(-28, 511, "menuBuy")
|
||||||
register_menucmd(-29, 511, "menuPistol")
|
register_menucmd(-29, 511, "menuPistol")
|
||||||
register_menucmd(-30, 511, "menuShotgun")
|
register_menucmd(-30, 511, "menuShotgun")
|
||||||
@ -829,6 +952,8 @@ public plugin_init()
|
|||||||
register_cvar("amx_restrweapons", "00000000000000000000000000")
|
register_cvar("amx_restrweapons", "00000000000000000000000000")
|
||||||
register_cvar("amx_restrequipammo", "000000000")
|
register_cvar("amx_restrequipammo", "000000000")
|
||||||
|
|
||||||
|
register_event("ShowMenu", "HookEvent_ShowMenu", "b")
|
||||||
|
|
||||||
new configsDir[64];
|
new configsDir[64];
|
||||||
get_configsdir(configsDir, 63);
|
get_configsdir(configsDir, 63);
|
||||||
#if defined MAPSETTINGS
|
#if defined MAPSETTINGS
|
||||||
|
@ -204,7 +204,7 @@ public plugin_init()
|
|||||||
register_clcmd("say /me", "cmdMe", 0, "- display current round stats (chat)")
|
register_clcmd("say /me", "cmdMe", 0, "- display current round stats (chat)")
|
||||||
register_clcmd("say /score", "cmdScore", 0, "- display last score (chat)")
|
register_clcmd("say /score", "cmdScore", 0, "- display last score (chat)")
|
||||||
register_clcmd("say /rank", "cmdRank", 0, "- display your rank (chat)")
|
register_clcmd("say /rank", "cmdRank", 0, "- display your rank (chat)")
|
||||||
register_clcmd("say /report", "cmdReport", 0, "- display waepon status (say_team)")
|
register_clcmd("say /report", "cmdReport", 0, "- display weapon status (say_team)")
|
||||||
register_clcmd("say /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
|
register_clcmd("say /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
|
||||||
register_clcmd("say /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
|
register_clcmd("say /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
|
||||||
register_clcmd("say /switch", "cmdSwitch", 0, "- switch client's stats on or off")
|
register_clcmd("say /switch", "cmdSwitch", 0, "- switch client's stats on or off")
|
||||||
@ -214,7 +214,7 @@ public plugin_init()
|
|||||||
register_clcmd("say_team /me", "cmdMe", 0, "- display current round stats (chat)")
|
register_clcmd("say_team /me", "cmdMe", 0, "- display current round stats (chat)")
|
||||||
register_clcmd("say_team /score", "cmdScore", 0, "- display last score (chat)")
|
register_clcmd("say_team /score", "cmdScore", 0, "- display last score (chat)")
|
||||||
register_clcmd("say_team /rank", "cmdRank", 0, "- display your rank (chat)")
|
register_clcmd("say_team /rank", "cmdRank", 0, "- display your rank (chat)")
|
||||||
register_clcmd("say_team /report", "cmdReport", 0, "- display waepon status (say_team_team)")
|
register_clcmd("say_team /report", "cmdReport", 0, "- display weapon status (say_team_team)")
|
||||||
register_clcmd("say_team /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
|
register_clcmd("say_team /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
|
||||||
register_clcmd("say_team /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
|
register_clcmd("say_team /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
|
||||||
register_clcmd("say_team /switch", "cmdSwitch", 0, "- switch client's stats on or off")
|
register_clcmd("say_team /switch", "cmdSwitch", 0, "- switch client's stats on or off")
|
||||||
|
@ -758,6 +758,8 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
|
|||||||
}
|
}
|
||||||
|
|
||||||
public showDoubleKill(){
|
public showDoubleKill(){
|
||||||
|
if (g_KillCount < 2)
|
||||||
|
return
|
||||||
new pos = g_KillCount - 2
|
new pos = g_KillCount - 2
|
||||||
if ( pos > 2 ) pos = 2
|
if ( pos > 2 ) pos = 2
|
||||||
if ( DoubleKill ) {
|
if ( DoubleKill ) {
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _amxconst_included
|
#define _amxconst_included
|
||||||
|
|
||||||
#define AMXX_VERSION 1.762
|
#define AMXX_VERSION 1.763
|
||||||
#define AMXX_VERSION_NUM 176
|
#define AMXX_VERSION_NUM 176
|
||||||
stock const AMXX_VERSION_STR[]="1.76b"
|
stock const AMXX_VERSION_STR[]="1.76c"
|
||||||
|
|
||||||
#define M_PI 3.1415926535
|
#define M_PI 3.1415926535
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ enum {
|
|||||||
targetname
|
targetname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined _vexd_bcompat_included
|
||||||
/* Find an entity ID from start_from_ent id (use 0 to start from
|
/* Find an entity ID from start_from_ent id (use 0 to start from
|
||||||
* the beginning, category is either "classname", "target" or
|
* the beginning, category is either "classname", "target" or
|
||||||
* "targetname", value is the name you are searching for */
|
* "targetname", value is the name you are searching for */
|
||||||
@ -91,5 +92,6 @@ stock find_entity(start_from_ent, category, value[]) {
|
|||||||
}
|
}
|
||||||
return find_ent_by_class(start_from_ent, value)
|
return find_ent_by_class(start_from_ent, value)
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _xtrafun_included
|
#endif // _xtrafun_included
|
@ -473,13 +473,19 @@ native get_user_flags(index,id=0);
|
|||||||
/* Removes flags for player. */
|
/* Removes flags for player. */
|
||||||
native remove_user_flags(index,flags=-1,id=0);
|
native remove_user_flags(index,flags=-1,id=0);
|
||||||
|
|
||||||
/* Registers function which will be called from client console. */
|
/* Registers function which will be called from client console.
|
||||||
|
* Returns the command ID.
|
||||||
|
*/
|
||||||
native register_clcmd(const client_cmd[],const function[],flags=-1, info[]="");
|
native register_clcmd(const client_cmd[],const function[],flags=-1, info[]="");
|
||||||
|
|
||||||
/* Registers function which will be called from any console. */
|
/* Registers function which will be called from any console.
|
||||||
|
* Returns the command ID.
|
||||||
|
*/
|
||||||
native register_concmd(const cmd[],const function[],flags=-1, info[]="");
|
native register_concmd(const cmd[],const function[],flags=-1, info[]="");
|
||||||
|
|
||||||
/* Registers function which will be called from server console. */
|
/* Registers function which will be called from server console.
|
||||||
|
* Returns the command ID.
|
||||||
|
*/
|
||||||
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
|
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
|
||||||
|
|
||||||
/* Gets info about client command. */
|
/* Gets info about client command. */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
//get a two character country code (eg US, CA etc)
|
//get a two character country code (eg US, CA etc)
|
||||||
native geoip_code2(ip[], ccode[3]);
|
native geoip_code2(ip[], ccode[3]);
|
||||||
|
|
||||||
//get a three character country code (eg USA, cAN etc)
|
//get a three character country code (eg USA, CAN etc)
|
||||||
native geoip_code3(ip[], result[4]);
|
native geoip_code3(ip[], result[4]);
|
||||||
|
|
||||||
//get a full country name. max name is 45 chars
|
//get a full country name. max name is 45 chars
|
||||||
|
@ -318,7 +318,7 @@ stock Handle:SQL_MakeStdTuple()
|
|||||||
get_cvar_string("amx_sql_type", set_type, 11)
|
get_cvar_string("amx_sql_type", set_type, 11)
|
||||||
get_cvar_string("amx_sql_db", db, 127)
|
get_cvar_string("amx_sql_db", db, 127)
|
||||||
|
|
||||||
SQL_GetAffinity(get_type, 12)
|
SQL_GetAffinity(get_type, 11)
|
||||||
|
|
||||||
if (!equali(get_type, set_type))
|
if (!equali(get_type, set_type))
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,9 @@ public checkVotes()
|
|||||||
if (g_voteCount[b] < g_voteCount[a])
|
if (g_voteCount[b] < g_voteCount[a])
|
||||||
b = a
|
b = a
|
||||||
|
|
||||||
if (g_voteCount[SELECTMAPS] > g_voteCount[b])
|
|
||||||
|
if (g_voteCount[SELECTMAPS] > g_voteCount[b]
|
||||||
|
&& g_voteCount[SELECTMAPS] > g_voteCount[SELECTMAPS+1])
|
||||||
{
|
{
|
||||||
new mapname[32]
|
new mapname[32]
|
||||||
|
|
||||||
@ -103,7 +105,9 @@ public checkVotes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
|
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
|
||||||
|
{
|
||||||
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]])
|
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]])
|
||||||
|
}
|
||||||
|
|
||||||
new smap[32]
|
new smap[32]
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public plugin_init()
|
|||||||
register_dictionary("mapsmenu.txt")
|
register_dictionary("mapsmenu.txt")
|
||||||
register_dictionary("common.txt")
|
register_dictionary("common.txt")
|
||||||
register_clcmd("amx_mapmenu", "cmdMapsMenu", ADMIN_MAP, "- displays changelevel menu")
|
register_clcmd("amx_mapmenu", "cmdMapsMenu", ADMIN_MAP, "- displays changelevel menu")
|
||||||
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_MAP, "- displays votemap menu")
|
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_VOTE, "- displays votemap menu")
|
||||||
|
|
||||||
register_menucmd(register_menuid("Changelevel Menu"), 1023, "actionMapsMenu")
|
register_menucmd(register_menuid("Changelevel Menu"), 1023, "actionMapsMenu")
|
||||||
register_menucmd(register_menuid("Which map do you want?"), 527, "voteCount")
|
register_menucmd(register_menuid("Which map do you want?"), 527, "voteCount")
|
||||||
|
@ -130,7 +130,7 @@ AddDefaultMenus()
|
|||||||
AddMenuLang("SLAP_SLAY", "amx_slapmenu", ADMIN_SLAY, "Players Menu")
|
AddMenuLang("SLAP_SLAY", "amx_slapmenu", ADMIN_SLAY, "Players Menu")
|
||||||
AddMenuLang("TEAM_PLAYER", "amx_teammenu", ADMIN_LEVEL_A, "Players Menu")
|
AddMenuLang("TEAM_PLAYER", "amx_teammenu", ADMIN_LEVEL_A, "Players Menu")
|
||||||
AddMenuLang("CHANGEL", "amx_mapmenu", ADMIN_MAP, "Maps Menu")
|
AddMenuLang("CHANGEL", "amx_mapmenu", ADMIN_MAP, "Maps Menu")
|
||||||
AddMenuLang("VOTE_MAPS", "amx_votemapmenu", ADMIN_MAP, "Maps Menu")
|
AddMenuLang("VOTE_MAPS", "amx_votemapmenu", ADMIN_VOTE, "Maps Menu")
|
||||||
AddMenuLang("SPECH_STUFF", "amx_speechmenu", ADMIN_MENU, "Commands Menu")
|
AddMenuLang("SPECH_STUFF", "amx_speechmenu", ADMIN_MENU, "Commands Menu")
|
||||||
AddMenuLang("CLIENT_COM", "amx_clcmdmenu", ADMIN_LEVEL_A, "Players Menu")
|
AddMenuLang("CLIENT_COM", "amx_clcmdmenu", ADMIN_LEVEL_A, "Players Menu")
|
||||||
AddMenuLang("SERVER_COM", "amx_cmdmenu", ADMIN_MENU, "Commands Menu")
|
AddMenuLang("SERVER_COM", "amx_cmdmenu", ADMIN_MENU, "Commands Menu")
|
||||||
@ -140,7 +140,7 @@ AddDefaultMenus()
|
|||||||
AddMenuLang("STATS_SET", "amx_statscfgmenu", ADMIN_CFG, "Stats Configuration")
|
AddMenuLang("STATS_SET", "amx_statscfgmenu", ADMIN_CFG, "Stats Configuration")
|
||||||
AddMenuLang("PAUSE_PLUG", "amx_pausecfgmenu", ADMIN_CFG, "Pause Plugins")
|
AddMenuLang("PAUSE_PLUG", "amx_pausecfgmenu", ADMIN_CFG, "Pause Plugins")
|
||||||
AddMenuLang("RES_WEAP", "amx_restmenu", ADMIN_CFG, "Restrict Weapons")
|
AddMenuLang("RES_WEAP", "amx_restmenu", ADMIN_CFG, "Restrict Weapons")
|
||||||
AddMenuLang("TELE_PLAYER", "amx_teleportmenu", ADMIN_LEVEL_A, "Teleport Menu")
|
AddMenuLang("TELE_PLAYER", "amx_teleportmenu", ADMIN_CFG, "Teleport Menu")
|
||||||
}
|
}
|
||||||
|
|
||||||
public actionMenu(id, key)
|
public actionMenu(id, key)
|
||||||
|
@ -42,6 +42,7 @@ new g_ReadyRoomAck[12];
|
|||||||
new g_AutoAssignAck[12];
|
new g_AutoAssignAck[12];
|
||||||
new g_StopCommAck[12];
|
new g_StopCommAck[12];
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PLAYERCLASS_NONE = 0,
|
PLAYERCLASS_NONE = 0,
|
||||||
PLAYERCLASS_ALIVE_MARINE,
|
PLAYERCLASS_ALIVE_MARINE,
|
||||||
@ -72,6 +73,10 @@ enum {
|
|||||||
|
|
||||||
new g_Class[33]; // stored info from the "ScoreInfo" message
|
new g_Class[33]; // stored info from the "ScoreInfo" message
|
||||||
new g_Team[33];
|
new g_Team[33];
|
||||||
|
|
||||||
|
new g_ScoreInfo_Class;
|
||||||
|
new g_ScoreInfo_Team;
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("NS Commands",AMXX_VERSION_STR,"AMXX Dev Team");
|
register_plugin("NS Commands",AMXX_VERSION_STR,"AMXX Dev Team");
|
||||||
// create our semi-random acknowledgement commands
|
// create our semi-random acknowledgement commands
|
||||||
@ -103,6 +108,19 @@ public plugin_init() {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cvar_exists("sv_structurelimit"))
|
||||||
|
{
|
||||||
|
// ns 3.2 beta
|
||||||
|
g_ScoreInfo_Class=6;
|
||||||
|
g_ScoreInfo_Team=8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// ns 3.1
|
||||||
|
g_ScoreInfo_Class=5;
|
||||||
|
g_ScoreInfo_Team=7;
|
||||||
|
}
|
||||||
|
|
||||||
// register ScoreInfo message..
|
// register ScoreInfo message..
|
||||||
register_event("ScoreInfo","msgScoreInfo","a")
|
register_event("ScoreInfo","msgScoreInfo","a")
|
||||||
}
|
}
|
||||||
@ -112,8 +130,8 @@ public msgScoreInfo() {
|
|||||||
// just incase..
|
// just incase..
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
g_Class[id]=read_data(5);
|
g_Class[id]=read_data(g_ScoreInfo_Class);
|
||||||
g_Team[id]=read_data(7);
|
g_Team[id]=read_data(g_ScoreInfo_Team);
|
||||||
}
|
}
|
||||||
public client_disconnect(id) {
|
public client_disconnect(id) {
|
||||||
g_Class[id]=0;
|
g_Class[id]=0;
|
||||||
|
@ -57,7 +57,7 @@ public plugin_init()
|
|||||||
register_dictionary("common.txt")
|
register_dictionary("common.txt")
|
||||||
register_dictionary("admincmd.txt")
|
register_dictionary("admincmd.txt")
|
||||||
|
|
||||||
register_concmd("amx_pausecfg", "cmdPlugin", ADMIN_CFG, "- list commands for pause/unpause managment")
|
register_concmd("amx_pausecfg", "cmdPlugin", ADMIN_CFG, "- list commands for pause/unpause management")
|
||||||
register_clcmd("amx_pausecfgmenu", "cmdMenu", ADMIN_CFG, "- pause/unpause plugins with menu")
|
register_clcmd("amx_pausecfgmenu", "cmdMenu", ADMIN_CFG, "- pause/unpause plugins with menu")
|
||||||
#if defined DIRECT_ONOFF
|
#if defined DIRECT_ONOFF
|
||||||
register_concmd("amx_off", "cmdOFF", ADMIN_CFG, "- pauses some plugins")
|
register_concmd("amx_off", "cmdOFF", ADMIN_CFG, "- pauses some plugins")
|
||||||
@ -144,11 +144,6 @@ public actionMenu(id, key)
|
|||||||
{
|
{
|
||||||
case 'r': pause("ac", file)
|
case 'r': pause("ac", file)
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
|
||||||
g_Modified = 1
|
|
||||||
pause("dc", file)
|
|
||||||
}
|
|
||||||
case 's':
|
|
||||||
{
|
{
|
||||||
g_Modified = 1
|
g_Modified = 1
|
||||||
unpause("ac", file)
|
unpause("ac", file)
|
||||||
|
@ -7,6 +7,7 @@ public plugin_init()
|
|||||||
register_clcmd("menu_test1", "Test_Menu1")
|
register_clcmd("menu_test1", "Test_Menu1")
|
||||||
register_clcmd("menu_test2", "Test_Menu2")
|
register_clcmd("menu_test2", "Test_Menu2")
|
||||||
register_clcmd("menu_test3", "Test_Menu3")
|
register_clcmd("menu_test3", "Test_Menu3")
|
||||||
|
register_clcmd("menu_test4", "Test_Menu4")
|
||||||
}
|
}
|
||||||
|
|
||||||
public Test_Menu1(id, level, cid)
|
public Test_Menu1(id, level, cid)
|
||||||
@ -90,3 +91,38 @@ public Test_Menu3_Handler(id, menu, item)
|
|||||||
|
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Test_Menu4(id)
|
||||||
|
{
|
||||||
|
new mHandleID = menu_create("Test Menu 4", "Test_Menu4_Handler")
|
||||||
|
menu_setprop(mHandleID, MPROP_PERPAGE, 0)
|
||||||
|
menu_additem(mHandleID, "test1", "1", 0)
|
||||||
|
menu_additem(mHandleID, "test2", "2", 0)
|
||||||
|
menu_additem(mHandleID, "test3", "3", 0)
|
||||||
|
menu_additem(mHandleID, "test4", "4", 0)
|
||||||
|
menu_additem(mHandleID, "test5", "5", 0)
|
||||||
|
menu_additem(mHandleID, "test6", "6", 0)
|
||||||
|
menu_additem(mHandleID, "test7", "7", 0)
|
||||||
|
menu_additem(mHandleID, "test8", "8", 0)
|
||||||
|
menu_additem(mHandleID, "test9", "9", 0)
|
||||||
|
menu_additem(mHandleID, "test10", "10", 0)
|
||||||
|
|
||||||
|
menu_display(id, mHandleID, 0)
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
public Test_Menu4_Handler(id, menu, item)
|
||||||
|
{
|
||||||
|
if (item == MENU_EXIT)
|
||||||
|
{
|
||||||
|
menu_destroy(menu)
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
|
||||||
|
client_print(id, print_chat, "item = %d", item)
|
||||||
|
|
||||||
|
menu_destroy(menu)
|
||||||
|
|
||||||
|
return PLUGIN_HANDLED
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user