Compare commits
1 Commits
amxmodx-1.
...
amxmodx-1.
Author | SHA1 | Date | |
---|---|---|---|
7e6cc572cf |
@ -33,7 +33,7 @@
|
|||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "binlog.h"
|
#include "binlog.h"
|
||||||
|
|
||||||
CForward::CForward(const char *name, ForwardExecType et, int numParams, const ForwardParam *paramTypes, int fwd_type)
|
CForward::CForward(const char *name, ForwardExecType et, int numParams, const ForwardParam *paramTypes)
|
||||||
{
|
{
|
||||||
m_FuncName = name;
|
m_FuncName = name;
|
||||||
m_ExecType = et;
|
m_ExecType = et;
|
||||||
@ -47,13 +47,6 @@ CForward::CForward(const char *name, ForwardExecType et, int numParams, const Fo
|
|||||||
|
|
||||||
for (CPluginMngr::iterator iter = g_plugins.begin(); iter; ++iter)
|
for (CPluginMngr::iterator iter = g_plugins.begin(); iter; ++iter)
|
||||||
{
|
{
|
||||||
if ((fwd_type != FORWARD_ALL) &&
|
|
||||||
((fwd_type == FORWARD_ONLY_NEW && ((*iter).getAMX()->flags & AMX_FLAG_OLDFILE))
|
|
||||||
|| (fwd_type == FORWARD_ONLY_OLD && !((*iter).getAMX()->flags & AMX_FLAG_OLDFILE))
|
|
||||||
))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((*iter).isValid() && amx_FindPublic((*iter).getAMX(), name, &func) == AMX_ERR_NONE)
|
if ((*iter).isValid() && amx_FindPublic((*iter).getAMX(), name, &func) == AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
AMXForward tmp;
|
AMXForward tmp;
|
||||||
@ -226,8 +219,6 @@ 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)
|
||||||
@ -238,8 +229,6 @@ 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)
|
||||||
@ -252,15 +241,13 @@ 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 || m_ToDelete)
|
if (!m_HasFunc)
|
||||||
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();
|
||||||
@ -362,20 +349,16 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_InExec = false;
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CForwardMngr::registerForward(const char *funcName, ForwardExecType et, int numParams, const ForwardParam * paramTypes, int fwd_type)
|
int CForwardMngr::registerForward(const char *funcName, ForwardExecType et, int numParams, const ForwardParam * paramTypes)
|
||||||
{
|
{
|
||||||
int retVal = m_Forwards.size() << 1;
|
int retVal = m_Forwards.size() << 1;
|
||||||
CForward *tmp = new CForward(funcName, et, numParams, paramTypes, fwd_type);
|
CForward *tmp = new CForward(funcName, et, numParams, paramTypes);
|
||||||
|
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
{
|
|
||||||
return -1; // should be invalid
|
return -1; // should be invalid
|
||||||
}
|
|
||||||
|
|
||||||
m_Forwards.push_back(tmp);
|
m_Forwards.push_back(tmp);
|
||||||
|
|
||||||
@ -460,20 +443,7 @@ bool CForwardMngr::isIdValid(int id) const
|
|||||||
|
|
||||||
cell CForwardMngr::executeForwards(int id, cell *params)
|
cell CForwardMngr::executeForwards(int id, cell *params)
|
||||||
{
|
{
|
||||||
int retVal;
|
int retVal = (id & 1) ? m_SPForwards[id >> 1]->execute(params, m_TmpArrays) : m_Forwards[id >> 1]->execute(params, m_TmpArrays);
|
||||||
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;
|
||||||
@ -545,27 +515,18 @@ 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;
|
||||||
|
|
||||||
CSPForward *fwd = m_SPForwards.at(id >> 1);
|
m_SPForwards.at(id >> 1)->isFree = true;
|
||||||
|
|
||||||
if (fwd->m_InExec)
|
|
||||||
{
|
|
||||||
fwd->m_ToDelete = true;
|
|
||||||
} else {
|
|
||||||
fwd->isFree = true;
|
|
||||||
m_FreeSPForwards.push(id);
|
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)
|
||||||
{
|
{
|
||||||
ForwardParam params[FORWARD_MAX_PARAMS];
|
ForwardParam params[FORWARD_MAX_PARAMS];
|
||||||
|
|
||||||
for (size_t i=0; i<num; i++)
|
for (size_t i=0; i<num; i++)
|
||||||
{
|
|
||||||
params[i] = static_cast<ForwardParam>(list[i]);
|
params[i] = static_cast<ForwardParam>(list[i]);
|
||||||
}
|
|
||||||
|
|
||||||
return g_forwards.registerForward(funcName, et, num, params, fwd_type);
|
return g_forwards.registerForward(funcName, et, num, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
int registerForward(const char *funcName, ForwardExecType et, ...)
|
int registerForward(const char *funcName, ForwardExecType et, ...)
|
||||||
|
@ -51,10 +51,6 @@
|
|||||||
|
|
||||||
const int FORWARD_MAX_PARAMS = 32;
|
const int FORWARD_MAX_PARAMS = 32;
|
||||||
|
|
||||||
#define FORWARD_ONLY_OLD 1
|
|
||||||
#define FORWARD_ONLY_NEW 2
|
|
||||||
#define FORWARD_ALL 3
|
|
||||||
|
|
||||||
enum ForwardExecType
|
enum ForwardExecType
|
||||||
{
|
{
|
||||||
ET_IGNORE = 0, // Ignore return vaue
|
ET_IGNORE = 0, // Ignore return vaue
|
||||||
@ -111,7 +107,7 @@ class CForward
|
|||||||
ForwardParam m_ParamTypes[FORWARD_MAX_PARAMS];
|
ForwardParam m_ParamTypes[FORWARD_MAX_PARAMS];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CForward(const char *name, ForwardExecType et, int numParams, const ForwardParam * paramTypes, int fwd_type=FORWARD_ALL);
|
CForward(const char *name, ForwardExecType et, int numParams, const ForwardParam * paramTypes);
|
||||||
CForward() {} // leaves everything unitialized'
|
CForward() {} // leaves everything unitialized'
|
||||||
|
|
||||||
cell execute(cell *params, ForwardPreparedArray *preparedArrays);
|
cell execute(cell *params, ForwardPreparedArray *preparedArrays);
|
||||||
@ -143,7 +139,6 @@ 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;
|
||||||
|
|
||||||
@ -153,8 +148,6 @@ 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;
|
||||||
@ -210,7 +203,7 @@ public:
|
|||||||
|
|
||||||
// Interface
|
// Interface
|
||||||
// Register normal forward
|
// Register normal forward
|
||||||
int registerForward(const char *funcName, ForwardExecType et, int numParams, const ForwardParam *paramTypes, int fwd_type=FORWARD_ALL);
|
int registerForward(const char *funcName, ForwardExecType et, int numParams, const ForwardParam *paramTypes);
|
||||||
// Register single plugin forward
|
// Register single plugin forward
|
||||||
int registerSPForward(const char *funcName, AMX *amx, int numParams, const ForwardParam * paramTypes);
|
int registerSPForward(const char *funcName, AMX *amx, int numParams, const ForwardParam * paramTypes);
|
||||||
int registerSPForward(int func, AMX *amx, int numParams, const ForwardParam * paramTypes);
|
int registerSPForward(int func, AMX *amx, int numParams, const ForwardParam * paramTypes);
|
||||||
@ -234,7 +227,7 @@ public:
|
|||||||
|
|
||||||
// (un)register forward
|
// (un)register forward
|
||||||
int registerForward(const char *funcName, ForwardExecType et, ...);
|
int registerForward(const char *funcName, ForwardExecType et, ...);
|
||||||
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num, int fwd_type=FORWARD_ALL);
|
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num);
|
||||||
int registerSPForwardByName(AMX *amx, const char *funcName, ...);
|
int registerSPForwardByName(AMX *amx, const char *funcName, ...);
|
||||||
int registerSPForwardByNameC(AMX *amx, const char *funcName, cell *list, size_t num);
|
int registerSPForwardByNameC(AMX *amx, const char *funcName, cell *list, size_t num);
|
||||||
int registerSPForward(AMX *amx, int func, ...);
|
int registerSPForward(AMX *amx, int func, ...);
|
||||||
|
@ -87,10 +87,6 @@ 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
|
||||||
@ -144,13 +140,4 @@ 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,8 +76,7 @@ private:
|
|||||||
} *headcmd;
|
} *headcmd;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MenuMngr() : m_watch_iter(end())
|
MenuMngr() { headid = 0; headcmd = 0; }
|
||||||
{ headid = NULL; headcmd = NULL; }
|
|
||||||
~MenuMngr();
|
~MenuMngr();
|
||||||
|
|
||||||
// Interface
|
// Interface
|
||||||
@ -90,7 +89,6 @@ public:
|
|||||||
|
|
||||||
class iterator
|
class iterator
|
||||||
{
|
{
|
||||||
friend class MenuMngr;
|
|
||||||
MenuCommand* a;
|
MenuCommand* a;
|
||||||
public:
|
public:
|
||||||
iterator(MenuCommand*aa) : a(aa) {}
|
iterator(MenuCommand*aa) : a(aa) {}
|
||||||
@ -103,11 +101,6 @@ 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
|
||||||
|
@ -417,18 +417,16 @@ void CPluginMngr::CPlugin::pausePlugin()
|
|||||||
// Unpause a plugin
|
// Unpause a plugin
|
||||||
void CPluginMngr::CPlugin::unpausePlugin()
|
void CPluginMngr::CPlugin::unpausePlugin()
|
||||||
{
|
{
|
||||||
if (isValid() && (getStatusCode() != ps_stopped))
|
if (isValid())
|
||||||
{
|
{
|
||||||
// set status first so the function will be marked executable
|
// set status first so the function will be marked executable
|
||||||
setStatus(ps_running);
|
setStatus(ps_running);
|
||||||
|
|
||||||
// call plugin_unpause if provided
|
// call plugin_unpause if provided
|
||||||
if (m_UnpauseFwd != -1)
|
if (m_UnpauseFwd != -1)
|
||||||
{
|
|
||||||
executeForwards(m_UnpauseFwd);
|
executeForwards(m_UnpauseFwd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
char *CPluginMngr::ReadIntoOrFromCache(const char *file, size_t &bufsize)
|
char *CPluginMngr::ReadIntoOrFromCache(const char *file, size_t &bufsize)
|
||||||
{
|
{
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
#include "binlog.h"
|
#include "binlog.h"
|
||||||
#include "libraries.h"
|
#include "libraries.h"
|
||||||
|
|
||||||
const char *invis_cvar_list[5] = {"amxmodx_version", "amxmodx_modules", "amx_debug", "amx_mldebug", "amx_client_languages"};
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -544,28 +542,15 @@ static cell AMX_NATIVE_CALL is_user_hltv(AMX *amx, cell *params) /* 1 param */
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool g_bmod_tfc;
|
|
||||||
static cell AMX_NATIVE_CALL is_user_alive(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL is_user_alive(AMX *amx, cell *params) /* 1 param */
|
||||||
{
|
{
|
||||||
int index = params[1];
|
int index = params[1];
|
||||||
|
|
||||||
if (index < 1 || index > gpGlobals->maxClients)
|
if (index < 1 || index > gpGlobals->maxClients)
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
|
||||||
|
|
||||||
if (g_bmod_tfc)
|
|
||||||
{
|
|
||||||
edict_t *e = pPlayer->pEdict;
|
|
||||||
if (e->v.flags & FL_SPECTATOR ||
|
|
||||||
(!e->v.team || !e->v.playerclass))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0);
|
return ((pPlayer->ingame && pPlayer->IsAlive()) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -991,9 +976,7 @@ static cell AMX_NATIVE_CALL get_user_team(AMX *amx, cell *params) /* 3 param */
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (params[3])
|
if (params[3])
|
||||||
{
|
|
||||||
set_amxstring(amx, params[2], pPlayer->team.c_str(), params[3]);
|
set_amxstring(amx, params[2], pPlayer->team.c_str(), params[3]);
|
||||||
}
|
|
||||||
|
|
||||||
return pPlayer->teamId;
|
return pPlayer->teamId;
|
||||||
}
|
}
|
||||||
@ -1219,7 +1202,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 cmd->getId();
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 +1236,7 @@ static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
|
|||||||
|
|
||||||
cmd->setCmdType(CMD_ClientCommand);
|
cmd->setCmdType(CMD_ClientCommand);
|
||||||
|
|
||||||
return cmd->getId();
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 +1271,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 cmd->getId();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 */
|
||||||
@ -1593,19 +1576,6 @@ static cell AMX_NATIVE_CALL get_cvar_string(AMX *amx, cell *params) /* 3 param *
|
|||||||
int ilen;
|
int ilen;
|
||||||
char* sptemp = get_amxstring(amx, params[1], 0, ilen);
|
char* sptemp = get_amxstring(amx, params[1], 0, ilen);
|
||||||
|
|
||||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
|
||||||
{
|
|
||||||
/* :HACKHACK: Pretend we're invisible to old plugins for backward compatibility */
|
|
||||||
char *cvar = sptemp;
|
|
||||||
for (unsigned int i=0; i<5; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(cvar, invis_cvar_list[i]) == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return set_amxstring(amx, params[2], CVAR_GET_STRING(sptemp), params[3]);
|
return set_amxstring(amx, params[2], CVAR_GET_STRING(sptemp), params[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1626,20 +1596,6 @@ static cell AMX_NATIVE_CALL get_pcvar_float(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_cvar_float(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL get_cvar_float(AMX *amx, cell *params) /* 1 param */
|
||||||
{
|
{
|
||||||
int ilen;
|
int ilen;
|
||||||
|
|
||||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
|
||||||
{
|
|
||||||
/* :HACKHACK: Pretend we're invisible to old plugins for backward compatibility */
|
|
||||||
char *cvar = get_amxstring(amx, params[1], 0, ilen);
|
|
||||||
for (unsigned int i=0; i<5; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(cvar, invis_cvar_list[i]) == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
REAL pFloat = CVAR_GET_FLOAT(get_amxstring(amx, params[1], 0, ilen));
|
REAL pFloat = CVAR_GET_FLOAT(get_amxstring(amx, params[1], 0, ilen));
|
||||||
|
|
||||||
return amx_ftoc(pFloat);
|
return amx_ftoc(pFloat);
|
||||||
@ -1682,18 +1638,6 @@ static cell AMX_NATIVE_CALL get_pcvar_num(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL get_cvar_num(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL get_cvar_num(AMX *amx, cell *params) /* 1 param */
|
||||||
{
|
{
|
||||||
int ilen;
|
int ilen;
|
||||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
|
||||||
{
|
|
||||||
/* :HACKHACK: Pretend we're invisible to old plugins for backward compatibility */
|
|
||||||
char *cvar = get_amxstring(amx, params[1], 0, ilen);
|
|
||||||
for (unsigned int i=0; i<5; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(cvar, invis_cvar_list[i]) == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (int)CVAR_GET_FLOAT(get_amxstring(amx, params[1], 0, ilen));
|
return (int)CVAR_GET_FLOAT(get_amxstring(amx, params[1], 0, ilen));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2264,18 +2208,6 @@ static cell AMX_NATIVE_CALL task_exists(AMX *amx, cell *params) /* 1 param */
|
|||||||
static cell AMX_NATIVE_CALL cvar_exists(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL cvar_exists(AMX *amx, cell *params) /* 1 param */
|
||||||
{
|
{
|
||||||
int ilen;
|
int ilen;
|
||||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
|
||||||
{
|
|
||||||
/* :HACKHACK: Pretend we're invisible to old plugins for backward compatibility */
|
|
||||||
char *cvar = get_amxstring(amx, params[1], 0, ilen);
|
|
||||||
for (unsigned int i=0; i<5; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(cvar, invis_cvar_list[i]) == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (CVAR_GET_POINTER(get_amxstring(amx, params[1], 0, ilen)) ? 1 : 0);
|
return (CVAR_GET_POINTER(get_amxstring(amx, params[1], 0, ilen)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2796,20 +2728,6 @@ static cell AMX_NATIVE_CALL get_cvar_flags(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
int ilen;
|
int ilen;
|
||||||
char* sCvar = get_amxstring(amx, params[1], 0, ilen);
|
char* sCvar = get_amxstring(amx, params[1], 0, ilen);
|
||||||
|
|
||||||
if (amx->flags & AMX_FLAG_OLDFILE)
|
|
||||||
{
|
|
||||||
/* :HACKHACK: Pretend we're invisible to old plugins for backward compatibility */
|
|
||||||
char *cvar = sCvar;
|
|
||||||
for (unsigned int i=0; i<5; i++)
|
|
||||||
{
|
|
||||||
if (strcmp(cvar, invis_cvar_list[i]) == 0)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cvar_t* pCvar = CVAR_GET_POINTER(sCvar);
|
cvar_t* pCvar = CVAR_GET_POINTER(sCvar);
|
||||||
|
|
||||||
return pCvar ? pCvar->flags : 0;
|
return pCvar ? pCvar->flags : 0;
|
||||||
@ -3303,30 +3221,19 @@ static cell AMX_NATIVE_CALL get_func_id(AMX *amx, cell *params)
|
|||||||
CPluginMngr::CPlugin *plugin;
|
CPluginMngr::CPlugin *plugin;
|
||||||
|
|
||||||
if (params[2] < 0)
|
if (params[2] < 0)
|
||||||
{
|
|
||||||
plugin = g_plugins.findPluginFast(amx);
|
plugin = g_plugins.findPluginFast(amx);
|
||||||
} else {
|
else
|
||||||
plugin = g_plugins.findPlugin(params[2]);
|
plugin = g_plugins.findPlugin(params[2]);
|
||||||
}
|
|
||||||
|
|
||||||
if (!plugin)
|
if (!plugin)
|
||||||
{
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
if (!plugin->isValid())
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int len;
|
int len;
|
||||||
const char *funcName = get_amxstring(amx, params[1], 0, len);
|
const char *funcName = get_amxstring(amx, params[1], 0, len);
|
||||||
int index, err;
|
int index, err;
|
||||||
|
|
||||||
if ((err = amx_FindPublic(plugin->getAMX(), funcName, &index)) != AMX_ERR_NONE)
|
if ((err = amx_FindPublic(plugin->getAMX(), funcName, &index)) != AMX_ERR_NONE)
|
||||||
{
|
|
||||||
index = -1;
|
index = -1;
|
||||||
}
|
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
@ -3969,21 +3876,6 @@ static cell AMX_NATIVE_CALL CreateMultiForward(AMX *amx, cell *params)
|
|||||||
return registerForwardC(funcname, static_cast<ForwardExecType>(params[2]), ps, count-2);
|
return registerForwardC(funcname, static_cast<ForwardExecType>(params[2]), ps, count-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL CreateMultiForwardEx(AMX *amx, cell *params)
|
|
||||||
{
|
|
||||||
int len;
|
|
||||||
char *funcname = get_amxstring(amx, params[1], 0, len);
|
|
||||||
|
|
||||||
cell ps[FORWARD_MAX_PARAMS];
|
|
||||||
cell count = params[0] / sizeof(cell);
|
|
||||||
for (cell i=4; i<=count; i++)
|
|
||||||
{
|
|
||||||
ps[i-4] = *get_amxaddr(amx, params[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return registerForwardC(funcname, static_cast<ForwardExecType>(params[2]), ps, count-3, params[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL CreateOneForward(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL CreateOneForward(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
CPluginMngr::CPlugin *p = g_plugins.findPlugin(params[1]);
|
CPluginMngr::CPlugin *p = g_plugins.findPlugin(params[1]);
|
||||||
@ -4263,19 +4155,7 @@ 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)
|
||||||
{
|
{
|
||||||
cell value = params[2];
|
memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell));
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
@ -4530,7 +4410,6 @@ AMX_NATIVE_INFO amxmodx_Natives[] =
|
|||||||
{"CreateHudSyncObj", CreateHudSyncObj},
|
{"CreateHudSyncObj", CreateHudSyncObj},
|
||||||
{"CreateLangKey", CreateLangKey},
|
{"CreateLangKey", CreateLangKey},
|
||||||
{"CreateMultiForward", CreateMultiForward},
|
{"CreateMultiForward", CreateMultiForward},
|
||||||
{"CreateMultiForwardEx", CreateMultiForwardEx},
|
|
||||||
{"CreateOneForward", CreateOneForward},
|
{"CreateOneForward", CreateOneForward},
|
||||||
{"DestroyForward", DestroyForward},
|
{"DestroyForward", DestroyForward},
|
||||||
{"ExecuteForward", ExecuteForward},
|
{"ExecuteForward", ExecuteForward},
|
||||||
|
@ -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.76c"
|
#define AMX_VERSION "1.76"
|
||||||
|
|
||||||
extern AMX_NATIVE_INFO core_Natives[];
|
extern AMX_NATIVE_INFO core_Natives[];
|
||||||
extern AMX_NATIVE_INFO time_Natives[];
|
extern AMX_NATIVE_INFO time_Natives[];
|
||||||
|
@ -92,10 +92,9 @@ void Client_ShowMenu(void* mValue)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern bool g_bmod_tfc;
|
|
||||||
void Client_TeamInfo(void* mValue)
|
void Client_TeamInfo(void* mValue)
|
||||||
{
|
{
|
||||||
if (mPlayer && !g_bmod_tfc) return;
|
if (mPlayer) return;
|
||||||
static int index;
|
static int index;
|
||||||
|
|
||||||
switch (mState++)
|
switch (mState++)
|
||||||
@ -108,7 +107,6 @@ void Client_TeamInfo(void* mValue)
|
|||||||
char* msg = (char*)mValue;
|
char* msg = (char*)mValue;
|
||||||
g_players[index].team.assign(msg);
|
g_players[index].team.assign(msg);
|
||||||
g_teamsIds.registerTeam(msg, -1);
|
g_teamsIds.registerTeam(msg, -1);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -799,25 +799,13 @@ static cell AMX_NATIVE_CALL amx_rmdir(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL amx_rename(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL amx_rename(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char f_old_r[260];
|
|
||||||
char f_new_r[260];
|
|
||||||
|
|
||||||
char *fold = get_amxstring(amx, params[1], 0, len);
|
char *fold = get_amxstring(amx, params[1], 0, len);
|
||||||
char *fnew = get_amxstring(amx, params[2], 1, len);
|
char *fnew = get_amxstring(amx, params[2], 1, len);
|
||||||
|
|
||||||
if (params[0] / sizeof(cell) == 3 && params[3])
|
|
||||||
{
|
|
||||||
build_pathname_r(f_old_r, sizeof(f_old_r)-1, "%s", fold);
|
|
||||||
build_pathname_r(f_new_r, sizeof(f_new_r)-1, "%s", fnew);
|
|
||||||
} else {
|
|
||||||
snprintf(f_old_r, sizeof(f_old_r)-1, "%s", fold);
|
|
||||||
snprintf(f_new_r, sizeof(f_new_r)-1, "%s", fnew);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
return (rename(f_old_r, f_new_r) == 0);
|
return (rename(fold, fnew) == 0);
|
||||||
#elif defined WIN32
|
#elif defined WIN32
|
||||||
return MoveFileA(f_old_r, f_new_r);
|
return MoveFileA(fold, fnew);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ String g_log_dir;
|
|||||||
String g_mod_name;
|
String g_mod_name;
|
||||||
XVars g_xvars;
|
XVars g_xvars;
|
||||||
|
|
||||||
bool g_bmod_tfc;
|
|
||||||
bool g_bmod_cstrike;
|
bool g_bmod_cstrike;
|
||||||
bool g_bmod_dod;
|
bool g_bmod_dod;
|
||||||
bool g_dontprecache;
|
bool g_dontprecache;
|
||||||
@ -316,20 +315,6 @@ const char* get_localinfo(const char* name, const char* def)
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* get_localinfo_r(const char *name, const char *def, char buffer[], size_t maxlength)
|
|
||||||
{
|
|
||||||
const char* b = LOCALINFO((char*)name);
|
|
||||||
|
|
||||||
if (b == 0 || *b == 0)
|
|
||||||
{
|
|
||||||
SET_LOCALINFO((char*)name, (char*)(b = def));
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(buffer, maxlength, "%s", b);
|
|
||||||
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Very first point at map load
|
// Very first point at map load
|
||||||
// Load AMX modules for new native functions
|
// Load AMX modules for new native functions
|
||||||
// Initialize AMX stuff and load it's plugins from plugins.ini list
|
// Initialize AMX stuff and load it's plugins from plugins.ini list
|
||||||
@ -382,17 +367,14 @@ int C_Spawn(edict_t *pent)
|
|||||||
get_localinfo("amx_logdir", "addons/amxmodx/logs");
|
get_localinfo("amx_logdir", "addons/amxmodx/logs");
|
||||||
|
|
||||||
char map_pluginsfile_path[256];
|
char map_pluginsfile_path[256];
|
||||||
char configs_dir[256];
|
|
||||||
|
|
||||||
// ###### Load modules
|
// ###### Load modules
|
||||||
loadModules(get_localinfo("amxx_modules", "addons/amxmodx/configs/modules.ini"), PT_ANYTIME);
|
loadModules(get_localinfo("amxx_modules", "addons/amxmodx/configs/modules.ini"), PT_ANYTIME);
|
||||||
|
|
||||||
get_localinfo_r("amxx_configsdir", "addons/amxmodx/configs", configs_dir, sizeof(configs_dir)-1);
|
|
||||||
g_plugins.CALMFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
g_plugins.CALMFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
||||||
LoadExtraPluginsToPCALM(configs_dir);
|
LoadExtraPluginsToPCALM(get_localinfo("amxx_configsdir", "addons/amxmodx/configs"));
|
||||||
snprintf(map_pluginsfile_path, sizeof(map_pluginsfile_path)-1,
|
snprintf(map_pluginsfile_path, sizeof(map_pluginsfile_path)-1,
|
||||||
"%s/maps/plugins-%s.ini",
|
"%s/maps/plugins-%s.ini",
|
||||||
configs_dir,
|
get_localinfo("amxx_configsdir", "addons/amxmodx/configs"),
|
||||||
STRING(gpGlobals->mapname));
|
STRING(gpGlobals->mapname));
|
||||||
g_plugins.CALMFromFile(map_pluginsfile_path);
|
g_plugins.CALMFromFile(map_pluginsfile_path);
|
||||||
|
|
||||||
@ -433,7 +415,7 @@ int C_Spawn(edict_t *pent)
|
|||||||
|
|
||||||
// ###### Load AMX Mod X plugins
|
// ###### Load AMX Mod X plugins
|
||||||
g_plugins.loadPluginsFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
g_plugins.loadPluginsFromFile(get_localinfo("amxx_plugins", "addons/amxmodx/configs/plugins.ini"));
|
||||||
LoadExtraPluginsFromDir(configs_dir);
|
LoadExtraPluginsFromDir(get_localinfo("amxx_configsdir", "addons/amxmodx/configs"));
|
||||||
g_plugins.loadPluginsFromFile(map_pluginsfile_path, false);
|
g_plugins.loadPluginsFromFile(map_pluginsfile_path, false);
|
||||||
g_plugins.Finalize();
|
g_plugins.Finalize();
|
||||||
g_plugins.InvalidateCache();
|
g_plugins.InvalidateCache();
|
||||||
@ -904,7 +886,6 @@ 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)
|
||||||
@ -941,15 +922,10 @@ void C_ClientCommand(edict_t *pEntity)
|
|||||||
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
|
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (g_menucmds.GetWatchIter() != a)
|
|
||||||
{
|
|
||||||
a = g_menucmds.GetWatchIter();
|
|
||||||
} else {
|
|
||||||
++a;
|
++a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* check for PLUGIN_HANDLED_MAIN and block hl call if needed */
|
/* check for PLUGIN_HANDLED_MAIN and block hl call if needed */
|
||||||
RETURN_META(result);
|
RETURN_META(result);
|
||||||
@ -1595,7 +1571,6 @@ C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *inte
|
|||||||
} else {
|
} else {
|
||||||
g_bmod_cstrike = false;
|
g_bmod_cstrike = false;
|
||||||
g_bmod_dod = !stricmp(g_mod_name.c_str(), "dod");
|
g_bmod_dod = !stricmp(g_mod_name.c_str(), "dod");
|
||||||
g_bmod_tfc = !stricmp(g_mod_name.c_str(), "tfc");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_engfuncs.pfnCmd_Argc = C_Cmd_Argc;
|
meta_engfuncs.pfnCmd_Argc = C_Cmd_Argc;
|
||||||
|
@ -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 plugin_natives. This is dangerous!");
|
AMXXLOG_Log("An error occurred in plugins_native. This is dangerous!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,6 +778,10 @@
|
|||||||
RelativePath="..\md5.h"
|
RelativePath="..\md5.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\menus.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\messages.h"
|
RelativePath="..\messages.h"
|
||||||
>
|
>
|
||||||
|
@ -37,16 +37,12 @@ CStack<int> g_MenuFreeStack;
|
|||||||
void ClearMenus()
|
void ClearMenus()
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < g_NewMenus.size(); i++)
|
for (size_t i = 0; i < g_NewMenus.size(); i++)
|
||||||
{
|
|
||||||
delete g_NewMenus[i];
|
delete g_NewMenus[i];
|
||||||
}
|
|
||||||
|
|
||||||
g_NewMenus.clear();
|
g_NewMenus.clear();
|
||||||
while (!g_MenuFreeStack.empty())
|
while (!g_MenuFreeStack.empty())
|
||||||
{
|
|
||||||
g_MenuFreeStack.pop();
|
g_MenuFreeStack.pop();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void validate_menu_text(char *str)
|
void validate_menu_text(char *str)
|
||||||
{
|
{
|
||||||
@ -68,17 +64,13 @@ void validate_menu_text(char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (offs)
|
if (offs)
|
||||||
{
|
|
||||||
*(str-offs) = *str;
|
*(str-offs) = *str;
|
||||||
}
|
|
||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
if (offs)
|
if (offs)
|
||||||
{
|
|
||||||
*(str-offs) = '\0';
|
*(str-offs) = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Menu::Menu(const char *title, int mid, int tid)
|
Menu::Menu(const char *title, int mid, int tid)
|
||||||
{
|
{
|
||||||
@ -107,9 +99,7 @@ Menu::Menu(const char *title, int mid, int tid)
|
|||||||
Menu::~Menu()
|
Menu::~Menu()
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < m_Items.size(); i++)
|
for (size_t i = 0; i < m_Items.size(); i++)
|
||||||
{
|
|
||||||
delete m_Items[i];
|
delete m_Items[i];
|
||||||
}
|
|
||||||
|
|
||||||
unregisterSPForward(this->func);
|
unregisterSPForward(this->func);
|
||||||
|
|
||||||
@ -149,9 +139,7 @@ size_t Menu::GetPageCount()
|
|||||||
{
|
{
|
||||||
size_t items = GetItemCount();
|
size_t items = GetItemCount();
|
||||||
if (items_per_page == 0)
|
if (items_per_page == 0)
|
||||||
{
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
|
|
||||||
return ((items/items_per_page) + ((items % items_per_page) ? 1 : 0));
|
return ((items/items_per_page) + ((items % items_per_page) ? 1 : 0));
|
||||||
}
|
}
|
||||||
@ -171,49 +159,15 @@ int Menu::PagekeyToItem(page_t page, item_t key)
|
|||||||
//first page
|
//first page
|
||||||
if (page == 0)
|
if (page == 0)
|
||||||
{
|
{
|
||||||
/* The algorithm for spaces here is same as a middle page. */
|
|
||||||
item_t new_key = key;
|
|
||||||
for (size_t i=start; i<(start+key-1) && i<m_Items.size(); i++)
|
|
||||||
{
|
|
||||||
for (size_t j=0; j<m_Items[i]->blanks.size(); j++)
|
|
||||||
{
|
|
||||||
if (m_Items[i]->blanks[j] == 1)
|
|
||||||
{
|
|
||||||
if (!new_key)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
new_key--;
|
|
||||||
}
|
|
||||||
if (!new_key)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key = new_key;
|
|
||||||
if (key == items_per_page + 1)
|
if (key == items_per_page + 1)
|
||||||
{
|
|
||||||
return MENU_MORE;
|
return MENU_MORE;
|
||||||
} else if (key == items_per_page + 2) {
|
else if (key == items_per_page + 2)
|
||||||
return MENU_EXIT;
|
return MENU_EXIT;
|
||||||
} else {
|
else
|
||||||
return (start + key - 1);
|
return (start + key - 1);
|
||||||
}
|
|
||||||
} else if (page == num_pages - 1) {
|
} else if (page == num_pages - 1) {
|
||||||
//last page
|
//last page
|
||||||
size_t remaining = m_Items.size() - start;
|
size_t remaining = m_Items.size() - start;
|
||||||
/* We have to add one remaining for each "bumping" space */
|
|
||||||
for (size_t i=m_Items.size() - remaining; i<m_Items.size(); i++)
|
|
||||||
{
|
|
||||||
for (size_t j=0; j<m_Items[i]->blanks.size(); j++)
|
|
||||||
{
|
|
||||||
if (m_Items[i]->blanks[j] == 1)
|
|
||||||
{
|
|
||||||
remaining++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (key == remaining + 1)
|
if (key == remaining + 1)
|
||||||
{
|
{
|
||||||
return MENU_BACK;
|
return MENU_BACK;
|
||||||
@ -223,29 +177,6 @@ int Menu::PagekeyToItem(page_t page, item_t key)
|
|||||||
return (start + key - 1);
|
return (start + key - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* The algorithm for spaces here is a bit harder. We have to subtract
|
|
||||||
* one from the key for each space we find along the way.
|
|
||||||
*/
|
|
||||||
item_t new_key = key;
|
|
||||||
for (size_t i=start; i<(start+key-1) && i<m_Items.size(); i++)
|
|
||||||
{
|
|
||||||
for (size_t j=0; j<m_Items[i]->blanks.size(); j++)
|
|
||||||
{
|
|
||||||
if (m_Items[i]->blanks[j] == 1)
|
|
||||||
{
|
|
||||||
if (!new_key)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
new_key--;
|
|
||||||
}
|
|
||||||
if (!new_key)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key = new_key;
|
|
||||||
if (key > items_per_page && (key-items_per_page<=3))
|
if (key > items_per_page && (key-items_per_page<=3))
|
||||||
{
|
{
|
||||||
return m_OptOrders[key-items_per_page-1];
|
return m_OptOrders[key-items_per_page-1];
|
||||||
@ -343,65 +274,46 @@ 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)
|
||||||
{
|
{
|
||||||
ret = executeForwards(pItem->handler, static_cast<cell>(player), static_cast<cell>(thisId), static_cast<cell>(i));
|
ret = executeForwards(pItem->handler, static_cast<cell>(player), static_cast<cell>(thisId), static_cast<cell>(i));
|
||||||
if (ret == ITEM_ENABLED)
|
if (ret == ITEM_ENABLED)
|
||||||
{
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
} else if (ret == ITEM_DISABLED) {
|
else if (ret == ITEM_DISABLED)
|
||||||
enabled = false;
|
enabled = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (pItem->pfn)
|
if (pItem->pfn)
|
||||||
{
|
{
|
||||||
ret = (pItem->pfn)(player, thisId, i);
|
ret = (pItem->pfn)(player, thisId, i);
|
||||||
if (ret == ITEM_ENABLED)
|
if (ret == ITEM_ENABLED)
|
||||||
{
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
} else if (ret == ITEM_DISABLED) {
|
else if (ret == ITEM_DISABLED)
|
||||||
enabled = false;
|
enabled = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
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_display, pItem->name.c_str());
|
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", ++option, 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++;
|
||||||
@ -414,9 +326,7 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
for (size_t j=0; j<pItem->blanks.size(); j++)
|
for (size_t j=0; j<pItem->blanks.size(); j++)
|
||||||
{
|
{
|
||||||
if (pItem->blanks[j] == 1)
|
if (pItem->blanks[j] == 1)
|
||||||
{
|
|
||||||
option++;
|
option++;
|
||||||
}
|
|
||||||
m_Text.append("\n");
|
m_Text.append("\n");
|
||||||
slots++;
|
slots++;
|
||||||
}
|
}
|
||||||
@ -427,17 +337,11 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
|||||||
{
|
{
|
||||||
int pad = items_per_page;
|
int pad = items_per_page;
|
||||||
if (flags & Display_Back)
|
if (flags & Display_Back)
|
||||||
{
|
|
||||||
pad--;
|
pad--;
|
||||||
}
|
|
||||||
if (flags & Display_Next)
|
if (flags & Display_Next)
|
||||||
{
|
|
||||||
pad--;
|
pad--;
|
||||||
}
|
|
||||||
if (flags & Display_Exit)
|
if (flags & Display_Exit)
|
||||||
{
|
|
||||||
pad--;
|
pad--;
|
||||||
}
|
|
||||||
for (int i=slots+1; i<=pad; i++)
|
for (int i=slots+1; i<=pad; i++)
|
||||||
{
|
{
|
||||||
m_Text.append("\n");
|
m_Text.append("\n");
|
||||||
|
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FN_META_DETACH
|
#ifdef FN_META_DETACH
|
||||||
FN_META_DETACH();
|
return 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(void *pfile, char *szFmt, ...);
|
void FN_EngineFprintf(FILE *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
|
||||||
uint32 FN_FunctionFromName(const char *pName);
|
unsigned long FN_FunctionFromName(const char *pName);
|
||||||
#endif // FN_FunctionFromName
|
#endif // FN_FunctionFromName
|
||||||
|
|
||||||
#ifdef FN_NameForFunction
|
#ifdef FN_NameForFunction
|
||||||
const char *FN_NameForFunction(uint32);
|
const char *FN_NameForFunction(unsigned long function);
|
||||||
#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
|
||||||
int32 FN_RandomLong(int32 lLow, int32 lHigh);
|
long FN_RandomLong(long lLow, long 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(void *pfile, char *szFmt, ...);
|
void FN_EngineFprintf_Post(FILE *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, int32 cb);
|
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long 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
|
||||||
uint32 FN_FunctionFromName_Post(const char *pName);
|
unsigned long 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(uint32);
|
const char *FN_NameForFunction_Post(unsigned long function);
|
||||||
#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
|
||||||
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
|
long FN_RandomLong_Post(long lLow, long lHigh);
|
||||||
#endif // FN_RandomLong_Post
|
#endif // FN_RandomLong_Post
|
||||||
|
|
||||||
#ifdef FN_RandomFloat_Post
|
#ifdef FN_RandomFloat_Post
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@ -27,8 +26,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,7,6,3187
|
FILEVERSION 1,7,6,0
|
||||||
PRODUCTVERSION 1,7,6,3187
|
PRODUCTVERSION 1,7,6,0
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -45,12 +44,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.76c"
|
VALUE "FileVersion", "1.76"
|
||||||
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.76c"
|
VALUE "ProductVersion", "1.76"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -6,3 +6,4 @@ ShowStats ;HUD-stats default
|
|||||||
SayRankStats ;Say /rankstats
|
SayRankStats ;Say /rankstats
|
||||||
SayRank ;Say /rank
|
SayRank ;Say /rank
|
||||||
SayTop15 ;Say /top15
|
SayTop15 ;Say /top15
|
||||||
|
ShowStats ;HUD-stats default
|
||||||
|
@ -244,14 +244,9 @@ void CPlayer::saveBDefused(){
|
|||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
|
||||||
bool ignoreBots(edict_t *pEnt, edict_t *pOther)
|
bool ignoreBots (edict_t *pEnt, edict_t *pOther){
|
||||||
{
|
|
||||||
rankBots = (int)csstats_rankbots->value ? true : false;
|
|
||||||
if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
|
if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#define CSW_HEGRENADE 4
|
#define CSW_HEGRENADE 4
|
||||||
#define CSW_C4 6
|
#define CSW_C4 6
|
||||||
#define CSW_SMOKEGRENADE 9
|
#define CSW_SMOKEGRENADE 9
|
||||||
#define CSW_KNIFE 29
|
|
||||||
#define CSW_FLASHBANG 25
|
#define CSW_FLASHBANG 25
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "WinCSX.h"
|
#include "WinCSX.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "commctrl.h"
|
|
||||||
|
|
||||||
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||||
HINSTANCE hPrevInstance,
|
HINSTANCE hPrevInstance,
|
||||||
@ -27,8 +26,6 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitCommonControls();
|
|
||||||
|
|
||||||
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_WINCSX);
|
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_WINCSX);
|
||||||
|
|
||||||
// Show the dialog box now.
|
// Show the dialog box now.
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib"
|
|
||||||
OutputFile="$(OutDir)/WinCSX.exe"
|
OutputFile="$(OutDir)/WinCSX.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
@ -78,7 +77,6 @@
|
|||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib"
|
|
||||||
OutputFile="$(OutDir)/WinCSX.exe"
|
OutputFile="$(OutDir)/WinCSX.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib"
|
|
||||||
OutputFile="$(OutDir)/WinCSX.exe"
|
OutputFile="$(OutDir)/WinCSX.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
@ -137,7 +136,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="comctl32.lib"
|
|
||||||
OutputFile="$(OutDir)/WinCSX.exe"
|
OutputFile="$(OutDir)/WinCSX.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ int gmsgResetHUD;
|
|||||||
int gmsgAmmoX;
|
int gmsgAmmoX;
|
||||||
int gmsgScoreInfo;
|
int gmsgScoreInfo;
|
||||||
int gmsgAmmoPickup;
|
int gmsgAmmoPickup;
|
||||||
|
|
||||||
int gmsgSendAudio;
|
int gmsgSendAudio;
|
||||||
int gmsgTextMsg;
|
int gmsgTextMsg;
|
||||||
int gmsgBarTime;
|
int gmsgBarTime;
|
||||||
@ -58,11 +59,10 @@ 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","0"};
|
cvar_t init_csstats_rankbots ={"csstats_rankbots","1"};
|
||||||
cvar_t init_csstats_pause = {"csstats_pause","0"};
|
cvar_t init_csstats_pause = {"csstats_pause","0"};
|
||||||
|
|
||||||
struct sUserMsg
|
struct sUserMsg {
|
||||||
{
|
|
||||||
const char* name;
|
const char* name;
|
||||||
int* id;
|
int* id;
|
||||||
funEventCall func;
|
funEventCall func;
|
||||||
@ -76,10 +76,10 @@ struct sUserMsg
|
|||||||
{ "AmmoX" , &gmsgAmmoX, Client_AmmoX , false },
|
{ "AmmoX" , &gmsgAmmoX, Client_AmmoX , false },
|
||||||
{ "ScoreInfo" , &gmsgScoreInfo, Client_ScoreInfo, false },
|
{ "ScoreInfo" , &gmsgScoreInfo, Client_ScoreInfo, false },
|
||||||
{ "AmmoPickup" , &gmsgAmmoPickup, Client_AmmoPickup , false },
|
{ "AmmoPickup" , &gmsgAmmoPickup, Client_AmmoPickup , false },
|
||||||
|
|
||||||
{ "SendAudio" , &gmsgSendAudio , Client_SendAudio , false },
|
{ "SendAudio" , &gmsgSendAudio , Client_SendAudio , false },
|
||||||
{ "TextMsg" , &gmsgTextMsg , Client_TextMsg , false },
|
{ "TextMsg" , &gmsgTextMsg , Client_TextMsg , false },
|
||||||
{ "BarTime" , &gmsgBarTime , Client_BarTime , false },
|
{ "BarTime" , &gmsgBarTime , Client_BarTime , false },
|
||||||
{"DeathMsg", &gmsgDeathMsg, Client_DeathMsg, false},
|
|
||||||
|
|
||||||
{ 0 , 0,0,false }
|
{ 0 , 0,0,false }
|
||||||
};
|
};
|
||||||
@ -330,20 +330,10 @@ void EmitSound_Post(edict_t *entity, int channel, const char *sample, /*int*/flo
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *e, TraceResult *ptr)
|
void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *e, TraceResult *ptr) {
|
||||||
{
|
if (ptr->pHit&&(ptr->pHit->v.flags& (FL_CLIENT | FL_FAKECLIENT) )&&
|
||||||
if (ptr->pHit && (ptr->pHit->v.flags & (FL_CLIENT|FL_FAKECLIENT))
|
e&&(e->v.flags& (FL_CLIENT | FL_FAKECLIENT) )&&ptr->iHitgroup)
|
||||||
&& e
|
GET_PLAYER_POINTER(e)->aiming = ptr->iHitgroup;
|
||||||
&& (e->v.flags & (FL_CLIENT|FL_FAKECLIENT))
|
|
||||||
&& ptr->iHitgroup)
|
|
||||||
{
|
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER(e);
|
|
||||||
if (pPlayer->current != CSW_KNIFE)
|
|
||||||
{
|
|
||||||
pPlayer->aiming = ptr->iHitgroup;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "CSX"
|
#define MODULE_NAME "CSX"
|
||||||
#define MODULE_VERSION "1.76c"
|
#define MODULE_VERSION "1.76"
|
||||||
#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"
|
||||||
|
@ -88,10 +88,10 @@ void Client_AmmoPickup(void*);
|
|||||||
void Client_Damage_End(void*);
|
void Client_Damage_End(void*);
|
||||||
void Client_ScoreInfo(void*);
|
void Client_ScoreInfo(void*);
|
||||||
void Client_ResetHUD(void*);
|
void Client_ResetHUD(void*);
|
||||||
|
|
||||||
void Client_SendAudio(void*);
|
void Client_SendAudio(void*);
|
||||||
void Client_TextMsg(void*);
|
void Client_TextMsg(void*);
|
||||||
void Client_BarTime(void*);
|
void Client_BarTime(void*);
|
||||||
void Client_DeathMsg(void*);
|
|
||||||
|
|
||||||
bool ignoreBots (edict_t *pEnt, edict_t *pOther = NULL );
|
bool ignoreBots (edict_t *pEnt, edict_t *pOther = NULL );
|
||||||
bool isModuleActive();
|
bool isModuleActive();
|
||||||
|
@ -17,44 +17,6 @@ void Client_ResetHUD(void* mValue){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client_DeathMsg(void *mValue)
|
|
||||||
{
|
|
||||||
static int killer_id;
|
|
||||||
static int victim_id;
|
|
||||||
static int is_headshot;
|
|
||||||
const char *name;
|
|
||||||
|
|
||||||
switch (mState++)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
killer_id = *(int *)mValue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
victim_id = *(int *)mValue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
is_headshot = *(int *)mValue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
name = (const char *)mValue;
|
|
||||||
if (killer_id
|
|
||||||
&& (strcmp(name, "knife") == 0))
|
|
||||||
{
|
|
||||||
CPlayer *pPlayer = GET_PLAYER_POINTER_I(killer_id);
|
|
||||||
pPlayer->aiming = is_headshot ? 1 : 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client_WeaponList(void* mValue){
|
void Client_WeaponList(void* mValue){
|
||||||
static int wpnList;
|
static int wpnList;
|
||||||
static int iSlot;
|
static int iSlot;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "DoD Fun"
|
#define MODULE_NAME "DoD Fun"
|
||||||
#define MODULE_VERSION "1.76b"
|
#define MODULE_VERSION "1.76"
|
||||||
#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 "DODFUN"
|
#define MODULE_LOGTAG "DODFUN"
|
||||||
|
@ -251,7 +251,7 @@ void RankSystem::loadRank(const char* filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
short int i = 0;
|
short int i = 0;
|
||||||
if (fread(&i, sizeof(short int), 1, bfp) != 1)
|
if (!fread(&i, sizeof(short int), 1, bfp) != 1)
|
||||||
{
|
{
|
||||||
fclose(bfp);
|
fclose(bfp);
|
||||||
return;
|
return;
|
||||||
|
@ -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 "DoDX"
|
#define MODULE_NAME "DoDX"
|
||||||
#define MODULE_VERSION "1.76b"
|
#define MODULE_VERSION "1.76"
|
||||||
#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 "DODX"
|
#define MODULE_LOGTAG "DODX"
|
||||||
|
@ -798,42 +798,31 @@ static cell AMX_NATIVE_CALL in_view_cone(AMX *amx, cell *params)
|
|||||||
|
|
||||||
CHECK_ENTITY(src);
|
CHECK_ENTITY(src);
|
||||||
|
|
||||||
edict_t *pEdictSrc = INDEXENT(src);
|
Vector2D vec2LOS;
|
||||||
|
|
||||||
Vector vecLOS, vecForward;
|
|
||||||
float flDot;
|
float flDot;
|
||||||
|
|
||||||
|
edict_t *pEdictSrc = INDEXENT(src);
|
||||||
cell *addr = MF_GetAmxAddr(amx, params[2]);
|
cell *addr = MF_GetAmxAddr(amx, params[2]);
|
||||||
Vector origin(amx_ctof(addr[0]), amx_ctof(addr[1]), amx_ctof(addr[2]));
|
float vecOrigin[3];
|
||||||
|
|
||||||
bool use2D = (params[0] / sizeof(cell)) == 2 || params[3] == 0;
|
vecOrigin[0] = amx_ctof(addr[0]);
|
||||||
|
vecOrigin[1] = amx_ctof(addr[1]);
|
||||||
|
vecOrigin[2] = amx_ctof(addr[2]);
|
||||||
|
|
||||||
|
Vector origin(vecOrigin[0], vecOrigin[1], vecOrigin[2]);
|
||||||
|
|
||||||
if (use2D)
|
|
||||||
{
|
|
||||||
MAKE_VECTORS(pEdictSrc->v.angles);
|
MAKE_VECTORS(pEdictSrc->v.angles);
|
||||||
vecForward = gpGlobals->v_forward;
|
|
||||||
|
|
||||||
vecLOS = origin - pEdictSrc->v.origin;
|
vec2LOS = (origin - pEdictSrc->v.origin).Make2D();
|
||||||
|
vec2LOS = vec2LOS.Normalize();
|
||||||
|
|
||||||
vecForward.z = 0;
|
flDot = DotProduct(vec2LOS, gpGlobals->v_forward.Make2D());
|
||||||
vecLOS.z = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MAKE_VECTORS(pEdictSrc->v.v_angle);
|
|
||||||
vecForward = gpGlobals->v_forward;
|
|
||||||
|
|
||||||
vecLOS = origin - (pEdictSrc->v.origin + pEdictSrc->v.view_ofs);
|
|
||||||
}
|
|
||||||
|
|
||||||
vecLOS = vecLOS.Normalize();
|
|
||||||
|
|
||||||
flDot = DotProduct(vecLOS, vecForward);
|
|
||||||
|
|
||||||
if (flDot >= cos(pEdictSrc->v.fov * (M_PI / 360)))
|
if (flDot >= cos(pEdictSrc->v.fov * (M_PI / 360)))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL traceresult(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL traceresult(AMX *amx, cell *params)
|
||||||
|
@ -821,9 +821,9 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params)
|
|||||||
|
|
||||||
CVector<int> *peng = NULL;
|
CVector<int> *peng = NULL;
|
||||||
if (post)
|
if (post)
|
||||||
peng = &(EnginePost[func]);
|
|
||||||
else
|
|
||||||
peng = &(Engine[func]);
|
peng = &(Engine[func]);
|
||||||
|
else
|
||||||
|
peng = &(EnginePost[func]);
|
||||||
|
|
||||||
CVector<int>::iterator begin, end=peng->end();
|
CVector<int>::iterator begin, end=peng->end();
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "FakeMeta"
|
#define MODULE_NAME "FakeMeta"
|
||||||
#define MODULE_VERSION "1.76b"
|
#define MODULE_VERSION "1.76"
|
||||||
#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 "FAKEMETA"
|
#define MODULE_LOGTAG "FAKEMETA"
|
||||||
|
@ -55,10 +55,6 @@ static cell AMX_NATIVE_CALL SQL_MakeDbTuple(AMX *amx, cell *params)
|
|||||||
sql->user = strdup(MF_GetAmxString(amx, params[2], 0, &len));
|
sql->user = strdup(MF_GetAmxString(amx, params[2], 0, &len));
|
||||||
sql->pass = strdup(MF_GetAmxString(amx, params[3], 0, &len));
|
sql->pass = strdup(MF_GetAmxString(amx, params[3], 0, &len));
|
||||||
sql->db = strdup(MF_GetAmxString(amx, params[4], 0, &len));
|
sql->db = strdup(MF_GetAmxString(amx, params[4], 0, &len));
|
||||||
if (params[0] / sizeof(cell) >= 5)
|
|
||||||
{
|
|
||||||
sql->max_timeout = static_cast<unsigned int>(params[5]);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int num = MakeHandle(sql, Handle_Connection, FreeConnection);
|
unsigned int num = MakeHandle(sql, Handle_Connection, FreeConnection);
|
||||||
|
|
||||||
@ -91,12 +87,11 @@ static cell AMX_NATIVE_CALL SQL_Connect(AMX *amx, cell *params)
|
|||||||
nfo.pass = sql->pass;
|
nfo.pass = sql->pass;
|
||||||
nfo.port = sql->port;
|
nfo.port = sql->port;
|
||||||
nfo.host = sql->host;
|
nfo.host = sql->host;
|
||||||
nfo.max_timeout = sql->max_timeout;
|
|
||||||
|
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
int errcode;
|
int errcode;
|
||||||
|
|
||||||
IDatabase *pDb = g_Mysql.Connect2(&nfo, &errcode, buffer, sizeof(buffer)-1);
|
IDatabase *pDb = g_Mysql.Connect(&nfo, &errcode, buffer, sizeof(buffer)-1);
|
||||||
|
|
||||||
if (!pDb)
|
if (!pDb)
|
||||||
{
|
{
|
||||||
@ -383,15 +378,13 @@ static cell AMX_NATIVE_CALL SQL_GetQueryString(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
|
AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
|
||||||
|
|
||||||
if (!qInfo || (!qInfo->pQuery && !qInfo->opt_ptr))
|
if (!qInfo || !qInfo->pQuery)
|
||||||
{
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ptr = qInfo->pQuery ? qInfo->pQuery->GetQueryString() : qInfo->opt_ptr;
|
return MF_SetAmxString(amx, params[2], qInfo->pQuery->GetQueryString(), params[3]);
|
||||||
|
|
||||||
return MF_SetAmxString(amx, params[2], ptr, params[3]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL SQL_FieldNameToNum(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL SQL_FieldNameToNum(AMX *amx, cell *params)
|
||||||
|
@ -134,13 +134,11 @@ namespace SourceMod
|
|||||||
|
|
||||||
struct DatabaseInfo
|
struct DatabaseInfo
|
||||||
{
|
{
|
||||||
DatabaseInfo() : max_timeout(0) { };
|
|
||||||
const char *host;
|
const char *host;
|
||||||
const char *database;
|
const char *database;
|
||||||
const char *user;
|
const char *user;
|
||||||
const char *pass;
|
const char *pass;
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
unsigned int max_timeout;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ISQLDriver
|
class ISQLDriver
|
||||||
@ -149,8 +147,6 @@ namespace SourceMod
|
|||||||
virtual ~ISQLDriver() { };
|
virtual ~ISQLDriver() { };
|
||||||
public:
|
public:
|
||||||
virtual IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
virtual IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
||||||
//Supports the timeout clause
|
|
||||||
virtual IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength) =0;
|
|
||||||
virtual const char *NameString() =0;
|
virtual const char *NameString() =0;
|
||||||
virtual bool IsCompatDriver(const char *namestring) =0;
|
virtual bool IsCompatDriver(const char *namestring) =0;
|
||||||
};
|
};
|
||||||
|
@ -21,16 +21,6 @@ const char *MysqlDriver::NameString()
|
|||||||
}
|
}
|
||||||
|
|
||||||
IDatabase *MysqlDriver::Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
IDatabase *MysqlDriver::Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
||||||
{
|
|
||||||
return _Connect(info, errcode, error, maxlength, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
IDatabase *MysqlDriver::Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength)
|
|
||||||
{
|
|
||||||
return _Connect(info, errcode, error, maxlength, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
IDatabase *MysqlDriver::_Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength, bool do_timeout)
|
|
||||||
{
|
{
|
||||||
MYSQL *mysql = mysql_init(NULL);
|
MYSQL *mysql = mysql_init(NULL);
|
||||||
|
|
||||||
@ -45,11 +35,6 @@ IDatabase *MysqlDriver::_Connect(DatabaseInfo *info, int *errcode, char *error,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_timeout && info->max_timeout)
|
|
||||||
{
|
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&(info->max_timeout));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mysql_real_connect(mysql,
|
if (mysql_real_connect(mysql,
|
||||||
info->host,
|
info->host,
|
||||||
info->user,
|
info->user,
|
||||||
@ -60,13 +45,9 @@ IDatabase *MysqlDriver::_Connect(DatabaseInfo *info, int *errcode, char *error,
|
|||||||
0) == NULL)
|
0) == NULL)
|
||||||
{
|
{
|
||||||
if (errcode)
|
if (errcode)
|
||||||
{
|
|
||||||
*errcode = mysql_errno(mysql);
|
*errcode = mysql_errno(mysql);
|
||||||
}
|
|
||||||
if (error && maxlength)
|
if (error && maxlength)
|
||||||
{
|
|
||||||
snprintf(error, maxlength, "%s", mysql_error(mysql));
|
snprintf(error, maxlength, "%s", mysql_error(mysql));
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,11 +9,8 @@ namespace SourceMod
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
IDatabase *Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
||||||
IDatabase *Connect2(DatabaseInfo *info, int *errcode, char *error, size_t maxlength);
|
|
||||||
const char *NameString();
|
const char *NameString();
|
||||||
bool IsCompatDriver(const char *namestring);
|
bool IsCompatDriver(const char *namestring);
|
||||||
public:
|
|
||||||
IDatabase *_Connect(DatabaseInfo *info, int *errcode, char *error, size_t maxlength, bool do_timeout);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
struct AmxQueryInfo
|
struct AmxQueryInfo
|
||||||
{
|
{
|
||||||
AmxQueryInfo() : opt_ptr(NULL) { };
|
|
||||||
IQuery *pQuery;
|
IQuery *pQuery;
|
||||||
QueryInfo info;
|
QueryInfo info;
|
||||||
char error[255];
|
char error[255];
|
||||||
char *opt_ptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HandleType
|
enum HandleType
|
||||||
@ -34,7 +32,6 @@ struct SQL_Connection
|
|||||||
char *pass;
|
char *pass;
|
||||||
char *db;
|
char *db;
|
||||||
int port;
|
int port;
|
||||||
unsigned int max_timeout;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*FREEHANDLE)(void *, unsigned int);
|
typedef void (*FREEHANDLE)(void *, unsigned int);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* to add multiple entries.
|
* to add multiple entries.
|
||||||
*/
|
*/
|
||||||
#define MODULE_NAME "MySQL"
|
#define MODULE_NAME "MySQL"
|
||||||
#define MODULE_VERSION "1.76b"
|
#define MODULE_VERSION "1.76"
|
||||||
#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 "MySQL"
|
#define MODULE_LOGTAG "MySQL"
|
||||||
|
@ -58,7 +58,7 @@ static cell AMX_NATIVE_CALL SQL_ThreadQuery(AMX *amx, cell *params)
|
|||||||
|
|
||||||
int len;
|
int len;
|
||||||
const char *handler = MF_GetAmxString(amx, params[2], 0, &len);
|
const char *handler = MF_GetAmxString(amx, params[2], 0, &len);
|
||||||
int fwd = MF_RegisterSPForwardByName(amx, handler, FP_CELL, FP_CELL, FP_STRING, FP_CELL, FP_ARRAY, FP_CELL, FP_CELL, FP_DONE);
|
int fwd = MF_RegisterSPForwardByName(amx, handler, FP_CELL, FP_CELL, FP_STRING, FP_CELL, FP_ARRAY, FP_CELL, FP_DONE);
|
||||||
if (fwd < 1)
|
if (fwd < 1)
|
||||||
{
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Function not found: %s", handler);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Function not found: %s", handler);
|
||||||
@ -76,7 +76,7 @@ static cell AMX_NATIVE_CALL SQL_ThreadQuery(AMX *amx, cell *params)
|
|||||||
}
|
}
|
||||||
g_QueueLock->Unlock();
|
g_QueueLock->Unlock();
|
||||||
|
|
||||||
kmThread->SetInfo(cn->host, cn->user, cn->pass, cn->db, cn->port, cn->max_timeout);
|
kmThread->SetInfo(cn->host, cn->user, cn->pass, cn->db, cn->port);
|
||||||
kmThread->SetForward(fwd);
|
kmThread->SetForward(fwd);
|
||||||
kmThread->SetQuery(MF_GetAmxString(amx, params[3], 1, &len));
|
kmThread->SetQuery(MF_GetAmxString(amx, params[3], 1, &len));
|
||||||
kmThread->SetCellData(MF_GetAmxAddr(amx, params[4]), (ucell)params[5]);
|
kmThread->SetCellData(MF_GetAmxAddr(amx, params[4]), (ucell)params[5]);
|
||||||
@ -126,15 +126,13 @@ void MysqlThread::SetForward(int forward)
|
|||||||
m_fwd = forward;
|
m_fwd = forward;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MysqlThread::SetInfo(const char *host, const char *user, const char *pass, const char *db, int port, unsigned int max_timeout)
|
void MysqlThread::SetInfo(const char *host, const char *user, const char *pass, const char *db, int port)
|
||||||
{
|
{
|
||||||
m_host.assign(host);
|
m_host.assign(host);
|
||||||
m_user.assign(user);
|
m_user.assign(user);
|
||||||
m_pass.assign(pass);
|
m_pass.assign(pass);
|
||||||
m_db.assign(db);
|
m_db.assign(db);
|
||||||
m_max_timeout = m_max_timeout;
|
|
||||||
m_port = port;
|
m_port = port;
|
||||||
m_qrInfo.queue_time = gpGlobals->time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MysqlThread::SetQuery(const char *query)
|
void MysqlThread::SetQuery(const char *query)
|
||||||
@ -151,15 +149,10 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
info.user = m_user.c_str();
|
info.user = m_user.c_str();
|
||||||
info.host = m_host.c_str();
|
info.host = m_host.c_str();
|
||||||
info.port = m_port;
|
info.port = m_port;
|
||||||
info.max_timeout = m_max_timeout;
|
|
||||||
|
|
||||||
float save_time = m_qrInfo.queue_time;
|
|
||||||
|
|
||||||
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
||||||
|
|
||||||
m_qrInfo.queue_time = save_time;
|
IDatabase *pDatabase = g_Mysql.Connect(&info, &m_qrInfo.amxinfo.info.errorcode, m_qrInfo.amxinfo.error, 254);
|
||||||
|
|
||||||
IDatabase *pDatabase = g_Mysql.Connect2(&info, &m_qrInfo.amxinfo.info.errorcode, m_qrInfo.amxinfo.error, 254);
|
|
||||||
IQuery *pQuery = NULL;
|
IQuery *pQuery = NULL;
|
||||||
if (!pDatabase)
|
if (!pDatabase)
|
||||||
{
|
{
|
||||||
@ -179,15 +172,11 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
if (m_qrInfo.query_success && m_qrInfo.amxinfo.info.rs)
|
if (m_qrInfo.query_success && m_qrInfo.amxinfo.info.rs)
|
||||||
{
|
{
|
||||||
m_atomicResult.CopyFrom(m_qrInfo.amxinfo.info.rs);
|
m_atomicResult.CopyFrom(m_qrInfo.amxinfo.info.rs);
|
||||||
m_qrInfo.amxinfo.info.rs = &m_atomicResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pQuery)
|
|
||||||
{
|
|
||||||
m_qrInfo.amxinfo.pQuery = pQuery;
|
m_qrInfo.amxinfo.pQuery = pQuery;
|
||||||
|
m_qrInfo.amxinfo.info.rs = &m_atomicResult;
|
||||||
} else {
|
} else {
|
||||||
m_qrInfo.amxinfo.opt_ptr = new char[m_query.size() + 1];
|
pQuery->FreeHandle();
|
||||||
strcpy(m_qrInfo.amxinfo.opt_ptr, m_query.c_str());
|
pQuery = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDatabase)
|
if (pDatabase)
|
||||||
@ -239,37 +228,31 @@ void MysqlThread::Execute()
|
|||||||
} else if (!m_qrInfo.query_success) {
|
} else if (!m_qrInfo.query_success) {
|
||||||
state = -1;
|
state = -1;
|
||||||
}
|
}
|
||||||
float diff = gpGlobals->time - m_qrInfo.queue_time;
|
|
||||||
cell c_diff = amx_ftoc(diff);
|
|
||||||
unsigned int hndl = MakeHandle(&m_qrInfo.amxinfo, Handle_Query, NullFunc);
|
|
||||||
if (state != 0)
|
if (state != 0)
|
||||||
{
|
{
|
||||||
MF_ExecuteForward(m_fwd,
|
MF_ExecuteForward(m_fwd,
|
||||||
(cell)state,
|
(cell)state,
|
||||||
(cell)hndl,
|
(cell)0,
|
||||||
m_qrInfo.amxinfo.error,
|
m_qrInfo.amxinfo.error,
|
||||||
m_qrInfo.amxinfo.info.errorcode,
|
m_qrInfo.amxinfo.info.errorcode,
|
||||||
data_addr,
|
data_addr,
|
||||||
m_datalen,
|
m_datalen);
|
||||||
c_diff);
|
|
||||||
} else {
|
} else {
|
||||||
|
unsigned int hndl = MakeHandle(&m_qrInfo.amxinfo, Handle_Query, NullFunc);
|
||||||
MF_ExecuteForward(m_fwd,
|
MF_ExecuteForward(m_fwd,
|
||||||
(cell)0,
|
(cell)0,
|
||||||
(cell)hndl,
|
(cell)hndl,
|
||||||
"",
|
"",
|
||||||
(cell)0,
|
(cell)0,
|
||||||
data_addr,
|
data_addr,
|
||||||
m_datalen,
|
m_datalen);
|
||||||
c_diff);
|
/* this should always be true I think */
|
||||||
}
|
|
||||||
FreeHandle(hndl);
|
|
||||||
if (m_qrInfo.amxinfo.pQuery)
|
if (m_qrInfo.amxinfo.pQuery)
|
||||||
{
|
{
|
||||||
m_qrInfo.amxinfo.pQuery->FreeHandle();
|
m_qrInfo.amxinfo.pQuery->FreeHandle();
|
||||||
m_qrInfo.amxinfo.pQuery = NULL;
|
|
||||||
}
|
}
|
||||||
delete [] m_qrInfo.amxinfo.opt_ptr;
|
FreeHandle(hndl);
|
||||||
m_qrInfo.amxinfo.opt_ptr = NULL;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************
|
/*****************
|
||||||
|
@ -12,7 +12,6 @@ struct QueuedResultInfo
|
|||||||
AmxQueryInfo amxinfo;
|
AmxQueryInfo amxinfo;
|
||||||
bool connect_success;
|
bool connect_success;
|
||||||
bool query_success;
|
bool query_success;
|
||||||
float queue_time;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtomicResult :
|
class AtomicResult :
|
||||||
@ -60,7 +59,7 @@ public:
|
|||||||
MysqlThread();
|
MysqlThread();
|
||||||
~MysqlThread();
|
~MysqlThread();
|
||||||
public:
|
public:
|
||||||
void SetInfo(const char *host, const char *user, const char *pass, const char *db, int port, unsigned int max_timeout);
|
void SetInfo(const char *host, const char *user, const char *pass, const char *db, int port);
|
||||||
void SetQuery(const char *query);
|
void SetQuery(const char *query);
|
||||||
void SetCellData(cell data[], ucell len);
|
void SetCellData(cell data[], ucell len);
|
||||||
void SetForward(int forward);
|
void SetForward(int forward);
|
||||||
@ -75,7 +74,6 @@ private:
|
|||||||
SourceHook::String m_user;
|
SourceHook::String m_user;
|
||||||
SourceHook::String m_pass;
|
SourceHook::String m_pass;
|
||||||
SourceHook::String m_db;
|
SourceHook::String m_db;
|
||||||
unsigned int m_max_timeout;
|
|
||||||
int m_port;
|
int m_port;
|
||||||
cell *m_data;
|
cell *m_data;
|
||||||
ucell m_datalen;
|
ucell m_datalen;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@ -25,8 +24,8 @@ int Journal::Replay(VaultMap *pMap)
|
|||||||
|
|
||||||
BinaryReader br(m_fp);
|
BinaryReader br(m_fp);
|
||||||
|
|
||||||
uint8_t len8;
|
int8_t len8;
|
||||||
uint16_t len16;
|
int16_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.76c"
|
#define MODULE_VERSION "1.76"
|
||||||
#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,8 +169,6 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
iter++;
|
iter++;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
iter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,16 +382,13 @@ static cell AMX_NATIVE_CALL SQL_FieldNumToName(AMX *amx, cell *params)
|
|||||||
static cell AMX_NATIVE_CALL SQL_GetQueryString(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL SQL_GetQueryString(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
|
AmxQueryInfo *qInfo = (AmxQueryInfo *)GetHandle(params[1], Handle_Query);
|
||||||
|
if (!qInfo)
|
||||||
if (!qInfo || (!qInfo->pQuery && !qInfo->opt_ptr))
|
|
||||||
{
|
{
|
||||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
|
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid query handle: %d", params[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ptr = qInfo->pQuery ? qInfo->pQuery->GetQueryString() : qInfo->opt_ptr;
|
return MF_SetAmxString(amx, params[2], qInfo->pQuery->GetQueryString(), params[3]);
|
||||||
|
|
||||||
return MF_SetAmxString(amx, params[2], ptr, params[3]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL SQL_FieldNameToNum(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL SQL_FieldNameToNum(AMX *amx, cell *params)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Module info
|
// Module info
|
||||||
#define MODULE_NAME "SQLite"
|
#define MODULE_NAME "SQLite"
|
||||||
#define MODULE_VERSION "1.76b"
|
#define MODULE_VERSION "1.76"
|
||||||
#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 "SQLITE"
|
#define MODULE_LOGTAG "SQLITE"
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
namespace SourceHook
|
namespace SourceHook
|
||||||
{
|
{
|
||||||
|
|
||||||
//This class is from CSDM for AMX Mod X
|
//This class is from CSDM for AMX Mod X
|
||||||
/*
|
/*
|
||||||
A circular, doubly-linked list with one sentinel node
|
A circular, doubly-linked list with one sentinel node
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
struct AmxQueryInfo
|
struct AmxQueryInfo
|
||||||
{
|
{
|
||||||
AmxQueryInfo() : opt_ptr(NULL) { };
|
|
||||||
IQuery *pQuery;
|
IQuery *pQuery;
|
||||||
QueryInfo info;
|
QueryInfo info;
|
||||||
char error[255];
|
char error[255];
|
||||||
char *opt_ptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum HandleType
|
enum HandleType
|
||||||
|
@ -54,9 +54,6 @@ void ThreadWorker::RunThread(IThreadHandle *pHandle)
|
|||||||
/**
|
/**
|
||||||
* Check number of items in the queue
|
* Check number of items in the queue
|
||||||
*/
|
*/
|
||||||
m_StateLock->Lock();
|
|
||||||
this_state = m_state;
|
|
||||||
m_StateLock->Unlock();
|
|
||||||
if (this_state != Worker_Stopped)
|
if (this_state != Worker_Stopped)
|
||||||
{
|
{
|
||||||
m_QueueLock->Lock();
|
m_QueueLock->Lock();
|
||||||
@ -68,11 +65,6 @@ void ThreadWorker::RunThread(IThreadHandle *pHandle)
|
|||||||
*/
|
*/
|
||||||
m_Waiting = true;
|
m_Waiting = true;
|
||||||
m_QueueLock->Unlock();
|
m_QueueLock->Unlock();
|
||||||
/* first check if we should end again */
|
|
||||||
if (this_state == Worker_Stopped)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
m_AddSignal->Wait();
|
m_AddSignal->Wait();
|
||||||
m_Waiting = false;
|
m_Waiting = false;
|
||||||
} else {
|
} else {
|
||||||
@ -88,9 +80,7 @@ void ThreadWorker::RunThread(IThreadHandle *pHandle)
|
|||||||
{
|
{
|
||||||
//wait until the lock is cleared.
|
//wait until the lock is cleared.
|
||||||
if (this_state == Worker_Paused)
|
if (this_state == Worker_Paused)
|
||||||
{
|
|
||||||
m_PauseSignal->Wait();
|
m_PauseSignal->Wait();
|
||||||
}
|
|
||||||
if (this_state == Worker_Stopped)
|
if (this_state == Worker_Stopped)
|
||||||
{
|
{
|
||||||
//if we're supposed to flush cleanrly,
|
//if we're supposed to flush cleanrly,
|
||||||
@ -197,12 +187,9 @@ bool ThreadWorker::Stop(bool flush_cancel)
|
|||||||
{
|
{
|
||||||
Unpause();
|
Unpause();
|
||||||
} else {
|
} else {
|
||||||
m_QueueLock->Lock();
|
|
||||||
if (m_Waiting)
|
|
||||||
{
|
|
||||||
m_AddSignal->Signal();
|
m_AddSignal->Signal();
|
||||||
}
|
Pause();
|
||||||
m_QueueLock->Unlock();
|
Unpause();
|
||||||
}
|
}
|
||||||
|
|
||||||
me->WaitForThread();
|
me->WaitForThread();
|
||||||
|
@ -97,7 +97,7 @@ IThreadHandle *WinThreader::MakeThread(IThread *pThread, const ThreadParams *par
|
|||||||
|
|
||||||
IEventSignal *WinThreader::MakeEventSignal()
|
IEventSignal *WinThreader::MakeEventSignal()
|
||||||
{
|
{
|
||||||
HANDLE event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
HANDLE event = CreateEventA(NULL, TRUE, TRUE, NULL);
|
||||||
|
|
||||||
if (!event)
|
if (!event)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -275,6 +275,7 @@ WinThreader::WinEvent::~WinEvent()
|
|||||||
void WinThreader::WinEvent::Wait()
|
void WinThreader::WinEvent::Wait()
|
||||||
{
|
{
|
||||||
WaitForSingleObject(m_event, INFINITE);
|
WaitForSingleObject(m_event, INFINITE);
|
||||||
|
ResetEvent(m_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinThreader::WinEvent::Signal()
|
void WinThreader::WinEvent::Signal()
|
||||||
|
@ -129,7 +129,6 @@ void MysqlThread::SetForward(int forward)
|
|||||||
void MysqlThread::SetInfo(const char *db)
|
void MysqlThread::SetInfo(const char *db)
|
||||||
{
|
{
|
||||||
m_db.assign(db);
|
m_db.assign(db);
|
||||||
m_qrInfo.queue_time = gpGlobals->time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MysqlThread::SetQuery(const char *query)
|
void MysqlThread::SetQuery(const char *query)
|
||||||
@ -147,12 +146,8 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
info.host = "";
|
info.host = "";
|
||||||
info.port = 0;
|
info.port = 0;
|
||||||
|
|
||||||
float save_time = m_qrInfo.queue_time;
|
|
||||||
|
|
||||||
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
memset(&m_qrInfo, 0, sizeof(m_qrInfo));
|
||||||
|
|
||||||
m_qrInfo.queue_time = save_time;
|
|
||||||
|
|
||||||
IDatabase *pDatabase = g_Sqlite.Connect(&info, &m_qrInfo.amxinfo.info.errorcode, m_qrInfo.amxinfo.error, 254);
|
IDatabase *pDatabase = g_Sqlite.Connect(&info, &m_qrInfo.amxinfo.info.errorcode, m_qrInfo.amxinfo.error, 254);
|
||||||
IQuery *pQuery = NULL;
|
IQuery *pQuery = NULL;
|
||||||
if (!pDatabase)
|
if (!pDatabase)
|
||||||
@ -173,17 +168,15 @@ void MysqlThread::RunThread(IThreadHandle *pHandle)
|
|||||||
if (m_qrInfo.query_success && m_qrInfo.amxinfo.info.rs)
|
if (m_qrInfo.query_success && m_qrInfo.amxinfo.info.rs)
|
||||||
{
|
{
|
||||||
m_atomicResult.CopyFrom(m_qrInfo.amxinfo.info.rs);
|
m_atomicResult.CopyFrom(m_qrInfo.amxinfo.info.rs);
|
||||||
|
m_qrInfo.amxinfo.pQuery = NULL;
|
||||||
m_qrInfo.amxinfo.info.rs = &m_atomicResult;
|
m_qrInfo.amxinfo.info.rs = &m_atomicResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pQuery)
|
if (pQuery)
|
||||||
{
|
{
|
||||||
m_qrInfo.amxinfo.pQuery = pQuery;
|
pQuery->FreeHandle();
|
||||||
} else {
|
pQuery = NULL;
|
||||||
m_qrInfo.amxinfo.opt_ptr = new char[m_query.size() + 1];
|
|
||||||
strcpy(m_qrInfo.amxinfo.opt_ptr, m_query.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDatabase)
|
if (pDatabase)
|
||||||
{
|
{
|
||||||
pDatabase->FreeHandle();
|
pDatabase->FreeHandle();
|
||||||
@ -233,37 +226,26 @@ void MysqlThread::Execute()
|
|||||||
} else if (!m_qrInfo.query_success) {
|
} else if (!m_qrInfo.query_success) {
|
||||||
state = -1;
|
state = -1;
|
||||||
}
|
}
|
||||||
float diff = gpGlobals->time - m_qrInfo.queue_time;
|
|
||||||
cell c_diff = amx_ftoc(diff);
|
|
||||||
unsigned int hndl = MakeHandle(&m_qrInfo.amxinfo, Handle_Query, NullFunc);
|
|
||||||
if (state != 0)
|
if (state != 0)
|
||||||
{
|
{
|
||||||
MF_ExecuteForward(m_fwd,
|
MF_ExecuteForward(m_fwd,
|
||||||
(cell)state,
|
(cell)state,
|
||||||
(cell)hndl,
|
(cell)0,
|
||||||
m_qrInfo.amxinfo.error,
|
m_qrInfo.amxinfo.error,
|
||||||
m_qrInfo.amxinfo.info.errorcode,
|
m_qrInfo.amxinfo.info.errorcode,
|
||||||
data_addr,
|
data_addr,
|
||||||
m_datalen,
|
m_datalen);
|
||||||
c_diff);
|
|
||||||
} else {
|
} else {
|
||||||
|
unsigned int hndl = MakeHandle(&m_qrInfo.amxinfo, Handle_Query, NullFunc);
|
||||||
MF_ExecuteForward(m_fwd,
|
MF_ExecuteForward(m_fwd,
|
||||||
(cell)0,
|
(cell)0,
|
||||||
(cell)hndl,
|
(cell)hndl,
|
||||||
"",
|
"",
|
||||||
(cell)0,
|
(cell)0,
|
||||||
data_addr,
|
data_addr,
|
||||||
m_datalen,
|
m_datalen);
|
||||||
c_diff);
|
|
||||||
}
|
|
||||||
FreeHandle(hndl);
|
FreeHandle(hndl);
|
||||||
if (m_qrInfo.amxinfo.pQuery)
|
|
||||||
{
|
|
||||||
m_qrInfo.amxinfo.pQuery->FreeHandle();
|
|
||||||
m_qrInfo.amxinfo.pQuery = NULL;
|
|
||||||
}
|
}
|
||||||
delete [] m_qrInfo.amxinfo.opt_ptr;
|
|
||||||
m_qrInfo.amxinfo.opt_ptr = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************
|
/*****************
|
||||||
|
@ -12,7 +12,6 @@ struct QueuedResultInfo
|
|||||||
AmxQueryInfo amxinfo;
|
AmxQueryInfo amxinfo;
|
||||||
bool connect_success;
|
bool connect_success;
|
||||||
bool query_success;
|
bool query_success;
|
||||||
float queue_time;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtomicResult :
|
class AtomicResult :
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
-M
|
-M
|
||||||
-$M16384,1048576
|
-$M16384,1048576
|
||||||
-K$00400000
|
-K$00400000
|
||||||
-LE"c:\program files\borland\delphi7\Projects\Bpl"
|
-LE"c:\programme\borland\delphi7\Projects\Bpl"
|
||||||
-LN"c:\program files\borland\delphi7\Projects\Bpl"
|
-LN"c:\programme\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=3
|
Build=0
|
||||||
Debug=0
|
Debug=0
|
||||||
PreRelease=0
|
PreRelease=0
|
||||||
Special=0
|
Special=0
|
||||||
@ -126,11 +126,11 @@ 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.3
|
FileVersion=1.4.3.0
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=AMX Mod X Dev Team
|
LegalCopyright=AMX Mod X Dev Team
|
||||||
LegalTrademarks=
|
LegalTrademarks=
|
||||||
OriginalFilename=
|
OriginalFilename=
|
||||||
ProductName=AMXX-Studio
|
ProductName=AMXX-Studio
|
||||||
ProductVersion=1.4.3 final
|
ProductVersion=1.4.3.0
|
||||||
Comments=
|
Comments=
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -800,8 +800,6 @@ begin
|
|||||||
eCurrLine := Between(eCurrLine, '(', ')', True);
|
eCurrLine := Between(eCurrLine, '(', ')', True);
|
||||||
HideBracesAndStrings(eCurrLine, True);
|
HideBracesAndStrings(eCurrLine, True);
|
||||||
eStr2.Text := StringReplace(eCurrLine, ',', #13, [rfReplaceAll]);
|
eStr2.Text := StringReplace(eCurrLine, ',', #13, [rfReplaceAll]);
|
||||||
if (Trim(eStr2.Text) = ')') then
|
|
||||||
eStr2.Clear;
|
|
||||||
|
|
||||||
CreateCategory('Function Call');
|
CreateCategory('Function Call');
|
||||||
AddField('Function', 'Function Call', eVarName);
|
AddField('Function', 'Function Call', eVarName);
|
||||||
|
@ -176,7 +176,7 @@ begin
|
|||||||
eTempIndent := eTempIndent +1;
|
eTempIndent := eTempIndent +1;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if (eStr[i] = 'else') or ((Pos('else if', eStr[i]) = 1) or (Pos('case', eStr[i]) = 1) or (Pos('switch', eStr[i]) = 1)) and (Pos('{', eStr[i]) = 0) then
|
else if (eStr[i] = 'else') or (Pos('else if', eStr[i]) = 1) and (Pos('{', eStr[i]) = 0) then
|
||||||
eTempIndent := eTempIndent +1
|
eTempIndent := eTempIndent +1
|
||||||
else if (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 6) then begin
|
else if (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 6) then begin
|
||||||
if (IsAtStart('stock', eStr[i], False)) or (IsAtStart('while', eStr[i], True)) then begin
|
if (IsAtStart('stock', eStr[i], False)) or (IsAtStart('while', eStr[i], True)) then begin
|
||||||
|
@ -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; Document: TDocument): String;
|
function AddExtension(eFilename, eHighlighter: String): String;
|
||||||
|
|
||||||
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
|
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
|
||||||
|
|
||||||
@ -468,15 +468,11 @@ begin
|
|||||||
Collection.Close(eDocument.Index, RemoveTab);
|
Collection.Close(eDocument.Index, RemoveTab);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
|
function AddExtension(eFilename, eHighlighter: String): String;
|
||||||
begin
|
begin
|
||||||
if ExtractFileExt(eFilename) = '' then begin
|
if ExtractFileExt(eFilename) = '' then begin
|
||||||
if eHighlighter = 'Pawn' then begin
|
if eHighlighter = 'Pawn' then
|
||||||
if (ExtractFileExt(Document.Title) = '.inc') then
|
|
||||||
Result := eFilename + '.inc'
|
|
||||||
else
|
|
||||||
Result := eFilename + '.sma';
|
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
|
||||||
@ -755,8 +751,6 @@ begin
|
|||||||
else
|
else
|
||||||
eCPUSpeed := 1; // otherwise the program would hang up
|
eCPUSpeed := 1; // otherwise the program would hang up
|
||||||
frmSettings.txtLangDir.Text := IncludeTrailingPathDelimiter(eConfig.ReadString('Misc', 'LangDir', ''));
|
frmSettings.txtLangDir.Text := IncludeTrailingPathDelimiter(eConfig.ReadString('Misc', 'LangDir', ''));
|
||||||
if (frmSettings.txtLangDir.Text = '\') then
|
|
||||||
frmSettings.txtLangDir.Text := '';
|
|
||||||
frmSettings.chkShowStatusbar.Checked := eConfig.ReadBool('Misc', 'ShowStatusbar', True);
|
frmSettings.chkShowStatusbar.Checked := eConfig.ReadBool('Misc', 'ShowStatusbar', True);
|
||||||
frmMain.sbStatus.Visible := frmSettings.chkShowStatusbar.Checked;
|
frmMain.sbStatus.Visible := frmSettings.chkShowStatusbar.Checked;
|
||||||
end;
|
end;
|
||||||
|
@ -63,7 +63,6 @@ var i, k: integer;
|
|||||||
eTempResult: TPawnParseResult;
|
eTempResult: TPawnParseResult;
|
||||||
eProcedureAdded: Boolean;
|
eProcedureAdded: Boolean;
|
||||||
eCActive: Boolean;
|
eCActive: Boolean;
|
||||||
eTempBool: Boolean;
|
|
||||||
begin
|
begin
|
||||||
Result := TPawnParseResult.Create;
|
Result := TPawnParseResult.Create;
|
||||||
if not IsRecursive then
|
if not IsRecursive then
|
||||||
@ -102,38 +101,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Constants and Variables }
|
{ Constants and Variables }
|
||||||
if (IsAtStart('new', eString, False)) or (IsAtStart('const', eString, False)) or (IsAtStart('stock', eString, False)) then begin // const or variable
|
if (IsAtStart('new', eString, False)) or (IsAtStart('stock', eString, False)) then begin // const or variable
|
||||||
if (eBracesOpen = 0) and (not IsRecursive) and (Pos('(', eString) = Pos(')', eString)) then begin
|
if (eBracesOpen = 0) and (not IsRecursive) and (Pos('(', eString) = Pos(')', eString)) then begin
|
||||||
|
Delete(eString, 1, Pos(#32, eString));
|
||||||
|
eString := Trim(eString);
|
||||||
// we don't need braces so delete them...
|
// we don't need braces so delete them...
|
||||||
while (CountChars(eString, '{') <> 0) and (CountChars(eString, '}') <> 0) and (Pos('{', eString) < Pos('}', eString)) do
|
while (CountChars(eString, '{') <> 0) and (CountChars(eString, '}') <> 0) and (Pos('{', eString) < Pos('}', eString)) do
|
||||||
eString := StringReplace(eString, '{' + Between(eString, '{', '}') + '}', '', [rfReplaceAll]);
|
eString := StringReplace(eString, '{' + Between(eString, '{', '}') + '}', '', [rfReplaceAll]);
|
||||||
while (CountChars(eString, '[') <> 0) and (CountChars(eString, ']') <> 0) and (Pos('[', eString) < Pos(']', eString)) do
|
while (CountChars(eString, '[') <> 0) and (CountChars(eString, ']') <> 0) and (Pos('[', eString) < Pos(']', eString)) do
|
||||||
eString := StringReplace(eString, '[' + Between(eString, '[', ']') + ']', '', [rfReplaceAll]);
|
eString := StringReplace(eString, '[' + Between(eString, '[', ']') + ']', '', [rfReplaceAll]);
|
||||||
// done? okay, split all items if there are more than one; and if not, it's okay...
|
// done? okay, split all items if there are more than one; and if not, it's okay...
|
||||||
eStr.Text := StringReplace(Copy(eString, Pos(#32, eString)+1, Length(eString)), ',', #13, [rfReplaceAll]);
|
eStr.Text := StringReplace(eString, ',', #13, [rfReplaceAll]);
|
||||||
for k := 0 to eStr.Count - 1 do begin
|
for k := 0 to eStr.Count - 1 do begin
|
||||||
if (Trim(eStr[k]) <> '') and (eStr[k] <> '}') then begin
|
if (Trim(eStr[k]) <> '') and (eStr[k] <> '}') then begin
|
||||||
eTemp := Trim(RemoveSemicolon(eStr[k]));
|
eTemp := Trim(RemoveSemicolon(eStr[k]));
|
||||||
|
|
||||||
if (IsAtStart('const', eTemp, False)) then begin
|
if Pos(':', eTemp) <> 0 then
|
||||||
Delete(eTemp, 1, 5);
|
|
||||||
eTemp := Trim(eTemp);
|
|
||||||
eTempBool := True;
|
|
||||||
end
|
|
||||||
else
|
|
||||||
eTempBool := (IsAtStart('const', eString, False));
|
|
||||||
|
|
||||||
if (Pos(':', eTemp) <> 0) then
|
|
||||||
eTemp := Copy(eTemp, Pos(':', eTemp) + 1, Length(eTemp));
|
eTemp := Copy(eTemp, Pos(':', eTemp) + 1, Length(eTemp));
|
||||||
|
|
||||||
if (Pos('=', eTemp) <> 0) then begin // constant
|
if Pos('=', eTemp) <> 0 then begin // constant
|
||||||
Result.Constants.AddObject(Copy(eTemp, 1, Pos('=', eTemp) - 1), TObject(i));
|
Result.Constants.AddObject(Copy(eTemp, 1, Pos('=', eTemp) - 1), TObject(i));
|
||||||
Result.AutoComplete.Add(Copy(eTemp, 1, Pos('=', eTemp) - 1));
|
Result.AutoComplete.Add(Copy(eTemp, 1, Pos('=', eTemp) - 1));
|
||||||
end
|
end
|
||||||
else begin // variable
|
else begin // variable
|
||||||
if (eTempBool) then
|
|
||||||
Result.Constants.AddObject(eTemp, TObject(i))
|
|
||||||
else
|
|
||||||
Result.Variables.AddObject(eTemp, TObject(i));
|
Result.Variables.AddObject(eTemp, TObject(i));
|
||||||
Result.AutoComplete.Add(eTemp);
|
Result.AutoComplete.Add(eTemp);
|
||||||
end;
|
end;
|
||||||
|
Binary file not shown.
@ -9,14 +9,13 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
TfrmGoToLine = class(TForm)
|
TfrmGoToLine = class(TForm)
|
||||||
pnlBG: TSpTBXPanel;
|
|
||||||
lblCaption: TLabel;
|
lblCaption: TLabel;
|
||||||
cmdCancel: TSpTBXButton;
|
|
||||||
cmdOK: TSpTBXButton;
|
|
||||||
txtGoToLine: TSpTBXEdit;
|
txtGoToLine: TSpTBXEdit;
|
||||||
|
cmdOK: TSpTBXButton;
|
||||||
|
cmdCancel: TSpTBXButton;
|
||||||
|
procedure txtGoToLineChange(Sender: TObject);
|
||||||
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
procedure txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure txtGoToLineChange(Sender: TObject);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -28,6 +27,14 @@ uses UnitMainTools;
|
|||||||
|
|
||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if not IsNumeric(txtGoToLine.Text) then
|
||||||
|
txtGoToLine.Text := '1'
|
||||||
|
else if txtGoToLine.Text = '0' then
|
||||||
|
txtGoToLine.Text := '1';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmGoToLine.txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
procedure TfrmGoToLine.txtGoToLineKeyPress(Sender: TObject; var Key: Char);
|
||||||
begin
|
begin
|
||||||
if Key = #13 then begin
|
if Key = #13 then begin
|
||||||
@ -39,12 +46,6 @@ end;
|
|||||||
procedure TfrmGoToLine.FormShow(Sender: TObject);
|
procedure TfrmGoToLine.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
txtGoToLine.SetFocus;
|
txtGoToLine.SetFocus;
|
||||||
txtGoToLine.SelectAll;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmGoToLine.txtGoToLineChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
cmdOK.Enabled := StrToIntDef(txtGoToLine.Text, -1) > 0;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -7375,8 +7375,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
|
|||||||
ColorHighLight = 8623776
|
ColorHighLight = 8623776
|
||||||
ColorShadow = 8623776
|
ColorShadow = 8623776
|
||||||
Caption = 'Generate'
|
Caption = 'Generate'
|
||||||
TabOrder = 4
|
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
|
TabOrder = 4
|
||||||
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'
|
||||||
TabOrder = 5
|
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
|
TabOrder = 5
|
||||||
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'
|
||||||
OnExit = txtTimeToShowExit
|
OnChange = txtTimeToShowChange
|
||||||
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 := FloatToStrF(lblHudMsg.Left / pnlHudmessage.Width, ffFixed, -2, 2);
|
txtXPos.Text := FloatToStr(RoundTo(lblHudMsg.Left / pnlHudmessage.Width, -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 := FloatToStrF(lblHudMsg.Top / pnlHudmessage.Height, ffFixed, -2, 2);
|
txtYPos.Text := FloatToStr(RoundTo(lblHudMsg.Top / pnlHudmessage.Height, -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,6 +210,20 @@ 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
|
||||||
@ -262,16 +276,4 @@ 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.
|
||||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
object frmMain: TfrmMain
|
object frmMain: TfrmMain
|
||||||
Left = 184
|
Left = 189
|
||||||
Top = 77
|
Top = 114
|
||||||
Width = 893
|
Width = 888
|
||||||
Height = 648
|
Height = 648
|
||||||
Caption = 'AMXX-Studio'
|
Caption = 'AMXX-Studio'
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
@ -45,13 +45,13 @@ object frmMain: TfrmMain
|
|||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
object splRight: TSplitter
|
object splRight: TSplitter
|
||||||
Left = 674
|
Left = 669
|
||||||
Top = 95
|
Top = 95
|
||||||
Height = 501
|
Height = 501
|
||||||
Align = alRight
|
Align = alRight
|
||||||
end
|
end
|
||||||
object spcRight1: TImage
|
object spcRight1: TImage
|
||||||
Left = 882
|
Left = 877
|
||||||
Top = 95
|
Top = 95
|
||||||
Width = 3
|
Width = 3
|
||||||
Height = 501
|
Height = 501
|
||||||
@ -67,7 +67,7 @@ object frmMain: TfrmMain
|
|||||||
object tbxTopDock: TSpTBXDock
|
object tbxTopDock: TSpTBXDock
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 885
|
Width = 880
|
||||||
Height = 72
|
Height = 72
|
||||||
object tbxMenu: TSpTBXToolbar
|
object tbxMenu: TSpTBXToolbar
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -680,11 +680,11 @@ object frmMain: TfrmMain
|
|||||||
object sbStatus: TSpTBXStatusBar
|
object sbStatus: TSpTBXStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 596
|
Top = 596
|
||||||
Width = 885
|
Width = 880
|
||||||
Height = 25
|
Height = 25
|
||||||
object mnuFilename: TSpTBXRightAlignSpacerItem
|
object mnuFilename: TSpTBXRightAlignSpacerItem
|
||||||
Caption = 'Untitled.sma'
|
Caption = 'Untitled.sma'
|
||||||
CustomWidth = 547
|
CustomWidth = 542
|
||||||
end
|
end
|
||||||
object sepStatus0: TSpTBXSeparatorItem
|
object sepStatus0: TSpTBXSeparatorItem
|
||||||
end
|
end
|
||||||
@ -728,7 +728,7 @@ object frmMain: TfrmMain
|
|||||||
object tbDocs: TJvTabBar
|
object tbDocs: TJvTabBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 72
|
Top = 72
|
||||||
Width = 885
|
Width = 880
|
||||||
RightClickSelect = False
|
RightClickSelect = False
|
||||||
Tabs = <
|
Tabs = <
|
||||||
item
|
item
|
||||||
@ -740,7 +740,7 @@ object frmMain: TfrmMain
|
|||||||
OnMouseDown = tbDocsMouseDown
|
OnMouseDown = tbDocsMouseDown
|
||||||
end
|
end
|
||||||
object tcTools: TSpTBXTabControl
|
object tcTools: TSpTBXTabControl
|
||||||
Left = 677
|
Left = 672
|
||||||
Top = 95
|
Top = 95
|
||||||
Width = 205
|
Width = 205
|
||||||
Height = 501
|
Height = 501
|
||||||
@ -950,7 +950,7 @@ object frmMain: TfrmMain
|
|||||||
object pnlParent: TPanel
|
object pnlParent: TPanel
|
||||||
Left = 3
|
Left = 3
|
||||||
Top = 95
|
Top = 95
|
||||||
Width = 671
|
Width = 666
|
||||||
Height = 501
|
Height = 501
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -958,7 +958,7 @@ object frmMain: TfrmMain
|
|||||||
object splOutput: TSplitter
|
object splOutput: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 416
|
Top = 416
|
||||||
Width = 671
|
Width = 666
|
||||||
Height = 3
|
Height = 3
|
||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -967,7 +967,7 @@ object frmMain: TfrmMain
|
|||||||
object sciEditor: TScintilla
|
object sciEditor: TScintilla
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 671
|
Width = 666
|
||||||
Height = 416
|
Height = 416
|
||||||
Color = clWhite
|
Color = clWhite
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -4493,7 +4493,7 @@ object frmMain: TfrmMain
|
|||||||
object lstOutput: TListBox
|
object lstOutput: TListBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 419
|
Top = 419
|
||||||
Width = 671
|
Width = 666
|
||||||
Height = 82
|
Height = 82
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
@ -4544,6 +4544,7 @@ 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
|
||||||
@ -6568,7 +6569,6 @@ 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);
|
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter);
|
||||||
ActiveDoc.Save;
|
ActiveDoc.Save;
|
||||||
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
|
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
|
||||||
end;
|
end;
|
||||||
@ -1071,30 +1071,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.OnCodeSnippetClick(Sender: TObject);
|
procedure TfrmMain.OnCodeSnippetClick(Sender: TObject);
|
||||||
var Snippet, Indentation: String;
|
|
||||||
Line: Integer;
|
|
||||||
begin
|
begin
|
||||||
if Plugin_CodeSnippetClick(TSpTBXItem(Sender).Caption, GetCat, GetSnippet(GetCat, (Sender as TSpTBXItem).Caption)) then begin
|
if Plugin_CodeSnippetClick(TSpTBXItem(Sender).Caption, GetCat, GetSnippet(GetCat, (Sender as TSpTBXItem).Caption)) then
|
||||||
Snippet := GetSnippet(GetCat, (Sender as TSpTBXItem).Caption);
|
sciEditor.SelText := GetSnippet(GetCat, (Sender as TSpTBXItem).Caption);
|
||||||
if (Pos('!APPEND!' + #13, Snippet) = 1) then begin
|
|
||||||
Snippet := Copy(Snippet, Pos(#10, Snippet)+1, Length(Snippet));
|
|
||||||
Line := sciEditor.Lines.Add(Snippet);
|
|
||||||
end
|
|
||||||
else if (Pos('!INSERT!' + #13, Snippet) = 1) then begin
|
|
||||||
Indentation := sciEditor.Lines[sciEditor.GetCurrentLineNumber];
|
|
||||||
if (Trim(Indentation) <> '') then
|
|
||||||
Indentation := Copy(Indentation, 1, Pos(Copy(TrimLeft(Indentation), 1, 1), Indentation)-1);
|
|
||||||
Snippet := StringReplace(Snippet, #10, #10 + Indentation, [rfReplaceAll]);
|
|
||||||
Line := sciEditor.GetCurrentLineNumber;
|
|
||||||
sciEditor.Lines.Insert(Line, Copy(Snippet, Pos(#10, Snippet)+1, Length(Snippet)));
|
|
||||||
end
|
|
||||||
else begin
|
|
||||||
sciEditor.SelText := Snippet;
|
|
||||||
Line := sciEditor.GetCurrentLineNumber;
|
|
||||||
end;
|
|
||||||
|
|
||||||
sciEditor.GoToLine(Line);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.mnuCopyMessageClick(Sender: TObject);
|
procedure TfrmMain.mnuCopyMessageClick(Sender: TObject);
|
||||||
@ -1296,7 +1275,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]));
|
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter);
|
||||||
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 +1526,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);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1571,7 +1550,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);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1595,7 +1574,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);
|
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
|
||||||
eItem.Save;
|
eItem.Save;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
@ -1706,7 +1685,6 @@ 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;
|
||||||
@ -2232,7 +2210,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, 29, 99, buf, 13)');
|
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 50, 119, 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 + '}');
|
||||||
|
@ -64,7 +64,7 @@ object frmSettings: TfrmSettings
|
|||||||
Top = 0
|
Top = 0
|
||||||
Width = 351
|
Width = 351
|
||||||
Height = 260
|
Height = 260
|
||||||
ActivePage = jspCodeSnippets
|
ActivePage = jspCTSettings
|
||||||
PropagateEnable = False
|
PropagateEnable = False
|
||||||
Align = alClient
|
Align = alClient
|
||||||
OnChange = jplSettingsChange
|
OnChange = jplSettingsChange
|
||||||
@ -760,9 +760,6 @@ object frmSettings: TfrmSettings
|
|||||||
ScrollBars = ssBoth
|
ScrollBars = ssBoth
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
WantTabs = True
|
WantTabs = True
|
||||||
OnChange = txtCodeSnippetChange
|
|
||||||
OnEnter = txtCodeSnippetEnter
|
|
||||||
OnExit = txtCodeSnippetExit
|
|
||||||
OnKeyUp = txtCodeSnippetKeyUp
|
OnKeyUp = txtCodeSnippetKeyUp
|
||||||
end
|
end
|
||||||
object cmdCSAdd: TFlatButton
|
object cmdCSAdd: TFlatButton
|
||||||
|
@ -277,9 +277,6 @@ type
|
|||||||
procedure lvParamsDblClick(Sender: TObject);
|
procedure lvParamsDblClick(Sender: TObject);
|
||||||
procedure cmdAddFunctionClick(Sender: TObject);
|
procedure cmdAddFunctionClick(Sender: TObject);
|
||||||
procedure lstFunctionsClick(Sender: TObject);
|
procedure lstFunctionsClick(Sender: TObject);
|
||||||
procedure txtCodeSnippetEnter(Sender: TObject);
|
|
||||||
procedure txtCodeSnippetExit(Sender: TObject);
|
|
||||||
procedure txtCodeSnippetChange(Sender: TObject);
|
|
||||||
public
|
public
|
||||||
Foreground, Background: TColor;
|
Foreground, Background: TColor;
|
||||||
CaretFore, CaretBack: TColor;
|
CaretFore, CaretBack: TColor;
|
||||||
@ -342,14 +339,9 @@ begin
|
|||||||
eReg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion', False);
|
eReg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion', False);
|
||||||
{ AMXX }
|
{ AMXX }
|
||||||
AMXXDir := eReg.ReadString('ProgramFilesDir') + '\AMX Mod X\';
|
AMXXDir := eReg.ReadString('ProgramFilesDir') + '\AMX Mod X\';
|
||||||
if DirectoryExists(AMXXDir) then
|
if not DirectoryExists(AMXXDir) then
|
||||||
AMXXDir := IncludeTrailingPathDelimiter(AMXXDir)
|
|
||||||
else
|
|
||||||
AMXXDir := '';
|
AMXXDir := '';
|
||||||
eReg.CloseKey;
|
eReg.CloseKey;
|
||||||
{ Language Files }
|
|
||||||
if (DirectoryExists(AMXXDir + 'files\base\data\lang')) then
|
|
||||||
txtLangDir.Text := AMXXDir + 'files\base\data\lang';
|
|
||||||
{ Steam }
|
{ Steam }
|
||||||
if eReg.KeyExists('SOFTWARE\Valve\Steam') then begin
|
if eReg.KeyExists('SOFTWARE\Valve\Steam') then begin
|
||||||
eReg.OpenKey('SOFTWARE\Valve\Steam', False);
|
eReg.OpenKey('SOFTWARE\Valve\Steam', False);
|
||||||
@ -429,7 +421,7 @@ begin
|
|||||||
eConfig.WriteString('Misc', 'DefaultPluginAuthor', GetUser);
|
eConfig.WriteString('Misc', 'DefaultPluginAuthor', GetUser);
|
||||||
eConfig.WriteInteger('Misc', 'SaveNotesTo', 0);
|
eConfig.WriteInteger('Misc', 'SaveNotesTo', 0);
|
||||||
eConfig.WriteInteger('Misc', 'CPUSpeed', 5);
|
eConfig.WriteInteger('Misc', 'CPUSpeed', 5);
|
||||||
eConfig.WriteString('Misc', 'LangDir', txtLangDir.Text);
|
eConfig.WriteString('Misc', 'LangDir', '');
|
||||||
eConfig.WriteInteger('Misc', 'ShowStatusbar', 1);
|
eConfig.WriteInteger('Misc', 'ShowStatusbar', 1);
|
||||||
eConfig.WriteInteger('Misc', 'WindowState', 0);
|
eConfig.WriteInteger('Misc', 'WindowState', 0);
|
||||||
end;
|
end;
|
||||||
@ -442,8 +434,6 @@ begin
|
|||||||
2: frmMain.WindowState := wsMinimized;
|
2: frmMain.WindowState := wsMinimized;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
txtCodeSnippetExit(Sender);
|
|
||||||
|
|
||||||
PaintForeground(clBlack);
|
PaintForeground(clBlack);
|
||||||
PaintBackground(clBlack);
|
PaintBackground(clBlack);
|
||||||
PaintCaretFore(clBlack);
|
PaintCaretFore(clBlack);
|
||||||
@ -788,7 +778,6 @@ begin
|
|||||||
lstCodeSnippets.ItemIndex := lstCodeSnippets.Items.Add(eStr);
|
lstCodeSnippets.ItemIndex := lstCodeSnippets.Items.Add(eStr);
|
||||||
AddSnippet(ftcCodeSnippets.Tabs[ftcCodeSnippets.ActiveTab], eStr, '');
|
AddSnippet(ftcCodeSnippets.Tabs[ftcCodeSnippets.ActiveTab], eStr, '');
|
||||||
txtCodeSnippet.Enabled := True;
|
txtCodeSnippet.Enabled := True;
|
||||||
lstCodeSnippets.SetFocus;
|
|
||||||
lstCodeSnippetsClick(Sender);
|
lstCodeSnippetsClick(Sender);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -816,9 +805,7 @@ procedure TfrmSettings.lstCodeSnippetsClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
cmdCSRemove.Enabled := lstCodeSnippets.ItemIndex <> -1;
|
cmdCSRemove.Enabled := lstCodeSnippets.ItemIndex <> -1;
|
||||||
if cmdCSRemove.Enabled then
|
if cmdCSRemove.Enabled then
|
||||||
txtCodeSnippet.Lines.Text := GetSnippet(ftcCodeSnippets.Tabs[ftcCodeSnippets.ActiveTab], lstCodeSnippets.Items[lstCodeSnippets.ItemIndex])
|
txtCodeSnippet.Lines.Text := GetSnippet(ftcCodeSnippets.Tabs[ftcCodeSnippets.ActiveTab], lstCodeSnippets.Items[lstCodeSnippets.ItemIndex]);
|
||||||
else
|
|
||||||
txtCodeSnippetExit(Sender);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmSettings.ftcCodeSnippetsTabChanged(Sender: TObject);
|
procedure TfrmSettings.ftcCodeSnippetsTabChanged(Sender: TObject);
|
||||||
@ -828,8 +815,8 @@ begin
|
|||||||
lstCodeSnippets.ItemIndex := 0
|
lstCodeSnippets.ItemIndex := 0
|
||||||
else
|
else
|
||||||
txtCodeSnippet.Clear;
|
txtCodeSnippet.Clear;
|
||||||
txtCodeSnippet.Enabled := lstCodeSnippets.Items.Count > 0;
|
|
||||||
lstCodeSnippetsClick(Sender);
|
lstCodeSnippetsClick(Sender);
|
||||||
|
txtCodeSnippet.Enabled := lstCodeSnippets.Items.Count > 0;
|
||||||
cmdCSRemove.Enabled := lstCodeSnippets.ItemIndex <> -1;
|
cmdCSRemove.Enabled := lstCodeSnippets.ItemIndex <> -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1263,28 +1250,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmSettings.txtCodeSnippetEnter(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if (txtCodeSnippet.Font.Color = $008396A0) and ((ActiveControl = txtCodeSnippet) or (txtCodeSnippet.Enabled)) then begin
|
|
||||||
txtCodeSnippet.Font.Color := clWindowText;
|
|
||||||
txtCodeSnippet.Text := '';
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmSettings.txtCodeSnippetExit(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if (txtCodeSnippet.Text = '') then begin
|
|
||||||
txtCodeSnippet.Lines.Text := 'Use "!APPEND!" to append or'#13'"!INSERT!" to insert the code'#13'snippet into a new line on click...';
|
|
||||||
txtCodeSnippet.Font.Color := $008396A0;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrmSettings.txtCodeSnippetChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if (txtCodeSnippet.Font.Color = $008396A0) then
|
|
||||||
txtCodeSnippet.Font.Color := clWindowText
|
|
||||||
else if (txtCodeSnippet.Text = '') and (ActiveControl <> txtCodeSnippet) then
|
|
||||||
txtCodeSnippetExit(Sender);
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -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.76c
|
release = amxmodx-1.76
|
||||||
|
@ -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.76c
|
release = amxmodx-1.76
|
||||||
|
@ -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.76c"
|
!define PRODUCT_VERSION "1.76"
|
||||||
!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,27 +149,38 @@ 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"
|
||||||
@ -318,8 +329,10 @@ 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"
|
||||||
@ -572,8 +585,10 @@ 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"
|
||||||
@ -714,26 +729,37 @@ 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"
|
||||||
@ -815,7 +841,7 @@ Section Uninstall
|
|||||||
|
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
|
||||||
Delete "$DESKTOP\AMX Mod X Studio.lnk"
|
Delete "$DESKTOP\AMX Mod X Editor.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\AMXX Studio.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\AMXX Studio.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
|
||||||
Delete "$SMPROGRAMS\$ICONS_GROUP\AMX Mod X.lnk"
|
Delete "$SMPROGRAMS\$ICONS_GROUP\AMX Mod X.lnk"
|
||||||
|
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, Dialogs, JclFileUtils;
|
TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs;
|
||||||
|
|
||||||
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,9 +350,9 @@ 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');
|
||||||
@ -614,12 +614,10 @@ begin
|
|||||||
|
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := frmMain.trvDirectories.Selected;
|
CurNode := frmMain.trvDirectories.Selected;
|
||||||
if (Assigned(CurNode)) then begin
|
|
||||||
repeat
|
repeat
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
CurNode := CurNode.Parent;
|
CurNode := CurNode.Parent;
|
||||||
until (not Assigned(CurNode));
|
until (not Assigned(CurNode));
|
||||||
end;
|
|
||||||
|
|
||||||
Screen.Cursor := crAppStart;
|
Screen.Cursor := crAppStart;
|
||||||
frmMain.cmdCancel.Show;
|
frmMain.cmdCancel.Show;
|
||||||
@ -768,7 +766,7 @@ begin
|
|||||||
|
|
||||||
try
|
try
|
||||||
if FileList[i] = 'liblist.gam' then
|
if FileList[i] = 'liblist.gam' then
|
||||||
frmMain.IdFTP.Site('CHMOD 444 liblist.gam');
|
frmMain.IdFTP.Size('CHMOD 444 liblist.gam');
|
||||||
except
|
except
|
||||||
AddStatus('Warning: CHMOD not supported.', clMaroon);
|
AddStatus('Warning: CHMOD not supported.', clMaroon);
|
||||||
end;
|
end;
|
||||||
|
@ -6101,14 +6101,14 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblStep2: TLabel
|
object lblStep2: TLabel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 230
|
Top = 254
|
||||||
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 = 188
|
Top = 214
|
||||||
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 = 334
|
Top = 358
|
||||||
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 = 247
|
Top = 269
|
||||||
Width = 71
|
Width = 71
|
||||||
Height = 20
|
Height = 20
|
||||||
ColorFocused = 16245198
|
ColorFocused = 16245198
|
||||||
@ -6326,34 +6326,30 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlDirectory: TPanel
|
object pnlDirectory: TPanel
|
||||||
Left = 44
|
Left = 44
|
||||||
Top = 246
|
Top = 270
|
||||||
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
|
||||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
Align = alClient
|
||||||
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 = 204
|
Top = 230
|
||||||
Width = 443
|
Width = 443
|
||||||
Height = 21
|
Height = 21
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
@ -6376,9 +6372,27 @@ object frmMain: TfrmMain
|
|||||||
Left = 44
|
Left = 44
|
||||||
Top = 158
|
Top = 158
|
||||||
Width = 441
|
Width = 441
|
||||||
Height = 25
|
Height = 50
|
||||||
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
|
||||||
@ -6403,7 +6417,6 @@ 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
|
||||||
@ -6756,7 +6769,6 @@ 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,9 +108,10 @@ 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);
|
||||||
@ -122,6 +123,7 @@ 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);
|
||||||
@ -135,8 +137,6 @@ 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.76c';
|
const VERSION = '1.76';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -214,12 +214,10 @@ begin
|
|||||||
eStr := TStringList.Create;
|
eStr := TStringList.Create;
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := trvDirectories.Selected;
|
CurNode := trvDirectories.Selected;
|
||||||
if (Assigned(CurNode)) then begin
|
|
||||||
repeat
|
repeat
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
CurNode := CurNode.Parent;
|
CurNode := CurNode.Parent;
|
||||||
until (not Assigned(CurNode));
|
until (not Assigned(CurNode));
|
||||||
end;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
IdFTP.ChangeDir(ePath);
|
IdFTP.ChangeDir(ePath);
|
||||||
@ -238,7 +236,6 @@ 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
|
||||||
@ -249,7 +246,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');
|
||||||
@ -280,10 +277,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;
|
||||||
@ -579,7 +576,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if frbFTP.Checked then begin // FTP
|
else if frbFTP.Checked then begin // FTP
|
||||||
frmMain.Height := 421;
|
frmMain.Height := 445;
|
||||||
jspFTP.Show;
|
jspFTP.Show;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -642,7 +639,6 @@ 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
|
||||||
@ -820,12 +816,10 @@ begin
|
|||||||
// get complete path
|
// get complete path
|
||||||
ePath := '/';
|
ePath := '/';
|
||||||
CurNode := Node;
|
CurNode := Node;
|
||||||
if (Assigned(CurNode)) then begin
|
|
||||||
repeat
|
repeat
|
||||||
ePath := '/' + CurNode.Text + ePath;
|
ePath := '/' + CurNode.Text + ePath;
|
||||||
CurNode := CurNode.Parent;
|
CurNode := CurNode.Parent;
|
||||||
until (not Assigned(CurNode));
|
until (not Assigned(CurNode));
|
||||||
end;
|
|
||||||
// change dir and add directories in it
|
// change dir and add directories in it
|
||||||
try
|
try
|
||||||
Repaint;
|
Repaint;
|
||||||
@ -844,6 +838,11 @@ 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;
|
||||||
@ -937,15 +936,4 @@ 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 ((g_aNum < MAX_ADMINS) && (SQL_MoreResults(query)))
|
while (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)
|
||||||
|
@ -60,22 +60,16 @@ public plugin_init()
|
|||||||
public cmdSayChat(id)
|
public cmdSayChat(id)
|
||||||
{
|
{
|
||||||
if (!access(id, ADMIN_CHAT))
|
if (!access(id, ADMIN_CHAT))
|
||||||
{
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
|
||||||
|
|
||||||
new said[6], i = 0
|
new said[6], i = 0
|
||||||
read_argv(1, said, 5)
|
read_argv(1, said, 5)
|
||||||
|
|
||||||
while (said[i] == '@')
|
while (said[i] == '@')
|
||||||
{
|
|
||||||
i++
|
i++
|
||||||
}
|
|
||||||
|
|
||||||
if (!i || i > 3)
|
if (!i || i > 3)
|
||||||
{
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
|
||||||
|
|
||||||
new message[192], a = 0
|
new message[192], a = 0
|
||||||
read_args(message, 191)
|
read_args(message, 191)
|
||||||
@ -92,32 +86,17 @@ public cmdSayChat(id)
|
|||||||
case 'o': a = 7
|
case 'o': a = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
new n, s = i
|
|
||||||
if (a)
|
|
||||||
{
|
|
||||||
n++
|
|
||||||
s++
|
|
||||||
}
|
|
||||||
while (said[s] && isspace(said[s]))
|
|
||||||
{
|
|
||||||
n++
|
|
||||||
s++
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
new name[32], authid[32], userid
|
new name[32], authid[32], userid
|
||||||
|
|
||||||
get_user_authid(id, authid, 31)
|
get_user_authid(id, authid, 31)
|
||||||
get_user_name(id, name, 31)
|
get_user_name(id, name, 31)
|
||||||
userid = get_user_userid(id)
|
userid = get_user_userid(id)
|
||||||
|
|
||||||
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
|
log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + 1])
|
||||||
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])
|
log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + 1], "en", g_Colors[a])
|
||||||
|
|
||||||
if (++g_msgChannel > 6 || g_msgChannel < 3)
|
if (++g_msgChannel > 6 || g_msgChannel < 3)
|
||||||
{
|
|
||||||
g_msgChannel = 3
|
g_msgChannel = 3
|
||||||
}
|
|
||||||
|
|
||||||
new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0
|
new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0
|
||||||
|
|
||||||
@ -125,11 +104,11 @@ public cmdSayChat(id)
|
|||||||
|
|
||||||
if (get_cvar_num("amx_show_activity") == 2)
|
if (get_cvar_num("amx_show_activity") == 2)
|
||||||
{
|
{
|
||||||
show_hudmessage(0, "%s : %s", name, message[i + n])
|
show_hudmessage(0, "%s : %s", name, message[i + 1])
|
||||||
client_print(0, print_notify, "%s : %s", name, message[i + n])
|
client_print(0, print_notify, "%s : %s", name, message[i + 1])
|
||||||
} else {
|
} else {
|
||||||
show_hudmessage(0, "%s", message[i + n])
|
show_hudmessage(0, "%s", message[i + 1])
|
||||||
client_print(0, print_notify, "%s", message[i + n])
|
client_print(0, print_notify, "%s", message[i + 1])
|
||||||
}
|
}
|
||||||
|
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
|
@ -40,17 +40,17 @@ VexdUM_Register()
|
|||||||
register_forward(FM_ClientUserInfoChanged, "Hook_ClientUserInfoChanged")
|
register_forward(FM_ClientUserInfoChanged, "Hook_ClientUserInfoChanged")
|
||||||
|
|
||||||
/* Global Forwards */
|
/* Global Forwards */
|
||||||
g_FwdTouch = CreateMultiForwardEx("entity_touch", ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_CELL)
|
g_FwdTouch = CreateMultiForward("entity_touch", ET_STOP, FP_CELL, FP_CELL)
|
||||||
g_FwdThink = CreateMultiForwardEx("entity_think", ET_STOP, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdThink = CreateMultiForward("entity_think", ET_STOP, FP_CELL)
|
||||||
g_FwdSpawn = CreateMultiForwardEx("entity_spawn", ET_STOP, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdSpawn = CreateMultiForward("entity_spawn", ET_STOP, FP_CELL)
|
||||||
g_FwdClientPreThink = CreateMultiForwardEx("client_prethink", ET_IGNORE, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdClientPreThink = CreateMultiForward("client_prethink", ET_IGNORE, FP_CELL)
|
||||||
g_FwdClientPostThink = CreateMultiForwardEx("client_postthink", ET_IGNORE, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdClientPostThink = CreateMultiForward("client_postthink", ET_IGNORE, FP_CELL)
|
||||||
g_FwdEmitSound = CreateMultiForwardEx("emitsound", ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_STRING)
|
g_FwdEmitSound = CreateMultiForward("emitsound", ET_STOP, FP_CELL, FP_STRING)
|
||||||
g_FwdEmitAmbientSound = CreateMultiForwardEx("emitambientsound", ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_STRING)
|
g_FwdEmitAmbientSound = CreateMultiForward("emitambientsound", ET_STOP, FP_CELL, FP_STRING)
|
||||||
g_FwdSetModel = CreateMultiForwardEx("set_model", ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_STRING)
|
g_FwdSetModel = CreateMultiForward("set_model", ET_STOP, FP_CELL, FP_STRING)
|
||||||
g_FwdTraceLine = CreateMultiForwardEx("traceline", ET_STOP, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdTraceLine = CreateMultiForward("traceline", ET_STOP, FP_CELL)
|
||||||
g_FwdSetCliKeyValue = CreateMultiForwardEx("setclientkeyvalue", ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_STRING, FP_STRING)
|
g_FwdSetCliKeyValue = CreateMultiForward("setclientkeyvalue", ET_STOP, FP_CELL, FP_STRING, FP_STRING)
|
||||||
g_FwdKeyValue = CreateMultiForwardEx("keyvalue", ET_STOP, FORWARD_ONLY_OLD, FP_CELL)
|
g_FwdKeyValue = CreateMultiForward("keyvalue", ET_STOP, FP_CELL)
|
||||||
}
|
}
|
||||||
|
|
||||||
VexdUM_Natives()
|
VexdUM_Natives()
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
#include <csx>
|
#include <csx>
|
||||||
#include <cstrike>
|
|
||||||
|
|
||||||
public MultiKill
|
public MultiKill
|
||||||
public MultiKillSound
|
public MultiKillSound
|
||||||
@ -83,7 +82,6 @@ new g_announce_sync
|
|||||||
new g_status_sync
|
new g_status_sync
|
||||||
new g_left_sync
|
new g_left_sync
|
||||||
new g_bottom_sync
|
new g_bottom_sync
|
||||||
new g_he_sync
|
|
||||||
|
|
||||||
new g_MultiKillMsg[7][] =
|
new g_MultiKillMsg[7][] =
|
||||||
{
|
{
|
||||||
@ -199,7 +197,6 @@ public plugin_init()
|
|||||||
g_status_sync = CreateHudSyncObj()
|
g_status_sync = CreateHudSyncObj()
|
||||||
g_left_sync = CreateHudSyncObj()
|
g_left_sync = CreateHudSyncObj()
|
||||||
g_bottom_sync = CreateHudSyncObj()
|
g_bottom_sync = CreateHudSyncObj()
|
||||||
g_he_sync = CreateHudSyncObj()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public plugin_cfg()
|
public plugin_cfg()
|
||||||
@ -310,80 +307,46 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnemyRemaining && is_user_connected(victim))
|
if (EnemyRemaining)
|
||||||
{
|
{
|
||||||
new ppl[32], pplnum = 0, maxplayers = get_maxplayers()
|
new ppl[32], pplnum = 0
|
||||||
new epplnum = 0
|
new team = get_user_team(victim) - 1
|
||||||
new CsTeams:team = cs_get_user_team(victim)
|
|
||||||
new CsTeams:other_team
|
|
||||||
new CsTeams:enemy_team = (team == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T
|
|
||||||
|
|
||||||
if (team == CS_TEAM_T || team == CS_TEAM_CT)
|
if (team >= 0 && team < 4)
|
||||||
{
|
get_players(ppl, pplnum, "e", g_teamsNames[1 - team])
|
||||||
for (new i=1; i<=maxplayers; i++)
|
|
||||||
{
|
|
||||||
if (!is_user_connected(i))
|
|
||||||
{
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if (i == victim)
|
|
||||||
{
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
other_team = cs_get_user_team(i)
|
|
||||||
if (other_team == team && is_user_alive(i))
|
|
||||||
{
|
|
||||||
epplnum++
|
|
||||||
} else if (other_team == enemy_team) {
|
|
||||||
ppl[pplnum++] = i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pplnum && epplnum)
|
if (pplnum)
|
||||||
|
{
|
||||||
|
new eppl[32], epplnum
|
||||||
|
|
||||||
|
if (team >= 0 && team < 4)
|
||||||
|
{
|
||||||
|
get_players(eppl, epplnum, "ae", g_teamsNames[team])
|
||||||
|
|
||||||
|
if (epplnum)
|
||||||
{
|
{
|
||||||
new message[128], team_name[32]
|
new message[128], team_name[32]
|
||||||
|
|
||||||
set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, -1)
|
set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, -1)
|
||||||
|
|
||||||
/* This is a pretty stupid thing to translate, but whatever */
|
|
||||||
new _teamname[32]
|
|
||||||
if (team == CS_TEAM_T)
|
|
||||||
{
|
|
||||||
format(_teamname, 31, "TERRORIST%s", (epplnum == 1) ? "" : "S")
|
|
||||||
} else if (team == CS_TEAM_CT) {
|
|
||||||
format(_teamname, 31, "CT%s", (epplnum == 1) ? "" : "S")
|
|
||||||
}
|
|
||||||
|
|
||||||
for (new a = 0; a < pplnum; ++a)
|
for (new a = 0; a < pplnum; ++a)
|
||||||
{
|
{
|
||||||
format(team_name, 31, "%L", ppl[a], _teamname)
|
format(team_name, 31, "%L", ppl[a], (epplnum == 1) ? g_teamsNames[team] : g_teamsNames[team + 2])
|
||||||
format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)
|
format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)
|
||||||
|
|
||||||
ShowSyncHudMsg(ppl[a], g_bottom_sync, "%s", message)
|
ShowSyncHudMsg(ppl[a], g_bottom_sync, "%s", message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (LastMan)
|
if (LastMan)
|
||||||
{
|
{
|
||||||
new cts[32], ts[32], ctsnum, tsnum
|
new cts[32], ts[32], ctsnum, tsnum
|
||||||
new maxplayers = get_maxplayers()
|
|
||||||
new CsTeams:team
|
|
||||||
|
|
||||||
for (new i=1; i<=maxplayers; i++)
|
get_players(cts, ctsnum, "ae", g_teamsNames[1])
|
||||||
{
|
get_players(ts, tsnum, "ae", g_teamsNames[0])
|
||||||
if (!is_user_connected(i) || !is_user_alive(i))
|
|
||||||
{
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
team = cs_get_user_team(i)
|
|
||||||
if (team == CS_TEAM_T)
|
|
||||||
{
|
|
||||||
ts[tsnum++] = i
|
|
||||||
} else if (team == CS_TEAM_CT) {
|
|
||||||
cts[ctsnum++] = i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctsnum == 1 && tsnum == 1)
|
if (ctsnum == 1 && tsnum == 1)
|
||||||
{
|
{
|
||||||
@ -399,19 +362,19 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||||||
}
|
}
|
||||||
else if (!g_LastAnnounce)
|
else if (!g_LastAnnounce)
|
||||||
{
|
{
|
||||||
new oposite = 0, _team = 0
|
new oposite = 0, team = 0
|
||||||
|
|
||||||
if (ctsnum == 1 && tsnum > 1)
|
if (ctsnum == 1 && tsnum > 1)
|
||||||
{
|
{
|
||||||
g_LastAnnounce = cts[0]
|
g_LastAnnounce = cts[0]
|
||||||
oposite = tsnum
|
oposite = tsnum
|
||||||
_team = 0
|
team = 0
|
||||||
}
|
}
|
||||||
else if (tsnum == 1 && ctsnum > 1)
|
else if (tsnum == 1 && ctsnum > 1)
|
||||||
{
|
{
|
||||||
g_LastAnnounce = ts[0]
|
g_LastAnnounce = ts[0]
|
||||||
oposite = ctsnum
|
oposite = ctsnum
|
||||||
_team = 1
|
team = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_LastAnnounce)
|
if (g_LastAnnounce)
|
||||||
@ -421,15 +384,13 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||||||
get_user_name(g_LastAnnounce, name, 31)
|
get_user_name(g_LastAnnounce, name, 31)
|
||||||
|
|
||||||
set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
|
||||||
ShowSyncHudMsg(0, g_center1_sync, "%s (%d HP) vs. %d %s%s: %L", name, get_user_health(g_LastAnnounce), oposite, g_teamsNames[_team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])
|
ShowSyncHudMsg(0, g_center1_sync, "%s (%d HP) vs. %d %s%s: %L", name, get_user_health(g_LastAnnounce), oposite, g_teamsNames[team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])
|
||||||
|
|
||||||
if (!is_user_connecting(g_LastAnnounce))
|
if (!is_user_connecting(g_LastAnnounce))
|
||||||
{
|
|
||||||
client_cmd(g_LastAnnounce, "spk misc/oneandonly")
|
client_cmd(g_LastAnnounce, "spk misc/oneandonly")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
|
if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
|
||||||
{
|
{
|
||||||
@ -441,7 +402,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||||||
get_user_name(victim, victim_name, 31)
|
get_user_name(victim, victim_name, 31)
|
||||||
|
|
||||||
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
|
||||||
ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)
|
show_hudmessage(0, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KnifeKillSound)
|
if (KnifeKillSound)
|
||||||
@ -460,10 +421,10 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||||||
if (!selfkill)
|
if (!selfkill)
|
||||||
{
|
{
|
||||||
if (GrenadeKill)
|
if (GrenadeKill)
|
||||||
ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
|
show_hudmessage(0, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
|
||||||
}
|
}
|
||||||
else if (GrenadeSuicide)
|
else if (GrenadeSuicide)
|
||||||
ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
|
show_hudmessage(0, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (headshot && (HeadShotKill || HeadShotKillSound))
|
if (headshot && (HeadShotKill || HeadShotKillSound))
|
||||||
@ -625,11 +586,6 @@ public checkKills(param[])
|
|||||||
|
|
||||||
if (a > -1)
|
if (a > -1)
|
||||||
{
|
{
|
||||||
if (a > 6)
|
|
||||||
{
|
|
||||||
a = 6
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MultiKill)
|
if (MultiKill)
|
||||||
{
|
{
|
||||||
new name[32]
|
new name[32]
|
||||||
@ -637,6 +593,9 @@ public checkKills(param[])
|
|||||||
get_user_name(id, name, 31)
|
get_user_name(id, name, 31)
|
||||||
set_hudmessage(255, 0, 100, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
set_hudmessage(255, 0, 100, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
|
||||||
|
|
||||||
|
if (a > 6)
|
||||||
|
a = 6
|
||||||
|
|
||||||
ShowSyncHudMsg(0, g_left_sync, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")
|
ShowSyncHudMsg(0, g_left_sync, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,20 +45,8 @@ 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] = "00000000000000000000000000"
|
new g_szWeapRestr[27] = "0000000000000000000000000"
|
||||||
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][] =
|
||||||
{
|
{
|
||||||
@ -307,19 +295,6 @@ 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
|
||||||
@ -630,30 +605,7 @@ 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
|
||||||
|
|
||||||
@ -679,9 +631,7 @@ 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
|
||||||
}
|
}
|
||||||
@ -691,18 +641,9 @@ 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
|
||||||
}
|
|
||||||
|
|
||||||
new pos = (menu * 8 + key) + (get_user_team(id) - 1) * 56
|
if (g_blockPos[(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)
|
||||||
@ -858,70 +799,6 @@ 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")
|
||||||
@ -934,12 +811,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(RegisterMenuID("BuyPistol"), 511, "menuPistol")
|
register_menucmd(register_menuid("BuyPistol", 1), 511, "menuPistol")
|
||||||
register_menucmd(RegisterMenuID("BuyShotgun"), 511, "menuShotgun")
|
register_menucmd(register_menuid("BuyShotgun", 1), 511, "menuShotgun")
|
||||||
register_menucmd(RegisterMenuID("BuySub"), 511, "menuSub")
|
register_menucmd(register_menuid("BuySub", 1), 511, "menuSub")
|
||||||
register_menucmd(RegisterMenuID("BuyRifle"), 511, "menuRifle")
|
register_menucmd(register_menuid("BuyRifle", 1), 511, "menuRifle")
|
||||||
register_menucmd(RegisterMenuID("BuyMachine"), 511, "menuMachine")
|
register_menucmd(register_menuid("BuyMachine", 1), 511, "menuMachine")
|
||||||
register_menucmd(RegisterMenuID("BuyItem"), 511, "menuItem")
|
register_menucmd(register_menuid("BuyItem", 1), 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")
|
||||||
@ -952,8 +829,6 @@ 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 weapon status (say_team)")
|
register_clcmd("say /report", "cmdReport", 0, "- display waepon 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 weapon status (say_team_team)")
|
register_clcmd("say_team /report", "cmdReport", 0, "- display waepon 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")
|
||||||
@ -1420,15 +1420,7 @@ kill_stats(id)
|
|||||||
// Bail out if user stats timer is non-zero,
|
// Bail out if user stats timer is non-zero,
|
||||||
// ie function already called.
|
// ie function already called.
|
||||||
if (g_fzShowUserStatsTime[id] > 0.0)
|
if (g_fzShowUserStatsTime[id] > 0.0)
|
||||||
{
|
|
||||||
return
|
return
|
||||||
}
|
|
||||||
|
|
||||||
new team = get_user_team(id)
|
|
||||||
if (team < 1 || team > 2)
|
|
||||||
{
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flag kill stats displayed for this player.
|
// Flag kill stats displayed for this player.
|
||||||
g_fzShowUserStatsTime[id] = get_gametime()
|
g_fzShowUserStatsTime[id] = get_gametime()
|
||||||
@ -1554,10 +1546,8 @@ endround_stats()
|
|||||||
id = iaPlayers[iPlayer]
|
id = iaPlayers[iPlayer]
|
||||||
|
|
||||||
if (g_fzShowUserStatsTime[id] == 0.0)
|
if (g_fzShowUserStatsTime[id] == 0.0)
|
||||||
{
|
|
||||||
kill_stats(id)
|
kill_stats(id)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_sAwardAndScore[0] = 0
|
g_sAwardAndScore[0] = 0
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ showStatsMenu(id,pos){
|
|||||||
}
|
}
|
||||||
|
|
||||||
else len += format(menu_body[len],511-len,"^n0. %s" , pos ? "Back" : "Exit" )
|
else len += format(menu_body[len],511-len,"^n0. %s" , pos ? "Back" : "Exit" )
|
||||||
show_menu(id,keys,menu_body,-1,"Server Stats")
|
show_menu(id,keys,menu_body)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -758,8 +758,6 @@ 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.763
|
#define AMXX_VERSION 1.76
|
||||||
#define AMXX_VERSION_NUM 176
|
#define AMXX_VERSION_NUM 176
|
||||||
stock const AMXX_VERSION_STR[]="1.76c"
|
stock const AMXX_VERSION_STR[]="1.76"
|
||||||
|
|
||||||
#define M_PI 3.1415926535
|
#define M_PI 3.1415926535
|
||||||
|
|
||||||
@ -264,7 +264,6 @@ enum {
|
|||||||
#define AMX_ERR_DIVIDE 11
|
#define AMX_ERR_DIVIDE 11
|
||||||
#define AMX_ERR_NOTFOUND 19
|
#define AMX_ERR_NOTFOUND 19
|
||||||
#define AMX_ERR_PARAMS 25
|
#define AMX_ERR_PARAMS 25
|
||||||
#define AMX_ERR_GENERAL 27
|
|
||||||
|
|
||||||
#define INVALID_HANDLE -1
|
#define INVALID_HANDLE -1
|
||||||
|
|
||||||
@ -278,10 +277,6 @@ enum {
|
|||||||
#define FP_STRING 2
|
#define FP_STRING 2
|
||||||
#define FP_ARRAY 4
|
#define FP_ARRAY 4
|
||||||
|
|
||||||
#define FORWARD_ONLY_OLD 1
|
|
||||||
#define FORWARD_ONLY_NEW 2
|
|
||||||
#define FORWARD_ALL 3
|
|
||||||
|
|
||||||
#define MEXIT_ALL 1
|
#define MEXIT_ALL 1
|
||||||
#define MEXIT_NORMAL 0
|
#define MEXIT_NORMAL 0
|
||||||
#define MEXIT_NEVER -1
|
#define MEXIT_NEVER -1
|
||||||
|
@ -71,8 +71,8 @@ stock can_see(ent1, ent2)
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
new Float:flFraction;
|
new Float:flFraction;
|
||||||
get_tr2(0, TraceResult:TR_flFraction, flFraction);
|
get_tr2(0, TraceResult:TR_Fraction, flFraction);
|
||||||
if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_pHit) == ent2))
|
if (flFraction == 1.0 || (get_tr2(0, TraceResult:TR_Hit) == ent2))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,6 @@
|
|||||||
#define _Vexd_Utilities_included
|
#define _Vexd_Utilities_included
|
||||||
|
|
||||||
#include <engine>
|
#include <engine>
|
||||||
#if defined AMXMOD_BCOMPAT
|
|
||||||
#if !defined _vexd_bcompat_included
|
|
||||||
#include <VexdUM>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
stock Entvars_Get_Int(iIndex, iVariable)
|
stock Entvars_Get_Int(iIndex, iVariable)
|
||||||
return entity_get_int(iIndex, iVariable)
|
return entity_get_int(iIndex, iVariable)
|
||||||
|
@ -81,7 +81,6 @@ 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 */
|
||||||
@ -92,6 +91,5 @@ 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
|
@ -205,9 +205,7 @@ native get_amxx_verstring(buffer[], length);
|
|||||||
|
|
||||||
/* If player is not attacked function returns 0, in other
|
/* If player is not attacked function returns 0, in other
|
||||||
* case returns index of attacking player. On second and third
|
* case returns index of attacking player. On second and third
|
||||||
* parameter you may get info about weapon and body hit place.
|
* parameter you may get info about weapon and body hit place. */
|
||||||
* As of 1.75, get_user_attacker can return a non-player index if the player was attacked by a non-player entity.
|
|
||||||
*/
|
|
||||||
native get_user_attacker(index,...);
|
native get_user_attacker(index,...);
|
||||||
|
|
||||||
/* If player doesn't hit at anything function returns 0.0,
|
/* If player doesn't hit at anything function returns 0.0,
|
||||||
@ -473,19 +471,13 @@ 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. */
|
||||||
@ -1022,20 +1014,11 @@ native set_addr_val(addr, val);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a multi-plugin forward.
|
* creates a multi-plugin forward.
|
||||||
* Stop type must be one of the ET_ values in amxconst.inc
|
|
||||||
* results will be > 0 for success
|
* results will be > 0 for success
|
||||||
*/
|
*/
|
||||||
native CreateMultiForward(const name[], stop_type, ...);
|
native CreateMultiForward(const name[], stop_type, ...);
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a multi-forward plugin that can filter between old/new plugins.
|
|
||||||
* Old plugins are used by the AMX Mod backwards compatibility layer.
|
|
||||||
* Stop type must be one of the ET_ values in amxconst.inc
|
|
||||||
* Forward type must be one of the FORWARD_ values in amxconst.inc.
|
|
||||||
*/
|
|
||||||
native CreateMultiForwardEx(const name[], stop_type, forward_type, ...);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a forward for one plugin.
|
* Creates a forward for one plugin.
|
||||||
* Results will be > 0 for success.
|
* Results will be > 0 for success.
|
||||||
|
@ -226,10 +226,8 @@ forward pfn_spawn(entid);
|
|||||||
*/
|
*/
|
||||||
native find_sphere_class(aroundent, _lookforclassname[], Float:radius, entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0});
|
native find_sphere_class(aroundent, _lookforclassname[], Float:radius, entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0});
|
||||||
|
|
||||||
/* SDK function - checks if an origin is in an entity's view cone
|
//SDK function - checks if an origin is in an entity's view cone
|
||||||
* Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
|
native is_in_viewcone(entity, Float:origin[3]);
|
||||||
*/
|
|
||||||
native is_in_viewcone(entity, Float:origin[3], use3d = 0);
|
|
||||||
|
|
||||||
//SDK function - checks if an entity is visible to an entity
|
//SDK function - checks if an entity is visible to an entity
|
||||||
native is_visible(entity, target);
|
native is_visible(entity, target);
|
||||||
|
@ -29,11 +29,8 @@ native delete_file(const file[]);
|
|||||||
native file_exists(const file[]);
|
native file_exists(const file[]);
|
||||||
|
|
||||||
/* renames a file. returns 0 on failure, 1 on success.
|
/* renames a file. returns 0 on failure, 1 on success.
|
||||||
* if relative true, rename_file will act like other natives which
|
|
||||||
* use the moddir as a base directory. otherwise, the current directory is
|
|
||||||
* undefined (but assumed to be hlds).
|
|
||||||
*/
|
*/
|
||||||
native rename_file(const oldname[], const newname[], relative=0);
|
native rename_file(const oldname[], const newname[]);
|
||||||
|
|
||||||
/* Checks if a directory exists */
|
/* Checks if a directory exists */
|
||||||
native dir_exists(const dir[]);
|
native dir_exists(const dir[]);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
(C)Copyrighted under the GNU General Public License, Version 2
|
(C)Copyrighted under the GNU General Public License, Version 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined _geoip_included
|
#if defined geoip_included
|
||||||
#endinput
|
#endinput
|
||||||
#endif
|
#endif
|
||||||
#define _geoip_included
|
#define _geoip_included
|
||||||
@ -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
|
||||||
|
@ -30,12 +30,8 @@ enum Handle
|
|||||||
* !!NOTE!! I have seen most people think that this connects to the DB.
|
* !!NOTE!! I have seen most people think that this connects to the DB.
|
||||||
* Nowhere does it say this, and in fact it does not. It only caches
|
* Nowhere does it say this, and in fact it does not. It only caches
|
||||||
* the connection information, the host/user/pass/etc.
|
* the connection information, the host/user/pass/etc.
|
||||||
*
|
|
||||||
* The optional timeout parameter specifies how long connections should wait before
|
|
||||||
* giving up. If 0, the default (which is undefined) is used.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=0);
|
native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[]);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,9 +74,8 @@ native Handle:SQL_PrepareQuery(Handle:db, const fmt[], {Float,_}:...);
|
|||||||
* @param errnum - An error code, if any.
|
* @param errnum - An error code, if any.
|
||||||
* @param data - Data array you passed in.
|
* @param data - Data array you passed in.
|
||||||
* @param size - Size of the data array you passed in.
|
* @param size - Size of the data array you passed in.
|
||||||
* @param queuetime - Amount of gametime that passed while the query was resolving.
|
|
||||||
*
|
*
|
||||||
* public QueryHandler(failstate, Handle:query, error[], errnum, data[], size, Float:queuetime)
|
* public QueryHandler(failstate, Handle:query, error[], errnum, data[], size)
|
||||||
*
|
*
|
||||||
* Note! The handle you pass in is a DB Tuple, NOT an active connection!
|
* Note! The handle you pass in is a DB Tuple, NOT an active connection!
|
||||||
* Note! The handle does not need to be freed.
|
* Note! The handle does not need to be freed.
|
||||||
@ -318,7 +313,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, 11)
|
SQL_GetAffinity(get_type, 12)
|
||||||
|
|
||||||
if (!equali(get_type, set_type))
|
if (!equali(get_type, set_type))
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ BAN = ban
|
|||||||
KICK = kick
|
KICK = kick
|
||||||
NO_ACC_COM = You have no access to that command
|
NO_ACC_COM = You have no access to that command
|
||||||
USAGE = Usage
|
USAGE = Usage
|
||||||
MORE_CL_MATCHT = There is more than one client matching your argument
|
MORE_CL_MATCHT = here are more clients matching to your argument
|
||||||
CL_NOT_FOUND = Client with that name or userid not found
|
CL_NOT_FOUND = Client with that name or userid not found
|
||||||
CLIENT_IMM = Client "%s" has immunity
|
CLIENT_IMM = Client "%s" has immunity
|
||||||
CANT_PERF_DEAD = That action can't be performed on dead client "%s"
|
CANT_PERF_DEAD = That action can't be performed on dead client "%s"
|
||||||
@ -34,7 +34,7 @@ BAN = ban
|
|||||||
KICK = kick
|
KICK = kick
|
||||||
NO_ACC_COM = Du hast nicht genuegend Rechte, um diesen Befehl auszufuehren!
|
NO_ACC_COM = Du hast nicht genuegend Rechte, um diesen Befehl auszufuehren!
|
||||||
USAGE = Anwendung
|
USAGE = Anwendung
|
||||||
MORE_CL_MATCHT = Es gibt mehrere Spieler, auf die deine Angaben zutreffen
|
MORE_CL_MATCHT = hier sind mehrere Spieler, auf die deine Angaben zutreffen
|
||||||
CL_NOT_FOUND = Spieler mit diesem Namen oder dieser UserID nicht gefunden
|
CL_NOT_FOUND = Spieler mit diesem Namen oder dieser UserID nicht gefunden
|
||||||
CLIENT_IMM = Spieler "%s" hat Immnuitaet
|
CLIENT_IMM = Spieler "%s" hat Immnuitaet
|
||||||
CANT_PERF_DEAD = Diese Aktion kann nicht am toten Spieler "%s" ausgefuehrt werden.
|
CANT_PERF_DEAD = Diese Aktion kann nicht am toten Spieler "%s" ausgefuehrt werden.
|
||||||
@ -166,7 +166,7 @@ BAN = ban
|
|||||||
KICK = kick
|
KICK = kick
|
||||||
NO_ACC_COM = Nie mozesz uzyc tej komendy
|
NO_ACC_COM = Nie mozesz uzyc tej komendy
|
||||||
USAGE = Uzycie
|
USAGE = Uzycie
|
||||||
MORE_CL_MATCHT = Istnieje kilku graczy pasujacych do podanego wzorca
|
MORE_CL_MATCHT = tutaj jest wiecej klientow pasujacych do twojego wyboru
|
||||||
CL_NOT_FOUND = Nie znaleziono klienta z tym nickiem lub ID
|
CL_NOT_FOUND = Nie znaleziono klienta z tym nickiem lub ID
|
||||||
CLIENT_IMM = Klient "%s" ma immunitet
|
CLIENT_IMM = Klient "%s" ma immunitet
|
||||||
CANT_PERF_DEAD = Nie mozesz tego wykonac na martwym kliencie "%s"
|
CANT_PERF_DEAD = Nie mozesz tego wykonac na martwym kliencie "%s"
|
||||||
@ -210,7 +210,7 @@ BAN = banear
|
|||||||
KICK = expulsar
|
KICK = expulsar
|
||||||
NO_ACC_COM = No tienes acceso a este comando
|
NO_ACC_COM = No tienes acceso a este comando
|
||||||
USAGE = Uso
|
USAGE = Uso
|
||||||
MORE_CL_MATCHT = Hay mas de un cliente que coincide con tu argumento
|
MORE_CL_MATCHT = aqui hay mas clientes que coinciden con tu argumento
|
||||||
CL_NOT_FOUND = No se encontro ningun cliente con ese nombre o ese identificador
|
CL_NOT_FOUND = No se encontro ningun cliente con ese nombre o ese identificador
|
||||||
CLIENT_IMM = El cliente "%s" tiene inmunidad
|
CLIENT_IMM = El cliente "%s" tiene inmunidad
|
||||||
CANT_PERF_DEAD = Esta accion no se puede aplicar a un cliente muerto "%s"
|
CANT_PERF_DEAD = Esta accion no se puede aplicar a un cliente muerto "%s"
|
||||||
|
@ -303,6 +303,7 @@ COM_STATS_ADD = ^tadd <nimi> <muuttuja> - Lisaa tilastoja listaan
|
|||||||
NO_STATS = Tilastopluginit eivat ole asennettuna talla palvelimellar^n
|
NO_STATS = Tilastopluginit eivat ole asennettuna talla palvelimellar^n
|
||||||
SAVE_CONF = Tallenna saadot
|
SAVE_CONF = Tallenna saadot
|
||||||
|
|
||||||
|
|
||||||
[ls]
|
[ls]
|
||||||
NO_OPTION = C0|_|ld|\|'t f!|\|d 0pt!0|\|(s) w!th s|_|(h v4r!4bl3 (|\|4m3 "%s")
|
NO_OPTION = C0|_|ld|\|'t f!|\|d 0pt!0|\|(s) w!th s|_|(h v4r!4bl3 (|\|4m3 "%s")
|
||||||
STATS_CONF_SAVED = $t4tz0|2 (0|\|f!g|_|r4t!0|\| s4v3d s|_|((3ssf|_|lly
|
STATS_CONF_SAVED = $t4tz0|2 (0|\|f!g|_|r4t!0|\| s4v3d s|_|((3ssf|_|lly
|
||||||
|
@ -22,7 +22,7 @@ BEST_SCORE = Best score
|
|||||||
KILL_S = kill(s)
|
KILL_S = kill(s)
|
||||||
TOTAL = Total
|
TOTAL = Total
|
||||||
SHOT_S = shot(s)
|
SHOT_S = shot(s)
|
||||||
HITS_YOU_IN = %s hit you in
|
HITS_YOU_IN = %s hits you in
|
||||||
KILLED_BY_WITH = Killed by %s with %s @ %0.0fm
|
KILLED_BY_WITH = Killed by %s with %s @ %0.0fm
|
||||||
NO_HITS = no hits
|
NO_HITS = no hits
|
||||||
YOU_NO_KILLER = You have no killer...
|
YOU_NO_KILLER = You have no killer...
|
||||||
|
@ -89,6 +89,7 @@ TELE_MENU = Teleportvalikko
|
|||||||
CUR_LOC = Nykyinen sijainti
|
CUR_LOC = Nykyinen sijainti
|
||||||
SAVE_LOC = Tallenna sijainti
|
SAVE_LOC = Tallenna sijainti
|
||||||
|
|
||||||
|
|
||||||
[ls]
|
[ls]
|
||||||
ADMIN_TELEPORT_1 = l33t s3rv3r 0P: h4x3d %s t0 n3w ISP
|
ADMIN_TELEPORT_1 = l33t s3rv3r 0P: h4x3d %s t0 n3w ISP
|
||||||
ADMIN_TELEPORT_2 = l33t s3rv3r 0P %s: h4x3d %s t0 n3w ISP
|
ADMIN_TELEPORT_2 = l33t s3rv3r 0P %s: h4x3d %s t0 n3w ISP
|
||||||
|
@ -89,9 +89,7 @@ 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]
|
||||||
|
|
||||||
@ -105,9 +103,7 @@ 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_VOTE, "- displays votemap menu")
|
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_MAP, "- 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")
|
||||||
@ -353,7 +353,7 @@ public actionVoteMapMenu(id, key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
keys |= (1<<8)
|
keys |= (1<<8)
|
||||||
len += format(menuBody[len], 511, "^n9. %L^n", id, "NONE")
|
len += format(menuBody[len], 511, "^n9. None^n")
|
||||||
} else {
|
} else {
|
||||||
len = format(menuBody, 511, g_coloredMenus ? "\y%L^n%s?^n\w^n1. %L^n2. %L^n" : "%L^n%s?^n^n1. %L^n2. %L^n", id, "CHANGE_MAP_TO", g_mapName[g_voteSelected[id][0]], id, "YES", id, "NO")
|
len = format(menuBody, 511, g_coloredMenus ? "\y%L^n%s?^n\w^n1. %L^n2. %L^n" : "%L^n%s?^n^n1. %L^n2. %L^n", id, "CHANGE_MAP_TO", g_mapName[g_voteSelected[id][0]], id, "YES", id, "NO")
|
||||||
keys = MENU_KEY_1|MENU_KEY_2
|
keys = MENU_KEY_1|MENU_KEY_2
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user