Compare commits
1 Commits
amxmodx-0.
...
amxmodx-0.
Author | SHA1 | Date | |
---|---|---|---|
3d6bd966ec |
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CCmd.h"
|
#include "CCmd.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CEvent.h"
|
#include "CEvent.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
@ -44,9 +44,6 @@ EventsMngr::ClEvent::ClEvent(CPluginMngr::CPlugin* plugin, int func, int flags)
|
|||||||
m_Func = func;
|
m_Func = func;
|
||||||
|
|
||||||
// flags
|
// flags
|
||||||
m_FlagAlive = true;
|
|
||||||
m_FlagDead = true;
|
|
||||||
|
|
||||||
m_FlagWorld = (flags & 1) ? true : false; // flag a
|
m_FlagWorld = (flags & 1) ? true : false; // flag a
|
||||||
m_FlagPlayer = (flags & 2) ? true : false; // flag b
|
m_FlagPlayer = (flags & 2) ? true : false; // flag b
|
||||||
m_FlagOnce = (flags & 4) ? true : false; // flag c
|
m_FlagOnce = (flags & 4) ? true : false; // flag c
|
||||||
@ -58,54 +55,11 @@ EventsMngr::ClEvent::ClEvent(CPluginMngr::CPlugin* plugin, int func, int flags)
|
|||||||
|
|
||||||
m_Stamp = 0.0f;
|
m_Stamp = 0.0f;
|
||||||
m_Done = false;
|
m_Done = false;
|
||||||
|
|
||||||
m_Conditions = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EventsMngr::ClEvent::~ClEvent()
|
EventsMngr::ClEvent::~ClEvent()
|
||||||
{
|
{
|
||||||
cond_t *tmp1 = m_Conditions;
|
|
||||||
cond_t *tmp2 = NULL;
|
|
||||||
while (tmp1)
|
|
||||||
{
|
|
||||||
tmp2 = tmp1->next;
|
|
||||||
delete tmp1;
|
|
||||||
tmp1 = tmp2;
|
|
||||||
}
|
|
||||||
m_Conditions = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventsMngr::NextParam()
|
|
||||||
{
|
|
||||||
const int INITIAL_PARSEVAULT_SIZE = 32;
|
|
||||||
|
|
||||||
if (m_ParsePos < m_ParseVaultSize)
|
|
||||||
return;
|
|
||||||
|
|
||||||
MsgDataEntry *tmp = NULL;
|
|
||||||
int tmpSize = 0;
|
|
||||||
if (m_ParseVault)
|
|
||||||
{
|
|
||||||
// copy to tmp
|
|
||||||
tmp = new MsgDataEntry[m_ParseVaultSize];
|
|
||||||
memcpy(tmp, m_ParseVault, m_ParseVaultSize * sizeof(MsgDataEntry));
|
|
||||||
tmpSize = m_ParseVaultSize;
|
|
||||||
delete [] m_ParseVault;
|
|
||||||
m_ParseVault = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_ParseVaultSize > 0)
|
|
||||||
m_ParseVaultSize *= 2;
|
|
||||||
else
|
|
||||||
m_ParseVaultSize = INITIAL_PARSEVAULT_SIZE;
|
|
||||||
|
|
||||||
m_ParseVault = new MsgDataEntry[m_ParseVaultSize];
|
|
||||||
if (tmp)
|
|
||||||
{
|
|
||||||
memcpy(m_ParseVault, tmp, tmpSize * sizeof(MsgDataEntry));
|
|
||||||
delete [] tmp;
|
|
||||||
tmp = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int EventsMngr::ClEvent::getFunction()
|
int EventsMngr::ClEvent::getFunction()
|
||||||
@ -115,8 +69,6 @@ int EventsMngr::ClEvent::getFunction()
|
|||||||
|
|
||||||
EventsMngr::EventsMngr()
|
EventsMngr::EventsMngr()
|
||||||
{
|
{
|
||||||
m_ParseVault = NULL;
|
|
||||||
m_ParseVaultSize = 0;
|
|
||||||
clearEvents();
|
clearEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,34 +106,23 @@ void EventsMngr::ClEvent::registerFilter(char *filter)
|
|||||||
if (!*value)
|
if (!*value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cond_t *tmpCond = new cond_t;
|
CondMapPair pair;
|
||||||
if (!tmpCond)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// type character
|
// type character
|
||||||
tmpCond->type = *value;
|
pair.second.type = *value;
|
||||||
|
|
||||||
// set a null here so param id can be recognized, and save it
|
// set a null here so param id can be recognized later
|
||||||
*value++ = 0;
|
*value++ = 0;
|
||||||
tmpCond->paramId = atoi(filter);
|
|
||||||
|
|
||||||
// rest of line
|
// rest of line
|
||||||
tmpCond->sValue.set(value);
|
pair.second.sValue = value;
|
||||||
tmpCond->fValue = atof(value);
|
pair.second.fValue = atof(value);
|
||||||
tmpCond->iValue = atoi(value);
|
pair.second.iValue = atoi(value);
|
||||||
|
|
||||||
tmpCond->next = NULL;
|
// param id
|
||||||
|
pair.first = atoi(filter);
|
||||||
|
|
||||||
if (m_Conditions)
|
m_Conditions.insert(pair);
|
||||||
{
|
|
||||||
cond_t *tmp = m_Conditions;
|
|
||||||
while (tmp->next)
|
|
||||||
tmp = tmp->next;
|
|
||||||
tmp->next = tmpCond;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_Conditions = tmpCond;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EventsMngr::ClEvent* EventsMngr::registerEvent(CPluginMngr::CPlugin* plugin, int func, int flags, int msgid)
|
EventsMngr::ClEvent* EventsMngr::registerEvent(CPluginMngr::CPlugin* plugin, int func, int flags, int msgid)
|
||||||
@ -194,7 +135,7 @@ EventsMngr::ClEvent* EventsMngr::registerEvent(CPluginMngr::CPlugin* plugin, int
|
|||||||
if (!event)
|
if (!event)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
m_Events[msgid].put(event);
|
m_Events[msgid].push_back(event);
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
@ -208,38 +149,37 @@ void EventsMngr::parserInit(int msg_type, float* timer, CPlayer* pPlayer, int in
|
|||||||
m_Timer = timer;
|
m_Timer = timer;
|
||||||
|
|
||||||
// don't parse if nothing to do
|
// don't parse if nothing to do
|
||||||
if (!m_Events[msg_type].size())
|
if (m_Events[msg_type].empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(ClEventVecIter iter = m_Events[msg_type].begin(); iter; ++iter)
|
for(ClEventVecIter iter = m_Events[msg_type].begin(); iter != m_Events[msg_type].end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter).m_Done)
|
if ((*iter)->m_Done)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!(*iter)->m_Plugin->isExecutable((*iter)->m_Func))
|
||||||
if (!(*iter).m_Plugin->isExecutable((*iter).m_Func))
|
|
||||||
{
|
{
|
||||||
(*iter).m_Done = true;
|
(*iter)->m_Done = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
{
|
{
|
||||||
if (!(*iter).m_FlagPlayer || (pPlayer->IsAlive() ? !(*iter).m_FlagAlive : !(*iter).m_FlagDead ) )
|
if (!(*iter)->m_FlagPlayer || (pPlayer->IsAlive() ? !(*iter)->m_FlagAlive : !(*iter)->m_FlagDead ) )
|
||||||
{
|
{
|
||||||
(*iter).m_Done = true;
|
(*iter)->m_Done = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(*iter).m_FlagWorld)
|
else if (!(*iter)->m_FlagWorld)
|
||||||
{
|
{
|
||||||
(*iter).m_Done = true;
|
(*iter)->m_Done = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*iter).m_FlagOnce && (*iter).m_Stamp == (float)(*timer))
|
if ((*iter)->m_FlagOnce && (*iter)->m_Stamp == (float)(*timer))
|
||||||
{
|
{
|
||||||
(*iter).m_Done = true;
|
(*iter)->m_Done = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
m_ParseNotDone = true;
|
m_ParseNotDone = true;
|
||||||
@ -247,10 +187,15 @@ void EventsMngr::parserInit(int msg_type, float* timer, CPlayer* pPlayer, int in
|
|||||||
|
|
||||||
if (m_ParseNotDone)
|
if (m_ParseNotDone)
|
||||||
{
|
{
|
||||||
|
// we don't clear it (performance)
|
||||||
|
if (m_ParseVault.size() < 1)
|
||||||
|
{
|
||||||
|
m_ParseVault.reserve(32); // 32 as default
|
||||||
|
m_ParseVault.push_back(MsgDataVault());
|
||||||
|
}
|
||||||
m_ParsePos = 0;
|
m_ParsePos = 0;
|
||||||
NextParam();
|
m_ParseVault[m_ParsePos].type = MSG_INTEGER;
|
||||||
m_ParseVault[0].type = MSG_INTEGER;
|
m_ParseVault[m_ParsePos].iValue = index;
|
||||||
m_ParseVault[0].iValue = index;
|
|
||||||
}
|
}
|
||||||
m_ParseFun = &m_Events[msg_type];
|
m_ParseFun = &m_Events[msg_type];
|
||||||
}
|
}
|
||||||
@ -261,43 +206,45 @@ void EventsMngr::parseValue(int iValue)
|
|||||||
if (!m_ParseNotDone || !m_ParseFun)
|
if (!m_ParseNotDone || !m_ParseFun)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
// grow if needed
|
// grow if needed
|
||||||
++m_ParsePos;
|
if (m_ParseVault.size() <= static_cast<size_t>(++m_ParsePos))
|
||||||
NextParam();
|
{
|
||||||
|
MsgDataVault tmp;
|
||||||
|
m_ParseVault.push_back(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
m_ParseVault[m_ParsePos].type = MSG_INTEGER;
|
m_ParseVault[m_ParsePos].type = MSG_INTEGER;
|
||||||
m_ParseVault[m_ParsePos].iValue = iValue;
|
m_ParseVault[m_ParsePos].iValue = iValue;
|
||||||
|
|
||||||
// loop through the registered funcs, and decide whether they have to be called or not
|
// loop through the registered funcs, and decide whether they have to be called
|
||||||
// if they shouldnt, their m_Done is set to true
|
bool skip;
|
||||||
for (ClEventVecIter iter = m_ParseFun->begin(); iter; ++iter)
|
for (ClEventVecIter iter = m_ParseFun->begin(); iter != m_ParseFun->end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter).m_Done)
|
if ((*iter)->m_Done)
|
||||||
continue; // already skipped; don't bother with parsing
|
continue;
|
||||||
|
|
||||||
// loop through conditions
|
skip = false;
|
||||||
bool execute = false;
|
ClEvent::CondMapIter condIter = (*iter)->m_Conditions.find(m_ParsePos);
|
||||||
bool anyConditions = false;
|
if (condIter == (*iter)->m_Conditions.end())
|
||||||
for (ClEvent::cond_t *condIter = (*iter).m_Conditions; condIter; condIter = condIter->next)
|
continue;
|
||||||
|
|
||||||
|
do
|
||||||
{
|
{
|
||||||
if (condIter->paramId == m_ParsePos)
|
switch(condIter->second.type)
|
||||||
{
|
{
|
||||||
anyConditions = true;
|
case '=': if (condIter->second.iValue == iValue) skip=true; break;
|
||||||
switch(condIter->type)
|
case '!': if (condIter->second.iValue != iValue) skip=true; break;
|
||||||
{
|
case '&': if (iValue & condIter->second.iValue) skip=true; break;
|
||||||
case '=': if (condIter->iValue == iValue) execute=true; break;
|
case '<': if (iValue < condIter->second.iValue) skip=true; break;
|
||||||
case '!': if (condIter->iValue != iValue) execute=true; break;
|
case '>': if (iValue > condIter->second.iValue) skip=true; break;
|
||||||
case '&': if (iValue & condIter->iValue) execute=true; break;
|
|
||||||
case '<': if (iValue < condIter->iValue) execute=true; break;
|
|
||||||
case '>': if (iValue > condIter->iValue) execute=true; break;
|
|
||||||
}
|
}
|
||||||
if (execute)
|
if (skip)
|
||||||
break;
|
break;
|
||||||
}
|
} while ( ++condIter != (*iter)->m_Conditions.end() );
|
||||||
}
|
|
||||||
if (anyConditions && !execute)
|
if (skip)
|
||||||
(*iter).m_Done = true; // don't execute
|
continue;
|
||||||
|
(*iter)->m_Done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,42 +254,44 @@ void EventsMngr::parseValue(float fValue)
|
|||||||
if (!m_ParseNotDone || !m_ParseFun)
|
if (!m_ParseNotDone || !m_ParseFun)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
// grow if needed
|
// grow if needed
|
||||||
++m_ParsePos;
|
if (m_ParseVault.size() <= static_cast<size_t>(++m_ParsePos))
|
||||||
NextParam();
|
{
|
||||||
|
MsgDataVault tmp;
|
||||||
|
m_ParseVault.push_back(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
m_ParseVault[m_ParsePos].type = MSG_FLOAT;
|
m_ParseVault[m_ParsePos].type = MSG_FLOAT;
|
||||||
m_ParseVault[m_ParsePos].fValue = fValue;
|
m_ParseVault[m_ParsePos].fValue = fValue;
|
||||||
|
|
||||||
// loop through the registered funcs, and decide whether they have to be called or not
|
// loop through the registered funcs, and decide whether they have to be called
|
||||||
// if they shouldnt, their m_Done is set to true
|
bool skip;
|
||||||
for (ClEventVecIter iter = m_ParseFun->begin(); iter; ++iter)
|
for (ClEventVecIter iter = m_ParseFun->begin(); iter != m_ParseFun->end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter).m_Done)
|
if ((*iter)->m_Done)
|
||||||
continue; // already skipped; don't bother with parsing
|
continue;
|
||||||
|
|
||||||
// loop through conditions
|
skip = false;
|
||||||
bool execute = false;
|
ClEvent::CondMapIter condIter = (*iter)->m_Conditions.find(m_ParsePos);
|
||||||
bool anyConditions = false;
|
if (condIter == (*iter)->m_Conditions.end())
|
||||||
for (ClEvent::cond_t *condIter = (*iter).m_Conditions; condIter; condIter = condIter->next)
|
continue;
|
||||||
|
|
||||||
|
do
|
||||||
{
|
{
|
||||||
if (condIter->paramId == m_ParsePos)
|
switch(condIter->second.type)
|
||||||
{
|
{
|
||||||
anyConditions = true;
|
case '=': if (condIter->second.fValue == fValue) skip=true; break;
|
||||||
switch(condIter->type)
|
case '!': if (condIter->second.fValue != fValue) skip=true; break;
|
||||||
{
|
case '<': if (fValue < condIter->second.fValue) skip=true; break;
|
||||||
case '=': if (condIter->fValue == fValue) execute=true; break;
|
case '>': if (fValue > condIter->second.fValue) skip=true; break;
|
||||||
case '!': if (condIter->fValue != fValue) execute=true; break;
|
|
||||||
case '<': if (fValue < condIter->fValue) execute=true; break;
|
|
||||||
case '>': if (fValue > condIter->fValue) execute=true; break;
|
|
||||||
}
|
}
|
||||||
if (execute)
|
if (skip)
|
||||||
break;
|
break;
|
||||||
}
|
} while ( ++condIter != (*iter)->m_Conditions.end() );
|
||||||
}
|
|
||||||
if (anyConditions && !execute)
|
if (skip)
|
||||||
(*iter).m_Done = true; // don't execute
|
continue;
|
||||||
|
(*iter)->m_Done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,39 +302,42 @@ void EventsMngr::parseValue(const char *sz)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// grow if needed
|
// grow if needed
|
||||||
++m_ParsePos;
|
if (m_ParseVault.size() <= static_cast<size_t>(++m_ParsePos))
|
||||||
NextParam();
|
{
|
||||||
|
MsgDataVault tmp;
|
||||||
|
m_ParseVault.push_back(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
m_ParseVault[m_ParsePos].type = MSG_STRING;
|
m_ParseVault[m_ParsePos].type = MSG_STRING;
|
||||||
m_ParseVault[m_ParsePos].sValue = sz;
|
m_ParseVault[m_ParsePos].sValue = sz;
|
||||||
|
|
||||||
// loop through the registered funcs, and decide whether they have to be called or not
|
// loop through the registered funcs, and decide whether they have to be called
|
||||||
// if they shouldnt, their m_Done is set to true
|
bool skip;
|
||||||
for (ClEventVecIter iter = m_ParseFun->begin(); iter; ++iter)
|
for (ClEventVecIter iter = m_ParseFun->begin(); iter != m_ParseFun->end(); ++iter)
|
||||||
{
|
{
|
||||||
if ((*iter).m_Done)
|
if ((*iter)->m_Done)
|
||||||
continue; // already skipped; don't bother with parsing
|
continue;
|
||||||
|
|
||||||
// loop through conditions
|
skip = false;
|
||||||
bool execute = false;
|
ClEvent::CondMapIter condIter = (*iter)->m_Conditions.find(m_ParsePos);
|
||||||
bool anyConditions = false;
|
if (condIter == (*iter)->m_Conditions.end())
|
||||||
for (ClEvent::cond_t *condIter = (*iter).m_Conditions; condIter; condIter = condIter->next)
|
continue;
|
||||||
|
|
||||||
|
do
|
||||||
{
|
{
|
||||||
if (condIter->paramId == m_ParsePos)
|
switch(condIter->second.type)
|
||||||
{
|
{
|
||||||
anyConditions = true;
|
case '=': if (!strcmp(sz, condIter->second.sValue.c_str())) skip=true; break;
|
||||||
switch(condIter->type)
|
case '!': if (!strstr(sz, condIter->second.sValue.c_str())) skip=true; break;
|
||||||
{
|
case '&': if (strstr(sz, condIter->second.sValue.c_str())) skip=true; break;
|
||||||
case '=': if (!strcmp(sz, condIter->sValue.str())) execute=true; break;
|
|
||||||
case '!': if (strcmp(sz, condIter->sValue.str())) execute=true; break;
|
|
||||||
case '&': if (strstr(sz, condIter->sValue.str())) execute=true; break;
|
|
||||||
}
|
}
|
||||||
if (execute)
|
if (skip)
|
||||||
break;
|
break;
|
||||||
}
|
} while ( ++condIter != (*iter)->m_Conditions.end() );
|
||||||
}
|
|
||||||
if (anyConditions && !execute)
|
if (skip)
|
||||||
(*iter).m_Done = true; // don't execute
|
continue;
|
||||||
|
(*iter)->m_Done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,20 +354,20 @@ void EventsMngr::executeEvents()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
#endif // #ifdef ENABLEEXEPTIONS
|
#endif // #ifdef ENABLEEXEPTIONS
|
||||||
for (ClEventVecIter iter = m_ParseFun->begin(); iter; ++iter)
|
for (ClEventVecIter iter = m_ParseFun->begin(); iter != m_ParseFun->end(); ++iter)
|
||||||
{
|
{
|
||||||
if ( (*iter).m_Done )
|
if ( (*iter)->m_Done )
|
||||||
{
|
{
|
||||||
(*iter).m_Done = false;
|
(*iter)->m_Done = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*iter).m_Stamp = (float)*m_Timer;
|
(*iter)->m_Stamp = *m_Timer;
|
||||||
|
|
||||||
if ((err = amx_Exec((*iter).m_Plugin->getAMX(), NULL, (*iter).m_Func, 1, m_ParseVault ? m_ParseVault[0].iValue : 0)) != AMX_ERR_NONE)
|
if ((err = amx_Exec((*iter)->m_Plugin->getAMX(), NULL, (*iter)->m_Func, 1, m_ParseVault.size() ? m_ParseVault[0].iValue : 0)) != AMX_ERR_NONE)
|
||||||
{
|
{
|
||||||
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,
|
UTIL_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err,
|
||||||
(*iter).m_Plugin->getAMX()->curline, (*iter).m_Plugin->getName());
|
(*iter)->m_Plugin->getAMX()->curline, (*iter)->m_Plugin->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,8 +378,6 @@ void EventsMngr::executeEvents()
|
|||||||
UTIL_Log( "[AMXX] fatal error at event execution");
|
UTIL_Log( "[AMXX] fatal error at event execution");
|
||||||
}
|
}
|
||||||
#endif // #ifdef ENABLEEXEPTIONS
|
#endif // #ifdef ENABLEEXEPTIONS
|
||||||
|
|
||||||
m_ParseFun = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int EventsMngr::getArgNum()
|
int EventsMngr::getArgNum()
|
||||||
@ -491,14 +441,12 @@ void EventsMngr::clearEvents(void)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_AMX_REG_MSG; ++i)
|
for (int i = 0; i < MAX_AMX_REG_MSG; ++i)
|
||||||
{
|
{
|
||||||
m_Events[i].clear();
|
for (ClEventVecIter iter = m_Events[i].begin(); iter != m_Events[i].end(); ++iter)
|
||||||
}
|
|
||||||
// delete parsevault
|
|
||||||
if (m_ParseVault)
|
|
||||||
{
|
{
|
||||||
delete [] m_ParseVault;
|
if (*iter)
|
||||||
m_ParseVault = NULL;
|
delete *iter;
|
||||||
m_ParseVaultSize = 0;
|
}
|
||||||
|
m_Events[i].clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
#ifndef __CEVENTS_H__
|
#ifndef __CEVENTS_H__
|
||||||
#define __CEVENTS_H__
|
#define __CEVENTS_H__
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#define MAX_AMX_REG_MSG MAX_REG_MSGS+16
|
#define MAX_AMX_REG_MSG MAX_REG_MSGS+16
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -86,48 +90,46 @@ public:
|
|||||||
// conditions
|
// conditions
|
||||||
struct cond_t
|
struct cond_t
|
||||||
{
|
{
|
||||||
int paramId; // the message parameter id
|
std::string sValue; // value
|
||||||
|
float fValue;
|
||||||
String sValue; // value (string)
|
int iValue;
|
||||||
float fValue; // value (float)
|
int type;
|
||||||
int iValue; // value (int)
|
|
||||||
int type; // type (can be int, float, string)
|
|
||||||
|
|
||||||
cond_t *next;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cond_t *m_Conditions;
|
typedef std::pair<int, cond_t> CondMapPair;
|
||||||
|
typedef std::map<int, cond_t> CondMap;
|
||||||
|
typedef CondMap::iterator CondMapIter;
|
||||||
|
|
||||||
|
CondMap m_Conditions;
|
||||||
|
|
||||||
public:
|
|
||||||
// constructors & destructors
|
// constructors & destructors
|
||||||
ClEvent(CPluginMngr::CPlugin* plugin, int func, int flags);
|
ClEvent(CPluginMngr::CPlugin* plugin, int func, int flags);
|
||||||
~ClEvent();
|
~ClEvent();
|
||||||
|
public:
|
||||||
inline CPluginMngr::CPlugin* getPlugin();
|
inline CPluginMngr::CPlugin* getPlugin();
|
||||||
inline int getFunction();
|
inline int getFunction();
|
||||||
void registerFilter(char* filter); // add a condition
|
void registerFilter(char* filter); // add a condition
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct MsgDataEntry
|
struct MsgDataVault
|
||||||
{
|
{
|
||||||
float fValue;
|
float fValue;
|
||||||
int iValue;
|
int iValue;
|
||||||
const char* sValue;
|
const char* sValue;
|
||||||
MsgParamType type;
|
MsgParamType type;
|
||||||
};
|
};
|
||||||
MsgDataEntry *m_ParseVault;
|
typedef std::vector<MsgDataVault> MsgDataVaultVec;
|
||||||
int m_ParseVaultSize;
|
typedef MsgDataVaultVec::iterator MsgDataVaultVecIter;
|
||||||
void NextParam(); // make sure a new parameter can be added
|
MsgDataVaultVec m_ParseVault;
|
||||||
|
|
||||||
typedef CList<ClEvent> ClEventVec;
|
typedef std::vector<ClEvent*> ClEventVec;
|
||||||
typedef ClEventVec::iterator ClEventVecIter;
|
typedef ClEventVec::iterator ClEventVecIter;
|
||||||
|
|
||||||
ClEventVec m_Events[MAX_AMX_REG_MSG];
|
ClEventVec m_Events[MAX_AMX_REG_MSG];
|
||||||
ClEventVec *m_ParseFun; // current Event vector
|
ClEventVec *m_ParseFun; // current Event vector
|
||||||
|
|
||||||
bool m_ParseNotDone;
|
bool m_ParseNotDone;
|
||||||
int m_ParsePos; // is args. num. - 1
|
int m_ParsePos; // is -1 less then args. num.
|
||||||
float* m_Timer;
|
float* m_Timer;
|
||||||
|
|
||||||
ClEvent* getValidEvent(ClEvent* a );
|
ClEvent* getValidEvent(ClEvent* a );
|
||||||
|
@ -94,7 +94,6 @@ File& operator>>( File& f, char* n )
|
|||||||
int File::getline( char* buf, int sz )
|
int File::getline( char* buf, int sz )
|
||||||
{
|
{
|
||||||
int a = sz;
|
int a = sz;
|
||||||
char *origBuf = buf;
|
|
||||||
if ( *this )
|
if ( *this )
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
@ -102,15 +101,6 @@ int File::getline( char* buf, int sz )
|
|||||||
*buf++ = c;
|
*buf++ = c;
|
||||||
*buf = 0;
|
*buf = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// trim 0x0a and 0x0d characters at the end
|
|
||||||
while (buf != origBuf)
|
|
||||||
{
|
|
||||||
if (*buf == 0x0a || *buf == 0x0d)
|
|
||||||
*buf = 0;
|
|
||||||
--buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
return a - sz;
|
return a - sz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CForward.h"
|
#include "CForward.h"
|
||||||
|
|
||||||
void CForwardMngr::registerForward( CPluginMngr::CPlugin* p, int func , int type ){
|
void CForwardMngr::registerForward( CPluginMngr::CPlugin* p, int func , int type ){
|
||||||
|
@ -51,28 +51,21 @@ public:
|
|||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
CListEle *head;
|
CListEle *head;
|
||||||
|
int cur_size;
|
||||||
public:
|
public:
|
||||||
CList<T,F>() { head = 0; }
|
CList<T,F>() { head = 0; cur_size = 0; }
|
||||||
~CList<T,F>() { clear(); }
|
~CList<T,F>() { clear(); }
|
||||||
void clear() {
|
void clear() {
|
||||||
iterator a = begin();
|
iterator a = begin();
|
||||||
while( a ) a.remove();
|
while( a ) a.remove();
|
||||||
}
|
cur_size = 0;
|
||||||
bool empty() {
|
|
||||||
return (head ? false : true);
|
|
||||||
}
|
}
|
||||||
void put( T* a ) {
|
void put( T* a ) {
|
||||||
head = new CListEle( a , head );
|
head = new CListEle( a , head );
|
||||||
|
++cur_size;
|
||||||
}
|
}
|
||||||
int size() {
|
int size() {
|
||||||
CListEle *p = head;
|
return cur_size;
|
||||||
int i = 0;
|
|
||||||
while (p)
|
|
||||||
{
|
|
||||||
p = p->next;
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
}
|
||||||
class iterator {
|
class iterator {
|
||||||
CListEle** a;
|
CListEle** a;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CLogEvent.h"
|
#include "CLogEvent.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CMenu.h"
|
#include "CMenu.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
// *****************************************************
|
// *****************************************************
|
||||||
// class CPlayer
|
// class CPlayer
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
#ifndef FAR // PM: Test: FAR
|
#ifndef FAR // PM: Test: FAR
|
||||||
#define FAR
|
#define FAR
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CPlugin.h"
|
#include "CPlugin.h"
|
||||||
#include "CForward.h"
|
#include "CForward.h"
|
||||||
#include "CFile.h"
|
#include "CFile.h"
|
||||||
@ -62,7 +62,7 @@ int CPluginMngr::loadPluginsFromFile( const char* filename )
|
|||||||
|
|
||||||
// Find now folder
|
// Find now folder
|
||||||
char pluginName[256], line[256], error[256];
|
char pluginName[256], line[256], error[256];
|
||||||
const char *pluginsDir = get_localinfo("amxx_pluginsdir", "addons/amxx/plugins");
|
const char pluginsDir[] = "addons/amxx/plugins"; // hardcoded; :TODO: make it localinfo
|
||||||
|
|
||||||
|
|
||||||
while ( fp.getline(line , 255 ) )
|
while ( fp.getline(line , 255 ) )
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "CTask.h"
|
#include "CTask.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
MODNAME = amxx_mm
|
MODNAME = amx_mm
|
||||||
SRCFILES = meta_api.cpp CFile.cpp CString.cpp CVault.cpp vault.cpp\
|
SRCFILES = meta_api.cpp CFile.cpp CString.cpp CVault.cpp vault.cpp\
|
||||||
float.cpp file.cpp modules.cpp CMisc.cpp CTask.cpp string.cpp\
|
float.cpp file.cpp modules.cpp CMisc.cpp CTask.cpp string.cpp\
|
||||||
amxmodx.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp srvcmd.cpp strptime.cpp\
|
amxmod.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp srvcmd.cpp strptime.cpp\
|
||||||
CForward.cpp CPlugin.cpp CModule.cpp CMenu.cpp emsg.cpp util.cpp
|
CForward.cpp CPlugin.cpp CModule.cpp CMenu.cpp emsg.cpp util.cpp
|
||||||
CSRCFILES = amx.c amxcore.c amxtime.c power.c
|
CSRCFILES = amx.c amxcore.c amxtime.c power.c
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ else
|
|||||||
OS=LINUX
|
OS=LINUX
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC_LINUX=gcc-2.95
|
CC_LINUX=gcc
|
||||||
ifeq "$(OS)" "WIN32"
|
ifeq "$(OS)" "WIN32"
|
||||||
CC_WIN32=gcc
|
CC_WIN32=gcc
|
||||||
LD_WINDLL=dllwrap
|
LD_WINDLL=dllwrap
|
||||||
@ -61,7 +61,7 @@ OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
|||||||
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
|
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
|
||||||
|
|
||||||
|
|
||||||
CCOPT = -O2 -march=i586 -ffast-math -funroll-loops \
|
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
||||||
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG
|
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
|
|||||||
|
|
||||||
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
||||||
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
||||||
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -lstdc++ -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
||||||
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
||||||
|
|
||||||
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c
|
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
* including commercial applications, and to alter it and redistribute it
|
* including commercial applications, and to alter it and redistribute it
|
||||||
* freely, subject to the following restrictions:
|
* freely, subject to the following restrictions:
|
||||||
*
|
*
|
||||||
|
* PM: Whole file changed
|
||||||
*/
|
*/
|
||||||
#if defined __linux__
|
#define LINUX
|
||||||
|
#if defined LINUX
|
||||||
#include <sclinux.h>
|
#include <sclinux.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef __AMX_H
|
#ifndef __AMX_H
|
||||||
@ -20,7 +22,7 @@
|
|||||||
/* The ISO C99 defines the int16_t and int_32t types. If the compiler got
|
/* The ISO C99 defines the int16_t and int_32t types. If the compiler got
|
||||||
* here, these types are probably undefined.
|
* here, these types are probably undefined.
|
||||||
*/
|
*/
|
||||||
#if defined __LCC__ || defined __linux__
|
#if defined __LCC__ || defined LINUX
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
#else
|
||||||
typedef short int int16_t;
|
typedef short int int16_t;
|
||||||
@ -107,7 +109,7 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx);
|
|||||||
#define PACKED
|
#define PACKED
|
||||||
#endif
|
#endif
|
||||||
#if !defined AMX_NO_ALIGN
|
#if !defined AMX_NO_ALIGN
|
||||||
#if defined __linux__
|
#if defined LINUX
|
||||||
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
#pragma pack(1) /* structures must be packed (byte-aligned) */
|
||||||
#else
|
#else
|
||||||
#pragma pack(push)
|
#pragma pack(push)
|
||||||
@ -296,7 +298,7 @@ int AMXAPI amx_SetUserData(AMX *amx, long tag, void *ptr);
|
|||||||
char * AMXAPI amx_StrError(int errnum);
|
char * AMXAPI amx_StrError(int errnum);
|
||||||
int AMXAPI amx_StrLen(cell *cstring, int *length);
|
int AMXAPI amx_StrLen(cell *cstring, int *length);
|
||||||
#if !defined AMX_NO_ALIGN
|
#if !defined AMX_NO_ALIGN
|
||||||
#if defined __linux__
|
#if defined LINUX
|
||||||
#pragma pack() /* reset default packing */
|
#pragma pack() /* reset default packing */
|
||||||
#else
|
#else
|
||||||
#pragma pack(pop) /* reset previous packing */
|
#pragma pack(pop) /* reset previous packing */
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "amxmod.h"
|
#include "amxmod.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_xvar_id(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
@ -401,6 +401,11 @@ static cell AMX_NATIVE_CALL get_user_userid(AMX *amx, cell *params) /* 1 param *
|
|||||||
return pPlayer->initialized ? GETPLAYERUSERID(pPlayer->pEdict) : -1;
|
return pPlayer->initialized ? GETPLAYERUSERID(pPlayer->pEdict) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cell AMX_NATIVE_CALL get_user_wonid(AMX *amx, cell *params) //1 param
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_user_authid(AMX *amx, cell *params) /* 3 param */
|
static cell AMX_NATIVE_CALL get_user_authid(AMX *amx, cell *params) /* 3 param */
|
||||||
{
|
{
|
||||||
@ -1014,95 +1019,6 @@ static cell AMX_NATIVE_CALL set_cvar_string(AMX *amx, cell *params) /* 2 param *
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL message_begin(AMX *amx, cell *params) /* 4 param */
|
|
||||||
{
|
|
||||||
int numparam = *params/sizeof(cell);
|
|
||||||
Vector vecOrigin;
|
|
||||||
cell *cpOrigin;
|
|
||||||
switch (params[1]){
|
|
||||||
case MSG_BROADCAST:
|
|
||||||
case MSG_ALL:
|
|
||||||
case MSG_SPEC:
|
|
||||||
MESSAGE_BEGIN( params[1], params[2],NULL );
|
|
||||||
break;
|
|
||||||
case MSG_PVS: case MSG_PAS:
|
|
||||||
if (numparam < 3) {
|
|
||||||
amx_RaiseError(amx,AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cpOrigin = get_amxaddr(amx,params[3]);
|
|
||||||
vecOrigin.x = *cpOrigin;
|
|
||||||
vecOrigin.y = *(cpOrigin+1);
|
|
||||||
vecOrigin.z = *(cpOrigin+2);
|
|
||||||
MESSAGE_BEGIN( params[1], params[2] , vecOrigin );
|
|
||||||
break;
|
|
||||||
case MSG_ONE:
|
|
||||||
if (numparam < 4) {
|
|
||||||
amx_RaiseError(amx,AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
MESSAGE_BEGIN( MSG_ONE, params[2], NULL, INDEXENT(params[4]) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL message_end(AMX *amx, cell *params)
|
|
||||||
{
|
|
||||||
MESSAGE_END();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_byte(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_BYTE( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_char(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_CHAR( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_short(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_SHORT( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_long(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_LONG( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_entity(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_ENTITY( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_angle(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_ANGLE( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_coord(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
WRITE_COORD( params[1] );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL write_string(AMX *amx, cell *params) /* 1 param */
|
|
||||||
{
|
|
||||||
int a;
|
|
||||||
WRITE_STRING( get_amxstring(amx,params[1],3,a) );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL log_message(AMX *amx, cell *params) /* 1 param */
|
static cell AMX_NATIVE_CALL log_message(AMX *amx, cell *params) /* 1 param */
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@ -2093,45 +2009,22 @@ static cell AMX_NATIVE_CALL get_modulesnum(AMX *amx, cell *params)
|
|||||||
return static_cast<cell>(g_modules.size());
|
return static_cast<cell>(g_modules.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
// native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status);
|
// native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen);
|
||||||
static cell AMX_NATIVE_CALL get_module(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL get_module(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
CList<CModule>::iterator moduleIter;
|
CList<CModule>::iterator moduleIter;
|
||||||
|
|
||||||
// find the module
|
|
||||||
int i = params[1];
|
int i = params[1];
|
||||||
for (moduleIter = g_modules.begin(); moduleIter && i; ++moduleIter)
|
for (moduleIter = g_modules.begin(); moduleIter && i; ++moduleIter)
|
||||||
--i;
|
--i;
|
||||||
|
|
||||||
if (i != 0 || !moduleIter)
|
if (i != 0 || !moduleIter)
|
||||||
return -1; // not found
|
return -1;
|
||||||
|
|
||||||
// set name, author, version
|
|
||||||
module_info_s *info = (*moduleIter).getInfo();
|
module_info_s *info = (*moduleIter).getInfo();
|
||||||
set_amxstring(amx, params[2], info->name, params[3]);
|
set_amxstring(amx, params[2], info->name, params[3]);
|
||||||
set_amxstring(amx, params[4], info->author, params[5]);
|
set_amxstring(amx, params[4], info->author, params[5]);
|
||||||
set_amxstring(amx, params[6], info->version, params[7]);
|
set_amxstring(amx, params[6], info->version, params[7]);
|
||||||
|
|
||||||
// compatibility problem possible
|
|
||||||
int numParams = params[0] / sizeof(cell);
|
|
||||||
if (numParams < 8)
|
|
||||||
{
|
|
||||||
CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx);
|
|
||||||
UTIL_Log("[AMXX] get_module: call to a previous version (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
|
|
||||||
amx_RaiseError(amx, AMX_ERR_NATIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set status
|
|
||||||
cell *addr;
|
|
||||||
if (amx_GetAddr(amx, params[8], &addr) != AMX_ERR_NONE)
|
|
||||||
{
|
|
||||||
CPluginMngr::CPlugin *curPlugin = g_plugins.findPluginFast(amx);
|
|
||||||
UTIL_Log("[AMXX] get_module: invalid reference (plugin \"%s\", line %d)", curPlugin->getName(), amx->curline);
|
|
||||||
amx_RaiseError(amx, AMX_ERR_NATIVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
*addr = (cell)(*moduleIter).getStatusValue();
|
|
||||||
|
|
||||||
return params[1];
|
return params[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2140,7 +2033,6 @@ static cell AMX_NATIVE_CALL log_amx(AMX *amx, cell *params)
|
|||||||
{
|
{
|
||||||
CPluginMngr::CPlugin *plugin = g_plugins.findPluginFast(amx);
|
CPluginMngr::CPlugin *plugin = g_plugins.findPluginFast(amx);
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
UTIL_Log("[%s] %s", plugin->getName(), format_amxstring(amx, params, 1, len));
|
UTIL_Log("[%s] %s", plugin->getName(), format_amxstring(amx, params, 1, len));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2469,6 +2361,7 @@ AMX_NATIVE_INFO amxmod_Natives[] = {
|
|||||||
{ "get_user_userid", get_user_userid },
|
{ "get_user_userid", get_user_userid },
|
||||||
{ "get_user_weapon", get_user_weapon},
|
{ "get_user_weapon", get_user_weapon},
|
||||||
{ "get_user_weapons", get_user_weapons},
|
{ "get_user_weapons", get_user_weapons},
|
||||||
|
{ "get_user_wonid", get_user_wonid},
|
||||||
{ "get_weaponname", get_weaponname},
|
{ "get_weaponname", get_weaponname},
|
||||||
{ "get_xvar_float", get_xvar_num },
|
{ "get_xvar_float", get_xvar_num },
|
||||||
{ "get_xvar_id", get_xvar_id },
|
{ "get_xvar_id", get_xvar_id },
|
||||||
@ -2548,15 +2441,5 @@ AMX_NATIVE_INFO amxmod_Natives[] = {
|
|||||||
{ "callfunc_push_float", callfunc_push_byval },
|
{ "callfunc_push_float", callfunc_push_byval },
|
||||||
{ "callfunc_push_intrf", callfunc_push_byref },
|
{ "callfunc_push_intrf", callfunc_push_byref },
|
||||||
{ "callfunc_push_floatrf", callfunc_push_byref },
|
{ "callfunc_push_floatrf", callfunc_push_byref },
|
||||||
{ "message_begin", message_begin },
|
|
||||||
{ "message_end", message_end },
|
|
||||||
{ "write_angle", write_angle },
|
|
||||||
{ "write_byte", write_byte },
|
|
||||||
{ "write_char", write_char },
|
|
||||||
{ "write_coord", write_coord },
|
|
||||||
{ "write_entity", write_entity },
|
|
||||||
{ "write_long", write_long },
|
|
||||||
{ "write_short", write_short },
|
|
||||||
{ "write_string", write_string },
|
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "CMenu.h"
|
#include "CMenu.h"
|
||||||
#include "CEvent.h"
|
#include "CEvent.h"
|
||||||
|
|
||||||
#define AMX_VERSION "0.15"
|
#define AMX_VERSION "0.1"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
2562
amxmodx/amxmodx.cpp
2562
amxmodx/amxmodx.cpp
File diff suppressed because it is too large
Load Diff
@ -1,247 +0,0 @@
|
|||||||
/* AMX Mod X
|
|
||||||
*
|
|
||||||
* by the AMX Mod X Development Team
|
|
||||||
* originally developed by OLO
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the
|
|
||||||
* Free Software Foundation; either version 2 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
|
||||||
* In addition, as a special exception, the author gives permission to
|
|
||||||
* link the code of this program with the Half-Life Game Engine ("HL
|
|
||||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
|
||||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
|
||||||
* respects for all of the code used other than the HL Engine and MODs
|
|
||||||
* from Valve. If you modify this file, you may extend this exception
|
|
||||||
* to your version of the file, but you are not obligated to do so. If
|
|
||||||
* you do not wish to do so, delete this exception statement from your
|
|
||||||
* version.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AMXMODX_H
|
|
||||||
#define AMXMODX_H
|
|
||||||
|
|
||||||
#include "modules.h"
|
|
||||||
#include "CString.h"
|
|
||||||
#include "CList.h"
|
|
||||||
#include "CPlugin.h"
|
|
||||||
#include "CMisc.h"
|
|
||||||
#include "CVault.h"
|
|
||||||
#include "CModule.h"
|
|
||||||
#include "CTask.h"
|
|
||||||
#include "CLogEvent.h"
|
|
||||||
#include "CForward.h"
|
|
||||||
#include "CCmd.h"
|
|
||||||
#include "CMenu.h"
|
|
||||||
#include "CEvent.h"
|
|
||||||
|
|
||||||
#define AMX_VERSION "0.16"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
extern AMX_NATIVE_INFO core_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO time_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO power_Natives[];
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
extern AMX_NATIVE_INFO amxmod_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO file_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO float_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO string_Natives[];
|
|
||||||
extern AMX_NATIVE_INFO vault_Natives[];
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
#define DLLOAD(path) (DLHANDLE)LoadLibrary(path);
|
|
||||||
#define DLPROC(m,func) GetProcAddress(m,func);
|
|
||||||
#define DLFREE(m) FreeLibrary(m);
|
|
||||||
#else
|
|
||||||
#define DLLOAD(path) (DLHANDLE)dlopen(path, RTLD_NOW);
|
|
||||||
#define DLPROC(m,func) dlsym(m,func);
|
|
||||||
#define DLFREE(m) dlclose(m);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
typedef HINSTANCE DLHANDLE;
|
|
||||||
#else
|
|
||||||
typedef void* DLHANDLE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GETPLAYERAUTHID
|
|
||||||
#define GETPLAYERAUTHID (*g_engfuncs.pfnGetPlayerAuthId)
|
|
||||||
#endif
|
|
||||||
#define ANGLEVECTORS (*g_engfuncs.pfnAngleVectors)
|
|
||||||
#define CLIENT_PRINT (*g_engfuncs.pfnClientPrintf)
|
|
||||||
#define CVAR_DIRECTSET (*g_engfuncs.pfnCvar_DirectSet)
|
|
||||||
#define GETCLIENTLISTENING (*g_engfuncs.pfnVoice_GetClientListening)
|
|
||||||
#define RUNPLAYERMOVE (*g_engfuncs.pfnRunPlayerMove)
|
|
||||||
#define SETCLIENTLISTENING (*g_engfuncs.pfnVoice_SetClientListening)
|
|
||||||
#define SETCLIENTMAXSPEED (*g_engfuncs.pfnSetClientMaxspeed)
|
|
||||||
|
|
||||||
char* UTIL_SplitHudMessage(register const char *src);
|
|
||||||
int UTIL_ReadFlags(const char* c);
|
|
||||||
void UTIL_ClientPrint( edict_t *pEntity, int msg_dest, char *msg );
|
|
||||||
void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1 = NULL, const char *arg2 = NULL);
|
|
||||||
void UTIL_GetFlags(char* flags,int flag);
|
|
||||||
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, char *pMessage);
|
|
||||||
void UTIL_IntToString(int value, char *output);
|
|
||||||
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name);
|
|
||||||
void UTIL_ShowMenu( edict_t* pEntity, int slots, int time, char *menu, int mlen );
|
|
||||||
void UTIL_MakeNewLogFile();
|
|
||||||
void UTIL_Log(const char *fmt, ...);
|
|
||||||
|
|
||||||
#define UTIL_MODULES_RUNNING 0
|
|
||||||
#define UTIL_MODULES_ALL 1
|
|
||||||
#define UTIL_MODULES_STOPPED 2
|
|
||||||
|
|
||||||
int UTIL_GetModulesNum(int mode);
|
|
||||||
|
|
||||||
#define GET_PLAYER_POINTER(e) (&g_players[ENTINDEX(e)])
|
|
||||||
//#define GET_PLAYER_POINTER(e) (&g_players[(((int)e-g_edict_point)/sizeof(edict_t ))])
|
|
||||||
#define GET_PLAYER_POINTER_I(i) (&g_players[i])
|
|
||||||
|
|
||||||
struct WeaponsVault {
|
|
||||||
String fullName;
|
|
||||||
short int iId;
|
|
||||||
short int ammoSlot;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fakecmd_t {
|
|
||||||
char args[256];
|
|
||||||
const char *argv[3];
|
|
||||||
//char argv[3][128];
|
|
||||||
int argc;
|
|
||||||
bool fake;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
extern CPluginMngr g_plugins;
|
|
||||||
extern CTaskMngr g_tasksMngr;
|
|
||||||
extern CPlayer g_players[33];
|
|
||||||
extern CPlayer* mPlayer;
|
|
||||||
extern CmdMngr g_commands;
|
|
||||||
extern CList<CCVar> g_cvars;
|
|
||||||
extern CList<ForceObject> g_forcemodels;
|
|
||||||
extern CList<ForceObject> g_forcesounds;
|
|
||||||
extern CList<ForceObject> g_forcegeneric;
|
|
||||||
extern CList<CModule> g_modules;
|
|
||||||
extern CList<CPlayer*> g_auth;
|
|
||||||
extern EventsMngr g_events;
|
|
||||||
extern Grenades g_grenades;
|
|
||||||
extern LogEventsMngr g_logevents;
|
|
||||||
extern MenuMngr g_menucmds;
|
|
||||||
extern String g_log_dir;
|
|
||||||
extern String g_mod_name;
|
|
||||||
extern TeamIds g_teamsIds;
|
|
||||||
extern Vault g_vault;
|
|
||||||
extern CForwardMngr g_forwards;
|
|
||||||
extern WeaponsVault g_weaponsData[MAX_WEAPONS];
|
|
||||||
extern XVars g_xvars;
|
|
||||||
extern bool g_bmod_cstrike;
|
|
||||||
extern bool g_bmod_dod;
|
|
||||||
extern bool g_dontprecache;
|
|
||||||
extern bool g_initialized;
|
|
||||||
extern int g_srvindex;
|
|
||||||
extern cvar_t* amx_version;
|
|
||||||
extern cvar_t* amxmodx_version;
|
|
||||||
extern cvar_t* hostname;
|
|
||||||
extern cvar_t* mp_timelimit;
|
|
||||||
extern fakecmd_t g_fakecmd;
|
|
||||||
extern float g_game_restarting;
|
|
||||||
extern float g_game_timeleft;
|
|
||||||
extern float g_task_time;
|
|
||||||
extern float g_auth_time;
|
|
||||||
extern hudtextparms_t g_hudset;
|
|
||||||
//extern int g_edict_point;
|
|
||||||
extern int g_players_num;
|
|
||||||
extern int mPlayerIndex;
|
|
||||||
extern int mState;
|
|
||||||
extern void (*endfunction)(void*);
|
|
||||||
extern void (*function)(void*);
|
|
||||||
|
|
||||||
typedef void (*funEventCall)(void*);
|
|
||||||
extern funEventCall modMsgsEnd[MAX_REG_MSGS];
|
|
||||||
extern funEventCall modMsgs[MAX_REG_MSGS];
|
|
||||||
|
|
||||||
extern int gmsgAmmoPickup;
|
|
||||||
extern int gmsgAmmoX;
|
|
||||||
extern int gmsgBattery;
|
|
||||||
extern int gmsgCurWeapon;
|
|
||||||
extern int gmsgDamage;
|
|
||||||
extern int gmsgDeathMsg;
|
|
||||||
extern int gmsgHealth;
|
|
||||||
extern int gmsgMOTD;
|
|
||||||
extern int gmsgScoreInfo;
|
|
||||||
extern int gmsgSendAudio;
|
|
||||||
extern int gmsgServerName;
|
|
||||||
extern int gmsgShowMenu;
|
|
||||||
extern int gmsgTeamInfo;
|
|
||||||
extern int gmsgTextMsg;
|
|
||||||
extern int gmsgVGUIMenu;
|
|
||||||
extern int gmsgWeapPickup;
|
|
||||||
extern int gmsgWeaponList;
|
|
||||||
extern int gmsgintermission;
|
|
||||||
extern int gmsgResetHUD;
|
|
||||||
extern int gmsgRoundTime;
|
|
||||||
|
|
||||||
void Client_AmmoPickup(void*);
|
|
||||||
void Client_AmmoX(void*);
|
|
||||||
void Client_CurWeapon(void*);
|
|
||||||
void Client_ScoreInfo(void*);
|
|
||||||
void Client_ShowMenu(void*);
|
|
||||||
void Client_TeamInfo(void*);
|
|
||||||
void Client_TextMsg(void*);
|
|
||||||
void Client_VGUIMenu(void*);
|
|
||||||
void Client_WeaponList(void*);
|
|
||||||
void Client_DamageEnd(void*);
|
|
||||||
void Client_DeathMsg(void*);
|
|
||||||
|
|
||||||
void amx_command();
|
|
||||||
void plugin_srvcmd();
|
|
||||||
|
|
||||||
const char* stristr(const char* a,const char* b);
|
|
||||||
char *strptime(const char *buf, const char *fmt, struct tm *tm, short addthem);
|
|
||||||
|
|
||||||
int loadModules(const char* filename);
|
|
||||||
void dettachModules();
|
|
||||||
void dettachReloadModules();
|
|
||||||
void attachModules();
|
|
||||||
void attachMetaModModules( const char* filename );
|
|
||||||
void dettachMetaModModules( const char* filename );
|
|
||||||
|
|
||||||
int add_amxnatives(module_info_s* info,AMX_NATIVE_INFO*natives);
|
|
||||||
cell* get_amxaddr(AMX *amx,cell amx_addr);
|
|
||||||
char* build_pathname(char *fmt, ... );
|
|
||||||
char* format_amxstring(AMX *amx, cell *params, int parm,int& len);
|
|
||||||
AMX* get_amxscript(int, void**,const char**);
|
|
||||||
const char* get_amxscriptname(AMX* amx);
|
|
||||||
char* get_amxstring(AMX *amx,cell amx_addr,int id,int& len);
|
|
||||||
int amxstring_len(cell* cstr);
|
|
||||||
int load_amxscript(AMX* amx, void** program, const char* path, char error[64]);
|
|
||||||
int set_amxnatives(AMX* amx,char error[64]);
|
|
||||||
int set_amxstring(AMX *amx,cell amx_addr,const char *source,int max);
|
|
||||||
int unload_amxscript(AMX* amx,void** program);
|
|
||||||
void copy_amxmemory(cell* dest,cell* src,int len);
|
|
||||||
void get_modname(char*);
|
|
||||||
void print_srvconsole( char *fmt, ... );
|
|
||||||
void report_error( int code, char* fmt, ... );
|
|
||||||
void* alloc_amxmemory(void**, int size);
|
|
||||||
void free_amxmemory(void **ptr);
|
|
||||||
// get_localinfo
|
|
||||||
const char* get_localinfo( const char* name , const char* def );
|
|
||||||
|
|
||||||
#endif // AMXMODX_H
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
; /usr/local/cross-tools/bin/i386-mingw32msvc-dlltool --base-file /tmp/cc4kB6s0.base --output-exp amx_mm.exp --dllname amx_mm.dll --output-def amx_mm.def --add-stdcall-alias --exclude-symbol=DllMainCRTStartup@12 --def /tmp/ccyI7I7K.def
|
|
||||||
EXPORTS
|
|
||||||
GetEngineFunctions @ 1 ;
|
|
||||||
GetEngineFunctions_Post @ 2 ;
|
|
||||||
GetEntityAPI2 @ 3 ;
|
|
||||||
GetEntityAPI2_Post @ 4 ;
|
|
||||||
GiveFnptrsToDll = GiveFnptrsToDll@8 @ 5 ;
|
|
||||||
GiveFnptrsToDll@8 @ 6 ;
|
|
||||||
Meta_Attach @ 7 ;
|
|
||||||
Meta_Detach @ 8 ;
|
|
||||||
Meta_Query @ 9 ;
|
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
int gmsgAmmoPickup;
|
int gmsgAmmoPickup;
|
||||||
int gmsgAmmoX;
|
int gmsgAmmoX;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
// header file for unlink()
|
// header file for unlink()
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
plugin_info_t Plugin_info = {
|
plugin_info_t Plugin_info = {
|
||||||
META_INTERFACE_VERSION, // ifvers
|
META_INTERFACE_VERSION, // ifvers
|
||||||
@ -212,36 +212,40 @@ int Spawn( edict_t *pent ) {
|
|||||||
hostname = CVAR_GET_POINTER("hostname");
|
hostname = CVAR_GET_POINTER("hostname");
|
||||||
mp_timelimit = CVAR_GET_POINTER("mp_timelimit");
|
mp_timelimit = CVAR_GET_POINTER("mp_timelimit");
|
||||||
|
|
||||||
// we need to initialize logging in Meta_Attach, but we have to create a new logfile each map,
|
// ###### Initialize logging
|
||||||
// so we clear g_log_dir in ServerDeactivate_Post to know we should create one...
|
g_log_dir.set( get_localinfo("amx_logdir" , "addons/amxx/logs" ) );
|
||||||
if (g_log_dir.empty())
|
|
||||||
{
|
|
||||||
g_log_dir.set(get_localinfo("amxx_logs", "addons/amxx/logs"));
|
|
||||||
UTIL_MakeNewLogFile();
|
UTIL_MakeNewLogFile();
|
||||||
}
|
|
||||||
|
|
||||||
// ###### Initialize task manager
|
// ###### Initialize task manager
|
||||||
g_tasksMngr.registerTimers( &gpGlobals->time, &mp_timelimit->value, &g_game_timeleft );
|
g_tasksMngr.registerTimers( &gpGlobals->time, &mp_timelimit->value, &g_game_timeleft );
|
||||||
|
|
||||||
// ###### Initialize commands prefixes
|
// ###### Initialize commands prefixes
|
||||||
g_commands.registerPrefix( "amx" );
|
g_commands.registerPrefix( "amx" );
|
||||||
g_commands.registerPrefix( "amxx" );
|
|
||||||
g_commands.registerPrefix( "say" );
|
g_commands.registerPrefix( "say" );
|
||||||
g_commands.registerPrefix( "admin_" );
|
g_commands.registerPrefix( "admin_" );
|
||||||
g_commands.registerPrefix( "sm_" );
|
g_commands.registerPrefix( "sm_" );
|
||||||
g_commands.registerPrefix( "cm_" );
|
g_commands.registerPrefix( "cm_" );
|
||||||
|
|
||||||
// make sure localinfos are set
|
Vault amx_config;
|
||||||
|
// ###### Load custom path configuration
|
||||||
|
amx_config.setSource( build_pathname("%s",
|
||||||
|
get_localinfo("amxx_cfg" , "addons/amxx/configs/core.ini")) );
|
||||||
|
|
||||||
|
if ( amx_config.loadVault() ){
|
||||||
|
Vault::iterator a = amx_config.begin();
|
||||||
|
while ( a != amx_config.end() ) {
|
||||||
|
SET_LOCALINFO( (char*)a.key().str() , (char*)a.value().str() );
|
||||||
|
++a;
|
||||||
|
}
|
||||||
|
amx_config.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ###### Make sure basedir is set
|
||||||
get_localinfo("amxx_basedir" , "addons/amxx" );
|
get_localinfo("amxx_basedir" , "addons/amxx" );
|
||||||
get_localinfo("amxx_pluginsdir", "addons/amxx/plugins");
|
|
||||||
get_localinfo("amxx_modulesdir", "addons/amxx/modules");
|
|
||||||
get_localinfo("amxx_configsdir", "addons/amxx/configs");
|
|
||||||
get_localinfo("amxx_customdir", "addons/amxx/custom");
|
|
||||||
|
|
||||||
// ###### Load modules
|
// ###### Load modules
|
||||||
loadModules(get_localinfo("amxx_modules", "addons/amxx/modules.ini"));
|
int loaded = loadModules( get_localinfo("amxx_modules" , "addons/amxx/modules.ini" ) );
|
||||||
attachModules();
|
attachModules();
|
||||||
int loaded = UTIL_GetModulesNum(UTIL_MODULES_RUNNING); // Call after attachModules so all modules don't have pending stat
|
|
||||||
// Set some info about amx version and modules
|
// Set some info about amx version and modules
|
||||||
if ( loaded ){
|
if ( loaded ){
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
@ -256,7 +260,8 @@ int Spawn( edict_t *pent ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ###### Load Vault
|
// ###### Load Vault
|
||||||
g_vault.setSource( build_pathname("%s", get_localinfo("amxx_vault", "addons/amxx/configs/vault.ini")) );
|
g_vault.setSource( build_pathname("%s",
|
||||||
|
get_localinfo("amxx_vault" , "addons/amxx/configs/vault.ini" ) ) );
|
||||||
g_vault.loadVault( );
|
g_vault.loadVault( );
|
||||||
|
|
||||||
|
|
||||||
@ -270,7 +275,8 @@ int Spawn( edict_t *pent ) {
|
|||||||
memset(g_players[0].flags,-1,sizeof(g_players[0].flags));
|
memset(g_players[0].flags,-1,sizeof(g_players[0].flags));
|
||||||
|
|
||||||
// ###### Load AMX scripts
|
// ###### Load AMX scripts
|
||||||
g_plugins.loadPluginsFromFile( get_localinfo("amxx_plugins", "addons/amxx/plugins.ini") ); // :TODO: Where the hell should this be!?!?!
|
g_plugins.loadPluginsFromFile(
|
||||||
|
get_localinfo("amxx_plugins" , "addons/amxx/plugins.ini" ) );
|
||||||
|
|
||||||
// ###### Call precache forward function
|
// ###### Call precache forward function
|
||||||
g_dontprecache = false;
|
g_dontprecache = false;
|
||||||
@ -434,7 +440,6 @@ void ServerDeactivate_Post() {
|
|||||||
g_xvars.clear();
|
g_xvars.clear();
|
||||||
g_plugins.clear();
|
g_plugins.clear();
|
||||||
|
|
||||||
g_log_dir.clear();
|
|
||||||
UTIL_Log("Log file closed.");
|
UTIL_Log("Log file closed.");
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
@ -968,25 +973,9 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
|||||||
a = &gameDir[i];
|
a = &gameDir[i];
|
||||||
g_mod_name.set(a);
|
g_mod_name.set(a);
|
||||||
|
|
||||||
// ###### Load custom path configuration
|
|
||||||
Vault amx_config;
|
|
||||||
amx_config.setSource(build_pathname("%s", get_localinfo("amxx_cfg", "addons/amxx/configs/core.ini")));
|
|
||||||
|
|
||||||
if ( amx_config.loadVault() ){
|
|
||||||
Vault::iterator a = amx_config.begin();
|
|
||||||
while ( a != amx_config.end() ) {
|
|
||||||
SET_LOCALINFO( (char*)a.key().str() , (char*)a.value().str() );
|
|
||||||
++a;
|
|
||||||
}
|
|
||||||
amx_config.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ###### Initialize logging here
|
|
||||||
g_log_dir.set(get_localinfo("amxx_logs", "addons/amxx/logs"));
|
|
||||||
UTIL_MakeNewLogFile();
|
|
||||||
|
|
||||||
// ###### Now attach metamod modules
|
// ###### Now attach metamod modules
|
||||||
attachMetaModModules( get_localinfo("amxx_modules", "addons/amxx/modules.ini") );
|
attachMetaModModules( get_localinfo("amxx_modules" ,
|
||||||
|
"addons/amxx/modules.ini" ) );
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
@ -1015,7 +1004,8 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason) {
|
|||||||
dettachModules();
|
dettachModules();
|
||||||
|
|
||||||
// ###### Now dettach metamod modules
|
// ###### Now dettach metamod modules
|
||||||
dettachMetaModModules( get_localinfo("amxx_modules", "addons/amxx/modules.ini") );
|
dettachMetaModModules( get_localinfo("amxx_modules" ,
|
||||||
|
"addons/amxx/modules.ini" ) );
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
#include "osdep.h" // sleep, etc
|
#include "osdep.h" // sleep, etc
|
||||||
#include "CFile.h"
|
#include "CFile.h"
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ int loadModules(const char* filename)
|
|||||||
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
char* pathname = build_pathname("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxx/modules"), line);
|
char* pathname = build_pathname("addons/amxx/modules/%s", line);
|
||||||
|
|
||||||
CList<CModule>::iterator a = g_modules.find( pathname );
|
CList<CModule>::iterator a = g_modules.find( pathname );
|
||||||
|
|
||||||
@ -476,8 +476,8 @@ void dettachMetaModModules( const char* filename )
|
|||||||
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
char* pathname = build_pathname("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxx/modules"), line);
|
char* pathname = build_pathname_addons("addons/amxx/modules/%s", line);
|
||||||
char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxx/modules"), line);
|
char* mmpathname = build_pathname_addons("addons/amxx/modules/%s", line);
|
||||||
|
|
||||||
module = DLLOAD( pathname ); // link dll
|
module = DLLOAD( pathname ); // link dll
|
||||||
|
|
||||||
@ -520,8 +520,8 @@ void attachMetaModModules( const char* filename )
|
|||||||
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
if (!isalnum(*moduleName) || !validFile(moduleName) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
char* pathname = build_pathname("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxx/modules"), line);
|
char* pathname = build_pathname("addons/amxx/modules/%s", line);
|
||||||
char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxx/modules"), line);
|
char* mmpathname = build_pathname_addons("addons/amxx/modules/%s", line);
|
||||||
module = DLLOAD( pathname ); // link dll
|
module = DLLOAD( pathname ); // link dll
|
||||||
|
|
||||||
if ( module )
|
if ( module )
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
LIBRARY amxx_mm
|
|
||||||
EXPORTS
|
|
||||||
GiveFnptrsToDll @1
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
.data READ WRITE
|
|
@ -1,288 +0,0 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="amxmodx_mm" - Package Owner=<4>
|
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
|
||||||
# ** DO NOT EDIT **
|
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
|
||||||
|
|
||||||
CFG=amxmodx_mm - Win32 Debug
|
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
|
||||||
!MESSAGE use the Export Makefile command and run
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "amxmodx_mm.mak".
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "amxmodx_mm.mak" CFG="amxmodx_mm - Win32 Debug"
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE Possible choices for configuration are:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE "amxmodx_mm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
|
||||||
!MESSAGE "amxmodx_mm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
|
||||||
!MESSAGE
|
|
||||||
|
|
||||||
# Begin Project
|
|
||||||
# PROP AllowPerConfigDependencies 0
|
|
||||||
# PROP Scc_ProjName ""
|
|
||||||
# PROP Scc_LocalPath ""
|
|
||||||
CPP=cl.exe
|
|
||||||
MTL=midl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "amxmodx_mm - Win32 Release"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "Release"
|
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "release"
|
|
||||||
# PROP Intermediate_Dir "release"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "amxmodx_mm_EXPORTS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\metamod\metamod" /I "..\..\hlsdk\sourcecode\common" /I "..\..\hlsdk\sourcecode\engine" /I "..\..\hlsdk\sourcecode\dlls" /I "..\..\hlsdk\sourcecode\pm_shared" /I "..\extra\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "amxmodx_mm_EXPORTS" /YX /FD /c
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /def:".\amxmodx_mm.def" /out:"release/amxxmm.dll" /libpath:"..\extra\lib_win32"
|
|
||||||
# Begin Custom Build
|
|
||||||
TargetPath=.\release\amxxmm.dll
|
|
||||||
TargetName=amxxmm
|
|
||||||
InputPath=.\release\amxxmm.dll
|
|
||||||
SOURCE="$(InputPath)"
|
|
||||||
|
|
||||||
"$(TargetName)" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
copy $(TargetPath) D:\SIERRA\Half-Life\cstrike\addons\amx\dlls
|
|
||||||
|
|
||||||
# End Custom Build
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "amxmodx_mm - Win32 Debug"
|
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
|
||||||
# PROP BASE Output_Dir "Debug"
|
|
||||||
# PROP BASE Intermediate_Dir "Debug"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 1
|
|
||||||
# PROP Output_Dir "debug"
|
|
||||||
# PROP Intermediate_Dir "debug"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "amxmodx_mm_EXPORTS" /YX /FD /GZ /c
|
|
||||||
# ADD CPP /nologo /Zp4 /MTd /W3 /Gm /GX /ZI /Od /I "..\..\metamod\metamod" /I "..\...\hlsdk\sourcecode\common" /I "..\...\hlsdk\sourcecode\engine" /I "..\...\hlsdk\sourcecode\dlls" /I "..\...\hlsdk\sourcecode\pm_shared" /I "..\extra\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "amxmodx_mm_EXPORTS" /YX /FD /GZ /c
|
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /def:".\amxmodx_mm.def" /out:"debug/amxxmm.dll" /pdbtype:sept /libpath:"..\extra\lib_win32"
|
|
||||||
# SUBTRACT LINK32 /incremental:no /nodefaultlib
|
|
||||||
# Begin Custom Build
|
|
||||||
TargetPath=.\debug\amxxmm.dll
|
|
||||||
TargetName=amxxmm
|
|
||||||
InputPath=.\debug\amxxmm.dll
|
|
||||||
SOURCE="$(InputPath)"
|
|
||||||
|
|
||||||
"$(TargetName)" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
copy $(TargetPath) D:\SIERRA\Half-Life\cstrike\addons\amx\dlls
|
|
||||||
|
|
||||||
# End Custom Build
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# Begin Target
|
|
||||||
|
|
||||||
# Name "amxmodx_mm - Win32 Release"
|
|
||||||
# Name "amxmodx_mm - Win32 Debug"
|
|
||||||
# Begin Group "Source Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\amx.c
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\amxcore.c
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\amxmodx.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\amxtime.c
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CCmd.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CEvent.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CFile.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CForward.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CLogEvent.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CMenu.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CMisc.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CModule.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CPlugin.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CString.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CTask.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CVault.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\emsg.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\file.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\float.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\meta_api.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\modules.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\power.c
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\srvcmd.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\string.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\strptime.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\util.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\vault.cpp
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
|
||||||
# Begin Group "Header Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\amxmodx.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CCmd.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CEvent.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CFile.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CForward.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CList.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CLogEvent.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CMenu.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CMisc.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CModule.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CPlugin.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CString.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CTask.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\CVault.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\modules.h
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
|
||||||
# End Target
|
|
||||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "amxmodx_mm"=.\amxmodx_mm.dsp - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amxmodx_mm", "amxmodx_mm.vcproj", "{2FDEE868-4051-4918-81E9-5CBA63F3E785}"
|
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
|
||||||
Debug = Debug
|
|
||||||
Release = Release
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
|
||||||
{2FDEE868-4051-4918-81E9-5CBA63F3E785}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{2FDEE868-4051-4918-81E9-5CBA63F3E785}.Debug.Build.0 = Debug|Win32
|
|
||||||
{2FDEE868-4051-4918-81E9-5CBA63F3E785}.Release.ActiveCfg = Release|Win32
|
|
||||||
{2FDEE868-4051-4918-81E9-5CBA63F3E785}.Release.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,752 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="amxmodx_mm"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory=".\release"
|
|
||||||
IntermediateDirectory=".\release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
AdditionalIncludeDirectories="..\..\metamod\metamod,..\..\hlsdk\sourcecode\common,..\..\hlsdk\sourcecode\engine,..\..\hlsdk\sourcecode\dlls,..\..\hlsdk\sourcecode\pm_shared,..\extra\include"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;amxmodx_mm_EXPORTS"
|
|
||||||
StringPooling="TRUE"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
EnableFunctionLevelLinking="TRUE"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\release/amxmodx_mm.pch"
|
|
||||||
AssemblerListingLocation=".\release/"
|
|
||||||
ObjectFile=".\release/"
|
|
||||||
ProgramDataBaseFileName=".\release/"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
CompileAs="0"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="copy "$(TargetPath)" D:\SIERRA\Half-Life\cstrike\addons\amx\dlls
|
|
||||||
"
|
|
||||||
Outputs="$(TargetName)"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="release/amxx_mm.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
AdditionalLibraryDirectories="..\extra\lib_win32"
|
|
||||||
ModuleDefinitionFile=".\amxmodx_mm.def"
|
|
||||||
ProgramDatabaseFile=".\release/amxx_mm.pdb"
|
|
||||||
ImportLibrary=".\release/amxx_mm.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\release/amxmodx_mm.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1033"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory=".\debug"
|
|
||||||
IntermediateDirectory=".\debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="..\..\metamod\metamod,..\...\hlsdk\sourcecode\common,..\...\hlsdk\sourcecode\engine,..\...\hlsdk\sourcecode\dlls,..\...\hlsdk\sourcecode\pm_shared,..\extra\include"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;amxmodx_mm_EXPORTS"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
StructMemberAlignment="3"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\debug/amxmodx_mm.pch"
|
|
||||||
AssemblerListingLocation=".\debug/"
|
|
||||||
ObjectFile=".\debug/"
|
|
||||||
ProgramDataBaseFileName=".\debug/"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
DebugInformationFormat="4"
|
|
||||||
CompileAs="0"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"
|
|
||||||
CommandLine="copy "$(TargetPath)" D:\SIERRA\Half-Life\cstrike\addons\amx\dlls
|
|
||||||
"
|
|
||||||
Outputs="$(TargetName)"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="debug/amxx_mm.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
AdditionalLibraryDirectories="..\extra\lib_win32"
|
|
||||||
ModuleDefinitionFile=".\amxmodx_mm.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile=".\debug/amxx_mm.pdb"
|
|
||||||
ImportLibrary=".\debug/amxx_mm.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\debug/amxmodx_mm.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1033"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
|
||||||
<File
|
|
||||||
RelativePath="..\amx.c">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxcore.c">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxmodx.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxtime.c">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CCmd.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CEvent.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CFile.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CForward.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CLogEvent.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CMenu.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CMisc.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CModule.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CPlugin.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CString.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CTask.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CVault.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\emsg.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\file.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\float.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\meta_api.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\modules.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\power.c">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\srvcmd.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\string.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\strptime.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\util.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\vault.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories=""
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;amxmodx_mm_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
|
||||||
RelativePath="..\amxmodx.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CCmd.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CEvent.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CFile.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CForward.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CList.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CLogEvent.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CMenu.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CMisc.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CModule.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CPlugin.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CString.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CTask.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\CVault.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\modules.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
BIN
amxmodx/msvc/release_win32/amx_mm.dll
Executable file
BIN
amxmodx/msvc/release_win32/amx_mm.dll
Executable file
Binary file not shown.
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
void amx_command(){
|
void amx_command(){
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
const char* stristr(const char* str,const char* substr)
|
const char* stristr(const char* str,const char* substr)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
int UTIL_ReadFlags(const char* c)
|
int UTIL_ReadFlags(const char* c)
|
||||||
{
|
{
|
||||||
@ -272,7 +272,7 @@ void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1,
|
|||||||
g_fakecmd.fake = false;
|
g_fakecmd.fake = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String g_UTIL_LogFile;
|
std::string g_UTIL_LogFile;
|
||||||
|
|
||||||
void UTIL_MakeNewLogFile()
|
void UTIL_MakeNewLogFile()
|
||||||
{
|
{
|
||||||
@ -292,8 +292,8 @@ void UTIL_MakeNewLogFile()
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
g_UTIL_LogFile.set(build_pathname("%s/L%02d%02d%03d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i));
|
g_UTIL_LogFile = build_pathname("%s/L%02d%02d%03d.log", g_log_dir.str(), curTime->tm_mon + 1, curTime->tm_mday, i);
|
||||||
FILE *pTmpFile = fopen(g_UTIL_LogFile.str(), "r"); // open for reading to check whether the file exists
|
FILE *pTmpFile = fopen(g_UTIL_LogFile.c_str(), "r"); // open for reading to check whether the file exists
|
||||||
if (!pTmpFile)
|
if (!pTmpFile)
|
||||||
break;
|
break;
|
||||||
fclose(pTmpFile);
|
fclose(pTmpFile);
|
||||||
@ -322,7 +322,7 @@ void UTIL_Log(const char *fmt, ...)
|
|||||||
strftime(date, 31, "%m/%d/%Y - %H:%M:%S", curTime);
|
strftime(date, 31, "%m/%d/%Y - %H:%M:%S", curTime);
|
||||||
|
|
||||||
// log msg now
|
// log msg now
|
||||||
FILE *pF = fopen(g_UTIL_LogFile.str(), "a+");
|
FILE *pF = fopen(g_UTIL_LogFile.c_str(), "a+");
|
||||||
if (!pF)
|
if (!pF)
|
||||||
return; // don't try to create a new logfile to prevent recursion crashes if there is an unforseen error
|
return; // don't try to create a new logfile to prevent recursion crashes if there is an unforseen error
|
||||||
|
|
||||||
@ -330,36 +330,3 @@ void UTIL_Log(const char *fmt, ...)
|
|||||||
fclose(pF);
|
fclose(pF);
|
||||||
print_srvconsole("L %s: %s\n", date, msg);
|
print_srvconsole("L %s: %s\n", date, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the number of running modules
|
|
||||||
int UTIL_GetModulesNum(int mode)
|
|
||||||
{
|
|
||||||
CList<CModule>::iterator iter;
|
|
||||||
int num;
|
|
||||||
switch (mode)
|
|
||||||
{
|
|
||||||
case UTIL_MODULES_ALL:
|
|
||||||
return g_modules.size();
|
|
||||||
case UTIL_MODULES_RUNNING:
|
|
||||||
iter = g_modules.begin();
|
|
||||||
num = 0;
|
|
||||||
while (iter)
|
|
||||||
{
|
|
||||||
if ((*iter).getStatusValue() == MODULE_LOADED)
|
|
||||||
++num;
|
|
||||||
++iter;
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
case UTIL_MODULES_STOPPED:
|
|
||||||
iter = g_modules.begin();
|
|
||||||
num = 0;
|
|
||||||
while (iter)
|
|
||||||
{
|
|
||||||
if ((*iter).getStatusValue() != MODULE_LOADED)
|
|
||||||
++num;
|
|
||||||
++iter;
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -32,7 +32,7 @@
|
|||||||
#include <extdll.h>
|
#include <extdll.h>
|
||||||
#include <meta_api.h>
|
#include <meta_api.h>
|
||||||
#include "CVault.h"
|
#include "CVault.h"
|
||||||
#include "amxmodx.h"
|
#include "amxmod.h"
|
||||||
|
|
||||||
Vault g_vault;
|
Vault g_vault;
|
||||||
|
|
||||||
|
@ -15,4 +15,4 @@
|
|||||||
"Kick player" "amx_kick #%userid%" "b" "u"
|
"Kick player" "amx_kick #%userid%" "b" "u"
|
||||||
"Slay player" "amx_slay #%userid%" "bd" "u"
|
"Slay player" "amx_slay #%userid%" "bd" "u"
|
||||||
"Slap with 1 dmg." "amx_slap #%userid% 1" "b" "u"
|
"Slap with 1 dmg." "amx_slap #%userid% 1" "b" "u"
|
||||||
"Ban for 5 minutes" "amx_ban #%userid% id 5" "b" "u"
|
"Ban for 5 minutes" "amx_banid #%userid% 5" "b" "u"
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
; Configuration file for AMX Mod X
|
; Configuration file for AMX Mod X
|
||||||
amxx_logdir addons/amxx/logs
|
amx_logdir addons/amxx/logs
|
||||||
amxx_configsdir addons/amxx/configs
|
amx_modules addons/amxx/modules.ini
|
||||||
amxx_customdir addons/amxx/custom
|
amx_plugins addons/amxx/plugins/plugins.ini
|
||||||
amxx_modules addons/amxx/modules.ini
|
amx_vault addons/amxx/vault.ini
|
||||||
amxx_plugins addons/amxx/plugins.ini
|
csstats_score addons/amxx/csstats.amx
|
||||||
amxx_pluginsdir addons/amxx/plugins
|
csstats addons/amxx/csstats.dat
|
||||||
amxx_modulesdir addons/amxx/modules
|
|
||||||
amxx_vault addons/amxx/configs/vault.ini
|
|
||||||
csstats_score addons/amxx/custom/csstats.amx
|
|
||||||
csstats addons/amxx/custom/csstats.dat
|
|
@ -2,28 +2,28 @@
|
|||||||
; File location: $moddir/addons/amxx/configs/maps.ini
|
; File location: $moddir/addons/amxx/configs/maps.ini
|
||||||
; To use with Maps Menu plugin
|
; To use with Maps Menu plugin
|
||||||
|
|
||||||
as_oilrig
|
as_oilrig "OilRig - Assassination"
|
||||||
cs_747
|
cs_747 "747 Hijack - Hostage Rescue"
|
||||||
cs_assault
|
cs_assault "Assault - Hostage Rescue"
|
||||||
cs_backalley
|
cs_backalley "Alleyway - Hostage Rescue"
|
||||||
cs_estate
|
cs_estate "Zaphod's Estate - Hostage Rescue"
|
||||||
cs_havana
|
cs_havana "Havana - Hostage Rescue"
|
||||||
cs_italy
|
cs_italy "Italy - Hostage Rescue"
|
||||||
cs_militia
|
cs_militia "Militia - Hostage Rescue"
|
||||||
cs_office
|
cs_office "The Office Complex - Hostage Rescue"
|
||||||
cs_siege
|
cs_siege "Canyon Siege - Hostage Rescue"
|
||||||
de_airstrip
|
de_airstrip "Airstrip - Defusion"
|
||||||
de_aztec
|
de_aztec "Aztec - Defusion"
|
||||||
de_cbble
|
de_cbble "Cobble - Defusion"
|
||||||
de_chateau
|
de_chateau "Chateau - Defusion"
|
||||||
de_dust
|
de_dust "Dust - Defusion"
|
||||||
de_dust2
|
de_dust2 "Dust II - Defusion"
|
||||||
de_inferno
|
de_inferno "Inferno - Defusion"
|
||||||
de_nuke
|
de_nuke "Nuke - Defusion"
|
||||||
de_piranesi
|
de_piranesi "Piranesi - Defusion"
|
||||||
de_prodigy
|
de_prodigy "Prodigy - Defusion"
|
||||||
de_storm
|
de_storm "Storm - Defusion"
|
||||||
de_survivor
|
de_survivor "Survivor - Defusion"
|
||||||
de_torn
|
de_torn "Torn - Defusion"
|
||||||
de_train
|
de_train "Trainyard - Defusion"
|
||||||
de_vertigo
|
de_vertigo "Vertigo - Defusion"
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
; AMX Mod X Modules; You can specify both linux & win32 modules here
|
; AMX Mod X Modules; You can specify both linux & win32 modules here
|
||||||
|
|
||||||
; Fun - This has extra functions
|
; Fun - This has extra functions
|
||||||
|
|
||||||
fun_amx.dll
|
fun_amx.dll
|
||||||
fun_amx_i386.so
|
fun_amx_i386.so
|
||||||
|
|
||||||
; Engine - This has engine functions core to half-life
|
; Engine - This has engine functions core to half-life
|
||||||
;engine_amx.dll
|
engine_amx.dll
|
||||||
;engine_amx_i386.so
|
engine_amx_i386.so
|
||||||
|
|
||||||
; MySQL - This adds MySQL connection support
|
; MySQL - This adds MySQL connection support
|
||||||
;mysql_amx.dll
|
;mysql_amx.dll
|
||||||
|
@ -8,7 +8,7 @@ adminslots.amx ; slot reservation
|
|||||||
menufront.amx ; front-end for admin menus
|
menufront.amx ; front-end for admin menus
|
||||||
cmdmenu.amx ; command menu (speech, settings)
|
cmdmenu.amx ; command menu (speech, settings)
|
||||||
plmenu.amx ; players menu (kick, ban, client cmds.)
|
plmenu.amx ; players menu (kick, ban, client cmds.)
|
||||||
;restmenu.amx ; restrict weapons menu
|
restmenu.amx ; restrict weapons menu
|
||||||
;telemenu.amx ; teleport menu (Fun Module required!)
|
;telemenu.amx ; teleport menu (Fun Module required!)
|
||||||
mapsmenu.amx ; maps menu (vote, changelevel)
|
mapsmenu.amx ; maps menu (vote, changelevel)
|
||||||
antiflood.amx ; prevent clients from chat-flooding the server
|
antiflood.amx ; prevent clients from chat-flooding the server
|
||||||
@ -19,9 +19,9 @@ timeleft.amx ; displays time left on map
|
|||||||
mapchooser.amx ; allows to vote for next map
|
mapchooser.amx ; allows to vote for next map
|
||||||
scrollmsg.amx ; displays a scrolling message
|
scrollmsg.amx ; displays a scrolling message
|
||||||
imessage.amx ; displays information messages
|
imessage.amx ; displays information messages
|
||||||
;welcomemsg.amx ; displays motd @ client connection
|
welcomemsg.amx ; displays motd @ client connection
|
||||||
pausecfg.amx ; allows to pause and unpause some plugins
|
pausecfg.amx ; allows to pause and unpause some plugins
|
||||||
stats.amx ; stats on death or round end (CSStats Module required!)
|
stats.amx ; stats on death or round end (CSStats Module required!)
|
||||||
;stats_logging.amx ; weapons stats logging (CSStats Module required!)
|
stats_logging.amx ; weapons stats logging (CSStats Module required!)
|
||||||
miscstats.amx ; bunch of events announcement for Counter-Strike
|
miscstats.amx ; bunch of events announcement for Counter-Strike
|
||||||
statscfg.amx ; allows to manage stats plugins via menu and commands
|
statscfg.amx ; allows to manage stats plugins via menu and commands
|
@ -30,14 +30,10 @@
|
|||||||
; Account flags:
|
; Account flags:
|
||||||
; a - disconnect player on invalid password
|
; a - disconnect player on invalid password
|
||||||
; b - clan tag
|
; b - clan tag
|
||||||
; c - this is steamid/wonid
|
; c - this is steamid
|
||||||
; d - this is ip
|
; d - this is ip
|
||||||
; e - password is not checked (only name/ip/steamid needed)
|
; e - password is not checked (only name/ip/steamid needed)
|
||||||
|
|
||||||
; Password:
|
|
||||||
; Add to your autoexec.cfg: setinfo _pw "<password>"
|
|
||||||
; Change _pw to the value of amx_password_field
|
|
||||||
|
|
||||||
; Format of admin account:
|
; Format of admin account:
|
||||||
; <name|ip|steamid> <password> <access flags> <account flags>
|
; <name|ip|steamid> <password> <access flags> <account flags>
|
||||||
|
|
||||||
|
@ -11,10 +11,22 @@
|
|||||||
|
|
||||||
CCstrikePlayer::CCstrikePlayer()
|
CCstrikePlayer::CCstrikePlayer()
|
||||||
{
|
{
|
||||||
|
//SetOnline(false);
|
||||||
SetModelled(false);
|
SetModelled(false);
|
||||||
|
//SetTime(0.0);
|
||||||
SetInspectModel(false);
|
SetInspectModel(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*bool CCstrikePlayer::GetOnline()
|
||||||
|
{
|
||||||
|
return online;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CCstrikePlayer::SetOnline(bool onlineIn)
|
||||||
|
{
|
||||||
|
return online = onlineIn;
|
||||||
|
}*/
|
||||||
|
|
||||||
bool CCstrikePlayer::GetModelled()
|
bool CCstrikePlayer::GetModelled()
|
||||||
{
|
{
|
||||||
return modelled;
|
return modelled;
|
||||||
@ -33,11 +45,22 @@ const char* CCstrikePlayer::GetModel()
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCstrikePlayer::SetModel(const char* modelIn)
|
const char* CCstrikePlayer::SetModel(const char* modelIn)
|
||||||
{
|
{
|
||||||
strcpy(model, modelIn);
|
//SetTime(0.0);
|
||||||
|
return strcpy(model, modelIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*float CCstrikePlayer::GetTime()
|
||||||
|
{
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCstrikePlayer::SetTime(float timeIn)
|
||||||
|
{
|
||||||
|
time = timeIn;
|
||||||
|
}
|
||||||
|
*/
|
||||||
bool CCstrikePlayer::GetInspectModel()
|
bool CCstrikePlayer::GetInspectModel()
|
||||||
{
|
{
|
||||||
return inspectModel;
|
return inspectModel;
|
||||||
|
@ -10,17 +10,22 @@ class CCstrikePlayer
|
|||||||
public:
|
public:
|
||||||
CCstrikePlayer();
|
CCstrikePlayer();
|
||||||
|
|
||||||
|
/*bool GetOnline();
|
||||||
|
bool SetOnline(bool onlineIn);*/
|
||||||
bool GetModelled();
|
bool GetModelled();
|
||||||
bool SetModelled(bool modelledIn);
|
bool SetModelled(bool modelledIn);
|
||||||
|
//float GetTime();
|
||||||
|
//void SetTime(float timeIn);
|
||||||
const char* GetModel();
|
const char* GetModel();
|
||||||
void SetModel(const char* modelIn);
|
const char* SetModel(const char* modelIn);
|
||||||
bool GetInspectModel();
|
bool GetInspectModel();
|
||||||
void SetInspectModel(bool inspectModelIn);
|
void SetInspectModel(bool inspectModelIn);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool inspectModel;
|
bool online, inspectModel;
|
||||||
bool modelled;
|
bool modelled;
|
||||||
char model[32];
|
char model[32];
|
||||||
|
//float time;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(INCLUDED_CCSTRIKEPLAYER)
|
#endif // !defined(INCLUDED_CCSTRIKEPLAYER)
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
MODNAME = cstrike_amx
|
MODNAME = cstrike_mm
|
||||||
SRCFILES = CstrikePlayer.cpp cstrike.cpp
|
SRCFILES = cstrike.cpp CstrikePlayer.cpp
|
||||||
|
|
||||||
EXTRA_LIBS_LINUX =
|
EXTRA_LIBS_LINUX =
|
||||||
EXTRA_LIBS_WIN32 =
|
EXTRA_LIBS_WIN32 =
|
||||||
EXTRA_LIBDIRS_LINUX = -Lextra/lib_linux
|
EXTRA_LIBDIRS_LINUX = -Lextra/lib_linux
|
||||||
EXTRA_LIBDIRS_WIN32 = -Lextra/lib_win32
|
EXTRA_LIBDIRS_WIN32 = -Lextra/lib_win32
|
||||||
|
|
||||||
EXTRA_INCLUDEDIRS = -Iextra/include -I../amxmodx
|
EXTRA_INCLUDEDIRS = -Iextra/include
|
||||||
|
|
||||||
EXTRA_FLAGS = -Dstrcmpi=strcasecmp
|
EXTRA_FLAGS = -Dstrcmpi=strcasecmp
|
||||||
|
|
||||||
AMXDIR=../amxmodx
|
|
||||||
SDKTOP=../hlsdk
|
SDKTOP=../hlsdk
|
||||||
METADIR=../metamodx
|
METADIR=../metamod/metamod
|
||||||
|
|
||||||
|
|
||||||
SDKSRC=$(SDKTOP)/SourceCode
|
SDKSRC=$(SDKTOP)/SourceCode
|
||||||
@ -53,34 +52,43 @@ else
|
|||||||
ASRCFILES := $(shell dir /b)
|
ASRCFILES := $(shell dir /b)
|
||||||
endif
|
endif
|
||||||
OBJ_LINUX := $(SRCFILES:%.cpp=$(OBJDIR_LINUX)/%.o)
|
OBJ_LINUX := $(SRCFILES:%.cpp=$(OBJDIR_LINUX)/%.o)
|
||||||
|
OBJC_LINUX := $(CSRCFILES:%.c=$(OBJDIR_LINUX)/%.o)
|
||||||
OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
||||||
|
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
|
||||||
|
|
||||||
|
|
||||||
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
||||||
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG
|
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG -lstdc++
|
||||||
|
|
||||||
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(AMXDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
||||||
CFLAGS=-Wall -Wno-unknown-pragmas
|
CFLAGS=-Wall -Wno-unknown-pragmas
|
||||||
ODEF = -DOPT_TYPE=\"optimized\"
|
ODEF = -DOPT_TYPE=\"optimized\"
|
||||||
CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
|
CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
|
||||||
|
|
||||||
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
||||||
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
||||||
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
||||||
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
||||||
|
|
||||||
|
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c
|
||||||
|
$(DO_CC_LINUX)
|
||||||
|
|
||||||
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.cpp
|
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.cpp
|
||||||
$(DO_CC_LINUX)
|
$(DO_CC_LINUX)
|
||||||
|
|
||||||
|
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.c
|
||||||
|
$(DO_CC_WIN32)
|
||||||
|
|
||||||
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.cpp
|
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.cpp
|
||||||
$(DO_CC_WIN32)
|
$(DO_CC_WIN32)
|
||||||
|
|
||||||
default: $(DEFAULT)
|
default: $(DEFAULT)
|
||||||
|
|
||||||
$(TARGET_LINUX): $(OBJDIR_LINUX) $(OBJ_LINUX)
|
$(TARGET_LINUX): $(OBJDIR_LINUX) $(OBJ_LINUX) $(OBJC_LINUX)
|
||||||
$(LINK_LINUX)
|
$(LINK_LINUX)
|
||||||
|
|
||||||
$(TARGET_WIN32): $(OBJDIR_WIN32) $(OBJ_WIN32)
|
$(TARGET_WIN32): $(OBJDIR_WIN32) $(OBJ_WIN32) $(OBJC_WIN32)
|
||||||
$(LINK_WIN32)
|
$(LINK_WIN32)
|
||||||
|
|
||||||
$(OBJDIR_LINUX):
|
$(OBJDIR_LINUX):
|
||||||
|
@ -175,15 +175,6 @@ static cell AMX_NATIVE_CALL cs_set_user_deaths(AMX *amx, cell *params) // cs_set
|
|||||||
// Set deaths
|
// Set deaths
|
||||||
*((int *)pPlayer->pvPrivateData + OFFSET_CSDEATHS) = params[2];
|
*((int *)pPlayer->pvPrivateData + OFFSET_CSDEATHS) = params[2];
|
||||||
|
|
||||||
// Update scoreboard here..?
|
|
||||||
MESSAGE_BEGIN(MSG_ALL, GET_USER_MSG_ID(PLID, "ScoreInfo", NULL));
|
|
||||||
WRITE_BYTE(params[1]);
|
|
||||||
WRITE_SHORT(pPlayer->v.frags);
|
|
||||||
WRITE_SHORT(params[2]);
|
|
||||||
WRITE_SHORT(0); // dunno what this parameter is (doesn't seem to be vip)
|
|
||||||
WRITE_SHORT(*((int *)pPlayer->pvPrivateData + OFFSET_TEAM));
|
|
||||||
MESSAGE_END();
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,10 +234,10 @@ static cell AMX_NATIVE_CALL cs_get_weapon_silenced(AMX *amx, cell *params) // cs
|
|||||||
int *silencemode = ((int *)pWeapon->pvPrivateData + OFFSET_SILENCER_FIREMODE);
|
int *silencemode = ((int *)pWeapon->pvPrivateData + OFFSET_SILENCER_FIREMODE);
|
||||||
switch (weapontype) {
|
switch (weapontype) {
|
||||||
case CSW_M4A1:
|
case CSW_M4A1:
|
||||||
if (*silencemode & M4A1_SILENCED)
|
if (*silencemode == M4A1_SILENCED)
|
||||||
return 1;
|
return 1;
|
||||||
case CSW_USP:
|
case CSW_USP:
|
||||||
if (*silencemode & USP_SILENCED)
|
if (*silencemode == USP_SILENCED)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +249,7 @@ static cell AMX_NATIVE_CALL cs_set_weapon_silenced(AMX *amx, cell *params) // cs
|
|||||||
{
|
{
|
||||||
// Silence/unsilence gun. Does only work on M4A1 and USP.
|
// Silence/unsilence gun. Does only work on M4A1 and USP.
|
||||||
// params[1] = weapon index
|
// params[1] = weapon index
|
||||||
// params[2] = 1, and we silence the gun, 0 and we unsilence gun.
|
// params[2] = 1, and we silence the gun, 0 and we unsilence gun-
|
||||||
|
|
||||||
// Valid entity should be within range
|
// Valid entity should be within range
|
||||||
if (params[1] < 1 || params[1] > gpGlobals->maxEntities)
|
if (params[1] < 1 || params[1] > gpGlobals->maxEntities)
|
||||||
@ -281,41 +272,22 @@ static cell AMX_NATIVE_CALL cs_set_weapon_silenced(AMX *amx, cell *params) // cs
|
|||||||
|
|
||||||
switch (weapontype) {
|
switch (weapontype) {
|
||||||
case CSW_M4A1:
|
case CSW_M4A1:
|
||||||
if (params[2] == 1) {
|
if (params[2])
|
||||||
if (!(*silencemode & M4A1_SILENCED)) { // want to silence - can't already be silenced
|
*silencemode = M4A1_SILENCED;
|
||||||
*silencemode |= M4A1_SILENCED;
|
else
|
||||||
// If this weapon has an owner that is a player, play animation for that player.
|
*silencemode = M4A1_UNSILENCED;
|
||||||
if (UTIL_IsPlayer(amx, pWeapon->v.owner))
|
|
||||||
pWeapon->v.owner->v.weaponanim = M4A1_ATTACHSILENCEANIM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (*silencemode & M4A1_SILENCED) { // want to unsilence - can't already be unsilenced
|
|
||||||
*silencemode &= ~M4A1_SILENCED;
|
|
||||||
// If this weapon has an owner that is a player, play animation for that player.
|
|
||||||
if (UTIL_IsPlayer(amx, pWeapon->v.owner))
|
|
||||||
pWeapon->v.owner->v.weaponanim = M4A1_DETACHSILENCEANIM;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case CSW_USP:
|
case CSW_USP:
|
||||||
if (params[2] == 1) {
|
if (params[2])
|
||||||
if (!(*silencemode & USP_SILENCED)) { // want to silence - can't already be silenced
|
*silencemode = USP_SILENCED;
|
||||||
*silencemode |= USP_SILENCED;
|
else
|
||||||
// If this weapon has an owner that is a player, play animation for that player.
|
*silencemode = USP_UNSILENCED;
|
||||||
if (UTIL_IsPlayer(amx, pWeapon->v.owner))
|
|
||||||
pWeapon->v.owner->v.weaponanim = USP_ATTACHSILENCEANIM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (*silencemode & USP_SILENCED) { // want to unsilence - can't already be unsilenced
|
|
||||||
*silencemode &= ~USP_SILENCED;
|
|
||||||
// If this weapon has an owner that is a player, play animation for that player.
|
|
||||||
if (UTIL_IsPlayer(amx, pWeapon->v.owner))
|
|
||||||
pWeapon->v.owner->v.weaponanim = USP_DETACHSILENCEANIM;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +419,7 @@ static cell AMX_NATIVE_CALL cs_get_user_vip(AMX *amx, cell *params) // cs_get_us
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( *((int *)pPlayer->pvPrivateData + OFFSET_VIP) & PLAYER_IS_VIP )
|
if ((int)((int *)pPlayer->pvPrivateData + OFFSET_VIP) == PLAYER_IS_VIP)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -476,9 +448,9 @@ static cell AMX_NATIVE_CALL cs_set_user_vip(AMX *amx, cell *params) // cs_set_us
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params[2])
|
if (params[2])
|
||||||
*((int *)pPlayer->pvPrivateData + OFFSET_VIP) |= PLAYER_IS_VIP;
|
*((int *)pPlayer->pvPrivateData + OFFSET_VIP) = PLAYER_IS_VIP;
|
||||||
else
|
else
|
||||||
*((int *)pPlayer->pvPrivateData + OFFSET_VIP) &= ~PLAYER_IS_VIP;
|
*((int *)pPlayer->pvPrivateData + OFFSET_VIP) = PLAYER_IS_NOT_VIP;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -946,7 +918,7 @@ static cell AMX_NATIVE_CALL cs_set_user_backpackammo(AMX *amx, cell *params) //
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_get_user_nvg(AMX *amx, cell *params) // cs_get_user_nvg(index); = 1 param
|
static cell AMX_NATIVE_CALL cs_get_user_nvgoggles(AMX *amx, cell *params) // cs_get_user_nvgoggles(index); = 1 param
|
||||||
{
|
{
|
||||||
// Does user have night vision goggles?
|
// Does user have night vision goggles?
|
||||||
// params[1] = user index
|
// params[1] = user index
|
||||||
@ -973,7 +945,7 @@ static cell AMX_NATIVE_CALL cs_get_user_nvg(AMX *amx, cell *params) // cs_get_us
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_set_user_nvg(AMX *amx, cell *params) // cs_set_user_nvg(index, nvgoggles = 1); = 2 params
|
static cell AMX_NATIVE_CALL cs_set_user_nvgoggles(AMX *amx, cell *params) // cs_set_user_nvgoggles(index, nvgoggles = 1); = 2 params
|
||||||
{
|
{
|
||||||
// Give/take nvgoggles..
|
// Give/take nvgoggles..
|
||||||
// params[1] = user index
|
// params[1] = user index
|
||||||
@ -1204,88 +1176,35 @@ static cell AMX_NATIVE_CALL cs_set_hostage_follow(AMX *amx, cell *params) // cs_
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_get_weapon_ammo(AMX *amx, cell *params) // cs_get_weapon_ammo(index); = 1 param
|
|
||||||
{
|
|
||||||
// Get amount of ammo in weapon's clip
|
|
||||||
// params[1] = weapon index
|
|
||||||
|
|
||||||
// Valid entity should be within range
|
|
||||||
if (params[1] < 1 || params[1] > gpGlobals->maxEntities)
|
|
||||||
{
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make into edict pointer
|
|
||||||
edict_t *pWeapon = INDEXENT(params[1]);
|
|
||||||
|
|
||||||
// Check entity validity
|
|
||||||
if (FNullEnt(pWeapon)) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *((int *)pWeapon->pvPrivateData + OFFSET_CLIPAMMO);
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_set_weapon_ammo(AMX *amx, cell *params) // cs_set_weapon_ammo(index, newammo); = 2 params
|
|
||||||
{
|
|
||||||
// Set amount of ammo in weapon's clip
|
|
||||||
// params[1] = weapon index
|
|
||||||
// params[2] = newammo
|
|
||||||
|
|
||||||
// Valid entity should be within range
|
|
||||||
if (params[1] < 1 || params[1] > gpGlobals->maxEntities)
|
|
||||||
{
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make into edict pointer
|
|
||||||
edict_t *pWeapon = INDEXENT(params[1]);
|
|
||||||
|
|
||||||
// Check entity validity
|
|
||||||
if (FNullEnt(pWeapon)) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
*((int *)pWeapon->pvPrivateData + OFFSET_CLIPAMMO) = params[2];
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
AMX_NATIVE_INFO cstrike_Exports[] = {
|
AMX_NATIVE_INFO cstrike_Exports[] = {
|
||||||
{"cs_set_user_money", cs_set_user_money},
|
{"cs_set_user_money", cs_set_user_money},
|
||||||
{"cs_get_user_money", cs_get_user_money},
|
{"cs_get_user_money", cs_get_user_money},
|
||||||
{"cs_get_user_deaths", cs_get_user_deaths},
|
{"cs_get_user_deaths", cs_get_user_deaths},
|
||||||
{"cs_set_user_deaths", cs_set_user_deaths},
|
{"cs_set_user_deaths", cs_set_user_deaths},
|
||||||
{"cs_get_hostage_id", cs_get_hostage_id},
|
{"cs_get_hostage_id", cs_get_hostage_id},
|
||||||
{"cs_get_weapon_silen", cs_get_weapon_silenced},
|
{"cs_get_weapon_silenced", cs_get_weapon_silenced},
|
||||||
{"cs_set_weapon_silen", cs_set_weapon_silenced},
|
{"cs_set_weapon_silenced", cs_set_weapon_silenced},
|
||||||
{"cs_get_weapon_burst", cs_get_weapon_burstmode},
|
{"cs_get_weapon_burstmode", cs_get_weapon_burstmode},
|
||||||
{"cs_set_weapon_burst", cs_set_weapon_burstmode},
|
{"cs_set_weapon_burstmode", cs_set_weapon_burstmode},
|
||||||
{"cs_get_user_vip", cs_get_user_vip},
|
{"cs_get_user_vip", cs_get_user_vip},
|
||||||
{"cs_set_user_vip", cs_set_user_vip},
|
{"cs_set_user_vip", cs_set_user_vip},
|
||||||
{"cs_get_user_team", cs_get_user_team},
|
{"cs_get_user_team", cs_get_user_team},
|
||||||
{"cs_set_user_team", cs_set_user_team},
|
{"cs_set_user_team", cs_set_user_team},
|
||||||
{"cs_get_user_buyzone", cs_get_user_inside_buyzone},
|
{"cs_get_user_inside_buyzone", cs_get_user_inside_buyzone},
|
||||||
{"cs_get_user_plant", cs_get_user_plant},
|
{"cs_get_user_plant", cs_get_user_plant},
|
||||||
{"cs_set_user_plant", cs_set_user_plant},
|
{"cs_set_user_plant", cs_set_user_plant},
|
||||||
{"cs_get_user_defuse", cs_get_user_defusekit},
|
{"cs_get_user_defusekit", cs_get_user_defusekit},
|
||||||
{"cs_set_user_defuse", cs_set_user_defusekit},
|
{"cs_set_user_defusekit", cs_set_user_defusekit},
|
||||||
{"cs_get_user_bpammo", cs_get_user_backpackammo},
|
{"cs_get_user_backpackammo", cs_get_user_backpackammo},
|
||||||
{"cs_set_user_bpammo", cs_set_user_backpackammo},
|
{"cs_set_user_backpackammo", cs_set_user_backpackammo},
|
||||||
{"cs_get_user_nvg", cs_get_user_nvg},
|
{"cs_get_user_nvgoggles", cs_get_user_nvgoggles},
|
||||||
{"cs_set_user_nvg", cs_set_user_nvg},
|
{"cs_set_user_nvgoggles", cs_set_user_nvgoggles},
|
||||||
{"cs_get_hostage_foll", cs_get_hostage_follow},
|
{"cs_get_hostage_follow", cs_get_hostage_follow},
|
||||||
{"cs_set_hostage_foll", cs_set_hostage_follow},
|
{"cs_set_hostage_follow", cs_set_hostage_follow},
|
||||||
|
|
||||||
{"cs_get_user_model", cs_get_user_model},
|
{"cs_get_user_model", cs_get_user_model},
|
||||||
{"cs_set_user_model", cs_set_user_model},
|
{"cs_set_user_model", cs_set_user_model},
|
||||||
{"cs_reset_user_model", cs_reset_user_model},
|
{"cs_reset_user_model", cs_reset_user_model},
|
||||||
{"cs_set_weapon_ammo", cs_set_weapon_ammo},
|
|
||||||
{"cs_get_weapon_ammo", cs_get_weapon_ammo},
|
|
||||||
//------------------- <-- max 19 characters!
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1338,7 +1257,7 @@ void PlayerPostThink(edict_t* pPlayer) {
|
|||||||
|
|
||||||
if(g_players[entityIndex].GetModelled()) {
|
if(g_players[entityIndex].GetModelled()) {
|
||||||
if (g_players[entityIndex].GetInspectModel() && strcmp(g_players[entityIndex].GetModel(), GETCLIENTKEYVALUE(GETINFOKEYBUFFER(pPlayer), "model")) != 0) {
|
if (g_players[entityIndex].GetInspectModel() && strcmp(g_players[entityIndex].GetModel(), GETCLIENTKEYVALUE(GETINFOKEYBUFFER(pPlayer), "model")) != 0) {
|
||||||
//LOG_CONSOLE(PLID, "%s should have model %s and currently has %s", STRING(pPlayer->v.netname), (char*)g_players[entityIndex].GetModel(), GETCLIENTKEYVALUE(GETINFOKEYBUFFER(pPlayer), "model"));
|
LOG_CONSOLE(PLID, "%s should have model %s and currently has %s", STRING(pPlayer->v.netname), (char*)g_players[entityIndex].GetModel(), GETCLIENTKEYVALUE(GETINFOKEYBUFFER(pPlayer), "model"));
|
||||||
SETCLIENTKEYVALUE(entityIndex, GETINFOKEYBUFFER(pPlayer), "model", (char*)g_players[entityIndex].GetModel());
|
SETCLIENTKEYVALUE(entityIndex, GETINFOKEYBUFFER(pPlayer), "model", (char*)g_players[entityIndex].GetModel());
|
||||||
g_players[entityIndex].SetInspectModel(false);
|
g_players[entityIndex].SetInspectModel(false);
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,10 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"Release/cstrike_amxx.dll"
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Cmds=echo Copying dll... copy Release\cstrike.dll K:\S\cstrike\addons\amxx\modules\cstrike_amx.dll echo Copying inc... copy ..\plugins\include\cstrike.inc K:\S\cstrike\addons\amxx\scripting\include\
|
PostBuild_Cmds=echo Copying dll... copy Release\cstrike_amxx.dll K:\S\cstrike\addons\amx\dlls echo Copying inc... copy cstrike_amxx.inc K:\S\cstrike\addons\amx\examples\include
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "cstrike - Win32 Debug"
|
!ELSEIF "$(CFG)" == "cstrike - Win32 Debug"
|
||||||
@ -83,7 +83,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/cstrike_amx_debug.dll" /pdbtype:sept
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/cstrike_amxx_debug.dll" /pdbtype:sept
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ SOURCE=.\CstrikePlayer.h
|
|||||||
# End Group
|
# End Group
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\plugins\include\cstrike.inc
|
SOURCE=.\cstrike_amxx.inc
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define __cswonbuild__ // comment when compiling for STEAM
|
//#define __cswonbuild__ // comment when compiling for STEAM
|
||||||
|
|
||||||
/* AMX Mod X
|
/* AMX Mod X
|
||||||
* Counter-Strike Module
|
* Counter-Strike Module
|
||||||
@ -66,11 +66,11 @@ pfnmodule_engine_g* g_engModuleFunc;
|
|||||||
|
|
||||||
#define NAME "Counter-Strike"
|
#define NAME "Counter-Strike"
|
||||||
#define AUTHOR "AMX Mod X Dev Team"
|
#define AUTHOR "AMX Mod X Dev Team"
|
||||||
#if defined __cswonbuild__
|
#if defined CS_WON_BUILD
|
||||||
#define VERSION "0.16 WON" // change both these versions
|
#define VERSION "0.1 WON" // change both these versions
|
||||||
#else
|
#else
|
||||||
#define VERSION "0.16 STEAM" // change both these versions
|
#define VERSION "0.1" // change both these versions
|
||||||
#endif // defined __cswonbuild__
|
#endif // defined CS_WON_BUILD
|
||||||
#define URL "http://www.amxmodx.org"
|
#define URL "http://www.amxmodx.org"
|
||||||
#define LOGTAG "AMXCS"
|
#define LOGTAG "AMXCS"
|
||||||
#define DATE __DATE__
|
#define DATE __DATE__
|
||||||
@ -112,10 +112,9 @@ pfnmodule_engine_g* g_engModuleFunc;
|
|||||||
#define OFFSET_CSDEATHS 448 + EXTRAOFFSET // differs -1 from STEAM
|
#define OFFSET_CSDEATHS 448 + EXTRAOFFSET // differs -1 from STEAM
|
||||||
// "weapon_*" entities
|
// "weapon_*" entities
|
||||||
#define OFFSET_WEAPONTYPE 43 + EXTRAOFFSET // same as STEAM
|
#define OFFSET_WEAPONTYPE 43 + EXTRAOFFSET // same as STEAM
|
||||||
#define OFFSET_CLIPAMMO 51 + EXTRAOFFSET // same as STEAM
|
|
||||||
#define OFFSET_SILENCER_FIREMODE 70 + EXTRAOFFSET // differs -4 from STEAM
|
#define OFFSET_SILENCER_FIREMODE 70 + EXTRAOFFSET // differs -4 from STEAM
|
||||||
// "hostage_entity" entities
|
// "hostage_entity" entities
|
||||||
#define OFFSET_HOSTAGEFOLLOW 86 + EXTRAOFFSET // same as STEAM
|
//#define OFFSET_HOSTAGEFOLLOW 86 + EXTRAOFFSET // NOT YET CHECKED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! find out before build
|
||||||
#define OFFSET_HOSTAGEID 487 + EXTRAOFFSET // same as STEAM
|
#define OFFSET_HOSTAGEID 487 + EXTRAOFFSET // same as STEAM
|
||||||
#else // from here STEAM build looks for offsets
|
#else // from here STEAM build looks for offsets
|
||||||
// "player" entities
|
// "player" entities
|
||||||
@ -144,7 +143,6 @@ pfnmodule_engine_g* g_engModuleFunc;
|
|||||||
#define OFFSET_CSDEATHS 449 + EXTRAOFFSET
|
#define OFFSET_CSDEATHS 449 + EXTRAOFFSET
|
||||||
// "weapon_*" entities
|
// "weapon_*" entities
|
||||||
#define OFFSET_WEAPONTYPE 43 + EXTRAOFFSET
|
#define OFFSET_WEAPONTYPE 43 + EXTRAOFFSET
|
||||||
#define OFFSET_CLIPAMMO 51 + EXTRAOFFSET
|
|
||||||
#define OFFSET_SILENCER_FIREMODE 74 + EXTRAOFFSET
|
#define OFFSET_SILENCER_FIREMODE 74 + EXTRAOFFSET
|
||||||
// "hostage_entity" entities
|
// "hostage_entity" entities
|
||||||
#define OFFSET_HOSTAGEFOLLOW 86 + EXTRAOFFSET
|
#define OFFSET_HOSTAGEFOLLOW 86 + EXTRAOFFSET
|
||||||
@ -201,19 +199,18 @@ pfnmodule_engine_g* g_engModuleFunc;
|
|||||||
//#define CSW_KNIFE 29
|
//#define CSW_KNIFE 29
|
||||||
#define CSW_P90 30
|
#define CSW_P90 30
|
||||||
|
|
||||||
#define M4A1_SILENCED (1<<2)
|
#define M4A1_UNSILENCED 0
|
||||||
#define M4A1_ATTACHSILENCEANIM 6
|
#define M4A1_SILENCED 4
|
||||||
#define M4A1_DETACHSILENCEANIM 13
|
#define USP_UNSILENCED 0
|
||||||
#define USP_SILENCED (1<<0)
|
#define USP_SILENCED 1
|
||||||
#define USP_ATTACHSILENCEANIM 7
|
|
||||||
#define USP_DETACHSILENCEANIM 15
|
|
||||||
|
|
||||||
#define GLOCK_SEMIAUTOMATIC 0
|
#define GLOCK_SEMIAUTOMATIC 0
|
||||||
#define GLOCK_BURSTMODE 2
|
#define GLOCK_BURSTMODE 2
|
||||||
#define FAMAS_AUTOMATIC 0
|
#define FAMAS_AUTOMATIC 0
|
||||||
#define FAMAS_BURSTMODE 16
|
#define FAMAS_BURSTMODE 16
|
||||||
|
|
||||||
#define PLAYER_IS_VIP (1<<8)
|
#define PLAYER_IS_NOT_VIP 0
|
||||||
|
#define PLAYER_IS_VIP 256
|
||||||
|
|
||||||
#define TEAM_T 1
|
#define TEAM_T 1
|
||||||
#define TEAM_CT 2
|
#define TEAM_CT 2
|
||||||
|
@ -1,218 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="cstrike"
|
|
||||||
ProjectGUID="{AB148B92-4F47-42E6-8268-AB4E588EC6A2}"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory=".\Debug"
|
|
||||||
IntermediateDirectory=".\Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Debug/cstrike.pch"
|
|
||||||
AssemblerListingLocation=".\Debug/"
|
|
||||||
ObjectFile=".\Debug/"
|
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="Debug/cstrike_amx_debug.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\cstrike.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile=".\Debug/cstrike_amx_debug.pdb"
|
|
||||||
ImportLibrary=".\Debug/cstrike_amx_debug.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Debug/cstrike.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1053"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory=".\Release"
|
|
||||||
IntermediateDirectory=".\Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSTRIKE_EXPORTS"
|
|
||||||
StringPooling="TRUE"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
EnableFunctionLevelLinking="TRUE"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Release/cstrike.pch"
|
|
||||||
AssemblerListingLocation=".\Release/"
|
|
||||||
ObjectFile=".\Release/"
|
|
||||||
ProgramDataBaseFileName=".\Release/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="Release/cstrike_amx.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\cstrike.def"
|
|
||||||
ProgramDatabaseFile=".\Release/cstrike_amx.pdb"
|
|
||||||
ImportLibrary=".\Release/cstrike_amx.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Release/cstrike.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="echo Copying dll...
|
|
||||||
copy Release\cstrike_amx.dll K:\S\cstrike\addons\amx\dlls
|
|
||||||
echo Copying inc...
|
|
||||||
copy cstrike_amx.inc K:\S\cstrike\addons\amx\examples\include
|
|
||||||
"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1053"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
|
||||||
<File
|
|
||||||
RelativePath="cstrike.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;CSTRIKE_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;CSTRIKE_EXPORTS;$(NoInherit)"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="cstrike.def">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="CstrikePlayer.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;CSTRIKE_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;CSTRIKE_EXPORTS;$(NoInherit)"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
|
||||||
RelativePath="cstrike.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="CstrikePlayer.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
|
||||||
</Filter>
|
|
||||||
<File
|
|
||||||
RelativePath="cstrike_amx.inc">
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
@ -1,4 +1,4 @@
|
|||||||
MODNAME = engine_amx
|
MODNAME = engine_mm
|
||||||
SRCFILES = meta_api.cpp
|
SRCFILES = meta_api.cpp
|
||||||
|
|
||||||
EXTRA_LIBS_LINUX =
|
EXTRA_LIBS_LINUX =
|
||||||
@ -6,13 +6,12 @@ EXTRA_LIBS_WIN32 =
|
|||||||
EXTRA_LIBDIRS_LINUX = -Lextra/lib_linux
|
EXTRA_LIBDIRS_LINUX = -Lextra/lib_linux
|
||||||
EXTRA_LIBDIRS_WIN32 = -Lextra/lib_win32
|
EXTRA_LIBDIRS_WIN32 = -Lextra/lib_win32
|
||||||
|
|
||||||
EXTRA_INCLUDEDIRS = -Iextra/include -I../amxmodx
|
EXTRA_INCLUDEDIRS = -Iextra/include
|
||||||
|
|
||||||
EXTRA_FLAGS = -Dstrcmpi=strcasecmp
|
EXTRA_FLAGS = -Dstrcmpi=strcasecmp
|
||||||
|
|
||||||
AMXDIR=../amxmodx
|
|
||||||
SDKTOP=../hlsdk
|
SDKTOP=../hlsdk
|
||||||
METADIR=../metamodx
|
METADIR=../metamod/metamod
|
||||||
|
|
||||||
|
|
||||||
SDKSRC=$(SDKTOP)/SourceCode
|
SDKSRC=$(SDKTOP)/SourceCode
|
||||||
@ -26,7 +25,7 @@ else
|
|||||||
OS=LINUX
|
OS=LINUX
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC_LINUX=gcc-2.95
|
CC_LINUX=gcc
|
||||||
ifeq "$(OS)" "WIN32"
|
ifeq "$(OS)" "WIN32"
|
||||||
CC_WIN32=gcc
|
CC_WIN32=gcc
|
||||||
LD_WINDLL=dllwrap
|
LD_WINDLL=dllwrap
|
||||||
@ -53,34 +52,43 @@ else
|
|||||||
ASRCFILES := $(shell dir /b)
|
ASRCFILES := $(shell dir /b)
|
||||||
endif
|
endif
|
||||||
OBJ_LINUX := $(SRCFILES:%.cpp=$(OBJDIR_LINUX)/%.o)
|
OBJ_LINUX := $(SRCFILES:%.cpp=$(OBJDIR_LINUX)/%.o)
|
||||||
|
OBJC_LINUX := $(CSRCFILES:%.c=$(OBJDIR_LINUX)/%.o)
|
||||||
OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
||||||
|
OBJC_WIN32 := $(CSRCFILES:%.c=$(OBJDIR_WIN32)/%.o)
|
||||||
|
|
||||||
|
|
||||||
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
||||||
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG
|
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG -lstdc++
|
||||||
|
|
||||||
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(AMXDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
||||||
CFLAGS=-Wall -Wno-unknown-pragmas
|
CFLAGS=-Wall -Wno-unknown-pragmas
|
||||||
ODEF = -DOPT_TYPE=\"optimized\"
|
ODEF = -DOPT_TYPE=\"optimized\"
|
||||||
CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
|
CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
|
||||||
|
|
||||||
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
|
||||||
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
|
||||||
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
|
||||||
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
|
||||||
|
|
||||||
|
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c
|
||||||
|
$(DO_CC_LINUX)
|
||||||
|
|
||||||
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.cpp
|
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.cpp
|
||||||
$(DO_CC_LINUX)
|
$(DO_CC_LINUX)
|
||||||
|
|
||||||
|
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.c
|
||||||
|
$(DO_CC_WIN32)
|
||||||
|
|
||||||
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.cpp
|
$(OBJDIR_WIN32)/%.o: $(SRCDIR)/%.cpp
|
||||||
$(DO_CC_WIN32)
|
$(DO_CC_WIN32)
|
||||||
|
|
||||||
default: $(DEFAULT)
|
default: $(DEFAULT)
|
||||||
|
|
||||||
$(TARGET_LINUX): $(OBJDIR_LINUX) $(OBJ_LINUX)
|
$(TARGET_LINUX): $(OBJDIR_LINUX) $(OBJ_LINUX) $(OBJC_LINUX)
|
||||||
$(LINK_LINUX)
|
$(LINK_LINUX)
|
||||||
|
|
||||||
$(TARGET_WIN32): $(OBJDIR_WIN32) $(OBJ_WIN32)
|
$(TARGET_WIN32): $(OBJDIR_WIN32) $(OBJ_WIN32) $(OBJC_WIN32)
|
||||||
$(LINK_WIN32)
|
$(LINK_WIN32)
|
||||||
|
|
||||||
$(OBJDIR_LINUX):
|
$(OBJDIR_LINUX):
|
||||||
|
8
dlls/engine/build.sh
Executable file
8
dlls/engine/build.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
rm meta_api.o
|
||||||
|
rm engine.so
|
||||||
|
|
||||||
|
#use VexD's optimizations
|
||||||
|
|
||||||
|
gcc -static -march=i686 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fno-exceptions -fno-rtti -s -Wall -Wno-unknown-pragmas -DOPT_TYPE=\"optimized\" -lstdc++ -fPIC -I. -I../metamod/metamod -I../hlsdk/multiplayer/engine -I../hlsdk/multiplayer/common -I../hlsdk/multiplayer/pm_shared -I../hlsdk/multiplayer/dlls -I../hlsdk/multiplayer -I../amxmodx/ -c meta_api.cpp -o meta_api.o
|
||||||
|
|
||||||
|
gcc -static -march=i686 -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-exceptions -fno-rtti -s -Wall -Wno-unknown-pragmas -DOPT_TYPE=\"optimized\" -shared -ldl -lm -lstdc++ meta_api.o -o engine.so
|
@ -1,4 +1,4 @@
|
|||||||
LIBRARY engine_amx
|
LIBRARY engine_mm
|
||||||
EXPORTS
|
EXPORTS
|
||||||
GiveFnptrsToDll @1
|
GiveFnptrsToDll @1
|
||||||
Meta_Attach @2
|
Meta_Attach @2
|
@ -17,7 +17,7 @@ CFG=engine - Win32 Debug
|
|||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "engine_amx - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "engine_mm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE "engine - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "engine - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ CPP=cl.exe
|
|||||||
MTL=midl.exe
|
MTL=midl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "engine_amx - Win32 Release"
|
!IF "$(CFG)" == "engine_mm - Win32 Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
@ -52,7 +52,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"release/engine_amx.dll"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"release/engine_mm.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "engine - Win32 Debug"
|
!ELSEIF "$(CFG)" == "engine - Win32 Debug"
|
||||||
|
|
||||||
@ -83,21 +83,21 @@ LINK32=link.exe
|
|||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "engine_amx - Win32 Release"
|
# Name "engine_mm - Win32 Release"
|
||||||
# Name "engine - Win32 Debug"
|
# Name "engine - Win32 Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\meta_api.cpp
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\meta_api.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\engine.h
|
SOURCE=.\engine.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
@ -110,7 +110,7 @@ SOURCE=.\engine.inc
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\engine_amx.def
|
SOURCE=.\engine.def
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
|
@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "engine_amx"=".\engine.dsp" - Package Owner=<4>
|
Project: "engine_mm"=".\engine.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
|
@ -32,12 +32,16 @@
|
|||||||
* version.
|
* version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define VERSION "0.16"
|
#define VERSION "0.1"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
plugin_info_t Plugin_info = {
|
plugin_info_t Plugin_info = {
|
||||||
|
|
||||||
META_INTERFACE_VERSION, // ifvers
|
META_INTERFACE_VERSION, // ifvers
|
||||||
"ENGINE", // name
|
"Engine", // name
|
||||||
VERSION, // version
|
VERSION, // version
|
||||||
__DATE__, // date
|
__DATE__, // date
|
||||||
"AMX Mod X Dev Team", // author
|
"AMX Mod X Dev Team", // author
|
||||||
@ -49,7 +53,7 @@ plugin_info_t Plugin_info = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module_info_s module_info = {
|
module_info_s module_info = {
|
||||||
"ENGINE", // name
|
"Engine", // name
|
||||||
"AMX Mod X Dev Team", // author
|
"AMX Mod X Dev Team", // author
|
||||||
VERSION, // version
|
VERSION, // version
|
||||||
AMX_INTERFACE_VERSION,
|
AMX_INTERFACE_VERSION,
|
||||||
@ -111,8 +115,6 @@ int thread_fork(void *arg);
|
|||||||
|
|
||||||
#define AMS_OFFSET 0.01
|
#define AMS_OFFSET 0.01
|
||||||
|
|
||||||
#define GETINFOKEYBUFFER (*g_engfuncs.pfnGetInfoKeyBuffer)
|
|
||||||
|
|
||||||
#define SPEAK_NORMAL 0
|
#define SPEAK_NORMAL 0
|
||||||
#define SPEAK_MUTED 1
|
#define SPEAK_MUTED 1
|
||||||
#define SPEAK_ALL 2
|
#define SPEAK_ALL 2
|
||||||
@ -129,52 +131,6 @@ int thread_fork(void *arg);
|
|||||||
#define BLOCK_ONCE 1
|
#define BLOCK_ONCE 1
|
||||||
#define BLOCK_SET 2
|
#define BLOCK_SET 2
|
||||||
|
|
||||||
//jghg
|
|
||||||
enum globals {
|
|
||||||
// Edict
|
|
||||||
GL_trace_ent = 0,
|
|
||||||
|
|
||||||
// Float
|
|
||||||
GL_coop,
|
|
||||||
GL_deathmatch,
|
|
||||||
GL_force_retouch,
|
|
||||||
GL_found_secrets,
|
|
||||||
GL_frametime,
|
|
||||||
GL_serverflags,
|
|
||||||
GL_teamplay,
|
|
||||||
GL_time,
|
|
||||||
GL_trace_allsolid,
|
|
||||||
GL_trace_fraction,
|
|
||||||
GL_trace_inopen,
|
|
||||||
GL_trace_inwater,
|
|
||||||
GL_trace_plane_dist,
|
|
||||||
GL_trace_startsolid,
|
|
||||||
|
|
||||||
// Int
|
|
||||||
GL_cdAudioTrack,
|
|
||||||
GL_maxClients,
|
|
||||||
GL_maxEntities,
|
|
||||||
GL_msg_entity,
|
|
||||||
GL_trace_flags,
|
|
||||||
GL_trace_hitgroup,
|
|
||||||
|
|
||||||
// String
|
|
||||||
GL_pStringBase,
|
|
||||||
GL_mapname,
|
|
||||||
GL_startspot,
|
|
||||||
|
|
||||||
// Vector
|
|
||||||
GL_trace_endpos,
|
|
||||||
GL_trace_plane_normal,
|
|
||||||
GL_v_forward,
|
|
||||||
GL_v_right,
|
|
||||||
GL_v_up,
|
|
||||||
GL_vecLandmarkOffset,
|
|
||||||
|
|
||||||
// Void (not supported)
|
|
||||||
GL_pSaveData
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
gamestate,
|
gamestate,
|
||||||
oldbuttons,
|
oldbuttons,
|
||||||
@ -356,7 +312,6 @@ enum {
|
|||||||
arg_entity,
|
arg_entity,
|
||||||
};
|
};
|
||||||
|
|
||||||
//by BAILOPAN
|
|
||||||
class argStack {
|
class argStack {
|
||||||
public:
|
public:
|
||||||
argStack(argStack *p=NULL) //initialize with link to previous
|
argStack(argStack *p=NULL) //initialize with link to previous
|
||||||
@ -374,7 +329,6 @@ public:
|
|||||||
writeangle = 0.0;
|
writeangle = 0.0;
|
||||||
writecoord = 0.0;
|
writecoord = 0.0;
|
||||||
writeentity = 0;
|
writeentity = 0;
|
||||||
writestring = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
argStack* arg()
|
argStack* arg()
|
||||||
@ -390,13 +344,6 @@ public:
|
|||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
~argStack()
|
|
||||||
{
|
|
||||||
if (writestring != NULL) {
|
|
||||||
delete [] writestring;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void put(int arg_type, int i)
|
void put(int arg_type, int i)
|
||||||
{
|
{
|
||||||
argtype = arg_type;
|
argtype = arg_type;
|
||||||
@ -440,9 +387,7 @@ public:
|
|||||||
switch (argtype)
|
switch (argtype)
|
||||||
{
|
{
|
||||||
case arg_string:
|
case arg_string:
|
||||||
delete [] writestring;
|
writestring.append((char *)sz);
|
||||||
writestring = new char[strlen(sz)+1];
|
|
||||||
strcpy(writestring, sz);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -470,7 +415,7 @@ public:
|
|||||||
WRITE_COORD(writecoord);
|
WRITE_COORD(writecoord);
|
||||||
break;
|
break;
|
||||||
case arg_string:
|
case arg_string:
|
||||||
WRITE_STRING(writestring);
|
WRITE_STRING(writestring.c_str());
|
||||||
break;
|
break;
|
||||||
case arg_entity:
|
case arg_entity:
|
||||||
WRITE_ENTITY(writeentity);
|
WRITE_ENTITY(writeentity);
|
||||||
@ -521,7 +466,7 @@ public:
|
|||||||
switch (argtype)
|
switch (argtype)
|
||||||
{
|
{
|
||||||
case arg_string:
|
case arg_string:
|
||||||
return strlen(writestring);
|
return (writestring.length());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -532,7 +477,7 @@ public:
|
|||||||
switch (argtype)
|
switch (argtype)
|
||||||
{
|
{
|
||||||
case arg_string:
|
case arg_string:
|
||||||
return (const char*)writestring;
|
return writestring.c_str();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -726,20 +671,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroy()
|
|
||||||
{
|
|
||||||
argStack *p;
|
|
||||||
while (next != NULL) {
|
|
||||||
p = next->link();
|
|
||||||
delete next;
|
|
||||||
next = p;
|
|
||||||
}
|
|
||||||
if (p != NULL) {
|
|
||||||
delete p;
|
|
||||||
p = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int argtype;
|
int argtype;
|
||||||
int writebyte;
|
int writebyte;
|
||||||
@ -748,7 +679,7 @@ private:
|
|||||||
int writelong;
|
int writelong;
|
||||||
float writeangle;
|
float writeangle;
|
||||||
float writecoord;
|
float writecoord;
|
||||||
char *writestring;
|
std::string writestring;
|
||||||
int writeentity;
|
int writeentity;
|
||||||
argStack *next;
|
argStack *next;
|
||||||
};
|
};
|
||||||
@ -828,9 +759,16 @@ public:
|
|||||||
|
|
||||||
void Destroy()
|
void Destroy()
|
||||||
{
|
{
|
||||||
CHeadArg->destroy();
|
argStack *p;
|
||||||
delete CHeadArg;
|
|
||||||
CHeadArg = NULL;
|
p = CHeadArg->link();
|
||||||
|
|
||||||
|
while (p) {
|
||||||
|
argStack *n = p->link();
|
||||||
|
delete p;
|
||||||
|
p = n;
|
||||||
|
}
|
||||||
|
argcount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Set(int n, int arg_type, int data)
|
bool Set(int n, int arg_type, int data)
|
||||||
|
@ -1,188 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="engine"
|
|
||||||
ProjectGUID="{7CAE7BDF-52CB-49D0-B82E-568259869811}"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory=".\Release"
|
|
||||||
IntermediateDirectory=".\Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
|
|
||||||
StringPooling="TRUE"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
EnableFunctionLevelLinking="TRUE"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Release/engine.pch"
|
|
||||||
AssemblerListingLocation=".\Release/"
|
|
||||||
ObjectFile=".\Release/"
|
|
||||||
ProgramDataBaseFileName=".\Release/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="release/engine_amx.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\engine_amx.def"
|
|
||||||
ProgramDatabaseFile=".\Release/engine_amx.pdb"
|
|
||||||
ImportLibrary=".\Release/engine_amx.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Release/engine.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1033"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory=".\Debug"
|
|
||||||
IntermediateDirectory=".\Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ENGINE_EXPORTS"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Debug/engine.pch"
|
|
||||||
AssemblerListingLocation=".\Debug/"
|
|
||||||
ObjectFile=".\Debug/"
|
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile=".\Debug/engine.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\engine_amx.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile=".\Debug/engine.pdb"
|
|
||||||
ImportLibrary=".\Debug/engine.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Debug/engine.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1033"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
|
||||||
RelativePath="engine.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="meta_api.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;ENGINE_EXPORTS;$(NoInherit)"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;ENGINE_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
|
||||||
<File
|
|
||||||
RelativePath="engine_amx.def">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="engine.inc">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
MODNAME = fun_amx
|
MODNAME = fun_mm
|
||||||
SRCFILES = fun.cpp
|
SRCFILES = fun.cpp
|
||||||
|
|
||||||
EXTRA_LIBS_LINUX =
|
EXTRA_LIBS_LINUX =
|
||||||
@ -12,7 +12,7 @@ EXTRA_FLAGS = -Dstrcmpi=strcasecmp
|
|||||||
|
|
||||||
AMXDIR=../amxmodx
|
AMXDIR=../amxmodx
|
||||||
SDKTOP=../hlsdk
|
SDKTOP=../hlsdk
|
||||||
METADIR=../metamodx
|
METADIR=../metamod/metamod
|
||||||
|
|
||||||
|
|
||||||
SDKSRC=$(SDKTOP)/SourceCode
|
SDKSRC=$(SDKTOP)/SourceCode
|
||||||
@ -26,7 +26,7 @@ else
|
|||||||
OS=LINUX
|
OS=LINUX
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC_LINUX=gcc-2.95
|
CC_LINUX=gcc
|
||||||
ifeq "$(OS)" "WIN32"
|
ifeq "$(OS)" "WIN32"
|
||||||
CC_WIN32=gcc
|
CC_WIN32=gcc
|
||||||
LD_WINDLL=dllwrap
|
LD_WINDLL=dllwrap
|
||||||
@ -57,7 +57,7 @@ OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o)
|
|||||||
|
|
||||||
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
CCOPT = -march=i586 -O6 -ffast-math -funroll-loops \
|
||||||
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
|
||||||
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG
|
-malign-jumps=2 -malign-functions=2 -s -DNDEBUG -lstdc++
|
||||||
|
|
||||||
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(AMXDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(AMXDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS)
|
||||||
CFLAGS=-Wall -Wno-unknown-pragmas
|
CFLAGS=-Wall -Wno-unknown-pragmas
|
||||||
|
279
dlls/fun/fun.cpp
279
dlls/fun/fun.cpp
@ -67,18 +67,6 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ######## Utils:
|
|
||||||
void FUNUTIL_ResetPlayer(int index)
|
|
||||||
{
|
|
||||||
// Reset silent slippers
|
|
||||||
g_silent[index] = false;
|
|
||||||
|
|
||||||
// Reset hitzones
|
|
||||||
g_zones_toHit[index] = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG);
|
|
||||||
g_zones_getHit[index] = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ######## Natives:
|
|
||||||
static cell AMX_NATIVE_CALL get_client_listening(AMX *amx, cell *params) // get_client_listening(receiver, sender); = 2 params
|
static cell AMX_NATIVE_CALL get_client_listening(AMX *amx, cell *params) // get_client_listening(receiver, sender); = 2 params
|
||||||
{
|
{
|
||||||
// Gets who can listen to who.
|
// Gets who can listen to who.
|
||||||
@ -213,46 +201,19 @@ static cell AMX_NATIVE_CALL give_item(AMX *amx, cell *params) // native give_ite
|
|||||||
int length;
|
int length;
|
||||||
const char *szItem = GET_AMXSTRING(amx, params[2], 1, length);
|
const char *szItem = GET_AMXSTRING(amx, params[2], 1, length);
|
||||||
|
|
||||||
//check for valid item
|
|
||||||
if (strncmp(szItem, "weapon_", 7) &&
|
|
||||||
strncmp(szItem, "ammo_", 5) &&
|
|
||||||
strncmp(szItem, "item_", 5)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//string_t item = MAKE_STRING(szItem);
|
//string_t item = MAKE_STRING(szItem);
|
||||||
string_t item = ALLOC_STRING(szItem); // Using MAKE_STRING makes "item" contents get lost when we leave this scope! ALLOC_STRING seems to allocate properly...
|
string_t item = ALLOC_STRING(szItem); // Using MAKE_STRING makes "item" contents get lost when we leave this scope! ALLOC_STRING seems to allocate properly...
|
||||||
|
|
||||||
// Create the entity, returns to pointer
|
// Create the entity, returns to pointer
|
||||||
pItemEntity = CREATE_NAMED_ENTITY(item);
|
pItemEntity = CREATE_NAMED_ENTITY(item);
|
||||||
|
|
||||||
//VARS(pItemEntity)->origin = VARS(pPlayer)->origin; // nice to do VARS(ent)->origin instead of ent->v.origin? :-I
|
VARS(pItemEntity)->origin = VARS(pPlayer)->origin; // nice to do VARS(ent)->origin instead of ent->v.origin? :-I
|
||||||
//I'm not sure, normally I use macros too =P
|
pItemEntity->v.spawnflags |= SF_NORESPAWN;
|
||||||
pItemEntity->v.origin = pPlayer->v.origin;
|
|
||||||
pItemEntity->v.spawnflags |= (1<<30); //SF_NORESPAWN;
|
|
||||||
|
|
||||||
MDLL_Spawn(pItemEntity);
|
MDLL_Spawn(pItemEntity);
|
||||||
|
|
||||||
int save = pItemEntity->v.solid;
|
|
||||||
|
|
||||||
MDLL_Touch(pItemEntity, ENT(pPlayer));
|
MDLL_Touch(pItemEntity, ENT(pPlayer));
|
||||||
|
|
||||||
//The problem with the original give_item was the
|
return 1;
|
||||||
// item was not removed. I had tried this but it
|
|
||||||
// did not work. OLO's implementation is better.
|
|
||||||
/*
|
|
||||||
int iEnt = ENTINDEX(pItemEntity->v.owner);
|
|
||||||
if (iEnt > 32 || iEnt <1 ) {
|
|
||||||
MDLL_Think(pItemEntity);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (pItemEntity->v.solid == save) {
|
|
||||||
REMOVE_ENTITY(pItemEntity);
|
|
||||||
//the function did not fail - we're just deleting the item
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ENTINDEX(pItemEntity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL spawn(AMX *amx, cell *params) // spawn(id) = 1 param
|
static cell AMX_NATIVE_CALL spawn(AMX *amx, cell *params) // spawn(id) = 1 param
|
||||||
@ -431,8 +392,6 @@ static cell AMX_NATIVE_CALL set_user_maxspeed(AMX *amx, cell *params) // set_use
|
|||||||
// params[1] = index
|
// params[1] = index
|
||||||
// params[2] = speed (should be -1.0 if not specified) (JGHG: unspecified parameters seems to always be -1.0!)
|
// params[2] = speed (should be -1.0 if not specified) (JGHG: unspecified parameters seems to always be -1.0!)
|
||||||
|
|
||||||
float fNewSpeed = *(float *)((void *)¶ms[2]);
|
|
||||||
|
|
||||||
// Check index
|
// Check index
|
||||||
if (params[1] < 1 || params[1] > gpGlobals->maxClients)
|
if (params[1] < 1 || params[1] > gpGlobals->maxClients)
|
||||||
{
|
{
|
||||||
@ -449,8 +408,7 @@ static cell AMX_NATIVE_CALL set_user_maxspeed(AMX *amx, cell *params) // set_use
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pPlayer->v.maxspeed = ; // JGHG: Gotta love the way to get floats from parameters :-P
|
//pPlayer->v.maxspeed = ; // JGHG: Gotta love the way to get floats from parameters :-P
|
||||||
SETCLIENTMAXSPEED(pPlayer, fNewSpeed);
|
SETCLIENTMAXSPEED(pPlayer, *(float *)((void *)¶ms[2]));
|
||||||
pPlayer->v.maxspeed = fNewSpeed;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -526,101 +484,21 @@ static cell AMX_NATIVE_CALL get_user_gravity(AMX *amx, cell *params) // Float:ge
|
|||||||
return *(cell*)((void *)&(pPlayer->v.gravity)); // The way to return floats... (sigh)
|
return *(cell*)((void *)&(pPlayer->v.gravity)); // The way to return floats... (sigh)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static cell AMX_NATIVE_CALL set_hitzones(AMX *amx, cell *params) // set_hitzones(body = 255) = 1 argument
|
static cell AMX_NATIVE_CALL set_hitzones(AMX *amx, cell *params) // set_hitzones(body = 255) = 1 argument
|
||||||
{
|
{
|
||||||
// Sets "hitable" zones.
|
// Gets user gravity.
|
||||||
// params[1] = body hitzones
|
// params[1] = body hitzones
|
||||||
|
|
||||||
//native set_user_hitzones(index=0,target=0,body=255);
|
// Fetch player pointer
|
||||||
//set_user_hitzones(id, 0, 0) // Makes ID not able to shoot EVERYONE - id can shoot on 0 (all) at 0
|
|
||||||
//set_user_hitzones(0, id, 0) // Makes EVERYONE not able to shoot ID - 0 (all) can shoot id at 0
|
|
||||||
|
|
||||||
g_body = params[1];
|
g_body = params[1];
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*static cell AMX_NATIVE_CALL get_hitzones(AMX *amx, cell *params) // get_hitzones() = 0 arguments
|
static cell AMX_NATIVE_CALL get_hitzones(AMX *amx, cell *params) // get_hitzones() = 0 arguments
|
||||||
{
|
{
|
||||||
// Gets hitzones.
|
// Gets hitzones.
|
||||||
return g_body;
|
return g_body;
|
||||||
}*/
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL set_user_hitzones(AMX *amx, cell *params) // set_user_hitzones(index = 0, target = 0, body = 255); = 3 arguments
|
|
||||||
{
|
|
||||||
// Sets user hitzones.
|
|
||||||
// params[1] = the one(s) who shoot(s), shooter
|
|
||||||
int shooter = params[1];
|
|
||||||
if (shooter == -1)
|
|
||||||
shooter = 0;
|
|
||||||
// params[2] = the one getting hit
|
|
||||||
int gettingHit = params[2];
|
|
||||||
if (gettingHit == -1)
|
|
||||||
gettingHit = 0;
|
|
||||||
// params[3] = specified hit zones
|
|
||||||
int hitzones = params[3];
|
|
||||||
if (hitzones == -1)
|
|
||||||
hitzones = 255;
|
|
||||||
|
|
||||||
//set_user_hitzones(id, 0, 0) // Makes ID not able to shoot EVERYONE - id can shoot on 0 (all) at 0
|
|
||||||
//set_user_hitzones(0, id, 0) // Makes EVERYONE not able to shoot ID - 0 (all) can shoot id at 0
|
|
||||||
if (shooter == 0 && gettingHit == 0) {
|
|
||||||
// set hitzones for ALL, both where people can hit and where they can _get_ hit.
|
|
||||||
for (int i = 1; i <= 32; i++) {
|
|
||||||
g_zones_toHit[i] = hitzones;
|
|
||||||
g_zones_getHit[i] = hitzones;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (shooter == 0) {
|
|
||||||
// "All" shooters, target (gettingHit) should be existing player id
|
|
||||||
if (gettingHit < 1 || gettingHit > gpGlobals->maxClients) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
// Where can gettingHit get hit by all?
|
|
||||||
g_zones_getHit[gettingHit] = hitzones;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// "shooter" will now only be able to hit other people in "hitzones". (target should be 0 here)
|
|
||||||
g_zones_toHit[shooter] = hitzones;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL get_user_hitzones(AMX *amx, cell *params) // get_user_hitzones(index, target); = 2 arguments
|
|
||||||
{
|
|
||||||
// Gets user hitzones.
|
|
||||||
// params[1] = if this is not 0, return what zones this player can hit
|
|
||||||
int shooter = params[1];
|
|
||||||
// params[2] = if shooter was 0, and if this is a player, return what zones this player can get hit in, else... make runtime error?
|
|
||||||
int gettingHit = params[2];
|
|
||||||
|
|
||||||
if (shooter) {
|
|
||||||
if (FNullEnt(shooter)) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return g_zones_toHit[shooter];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!gettingHit) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (FNullEnt(gettingHit)) {
|
|
||||||
AMX_RAISEERROR(amx, AMX_ERR_NATIVE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return g_zones_getHit[gettingHit];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL set_user_noclip(AMX *amx, cell *params) // set_user_noclip(index, noclip = 0); = 2 arguments
|
static cell AMX_NATIVE_CALL set_user_noclip(AMX *amx, cell *params) // set_user_noclip(index, noclip = 0); = 2 arguments
|
||||||
@ -703,11 +581,11 @@ static cell AMX_NATIVE_CALL set_user_footsteps(AMX *amx, cell *params) // set_us
|
|||||||
|
|
||||||
if (params[2]) {
|
if (params[2]) {
|
||||||
pPlayer->v.flTimeStepSound = 999;
|
pPlayer->v.flTimeStepSound = 999;
|
||||||
g_silent[params[1]] = true;
|
silent[params[1]] = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pPlayer->v.flTimeStepSound = STANDARDTIMESTEPSOUND;
|
pPlayer->v.flTimeStepSound = STANDARDTIMESTEPSOUND;
|
||||||
g_silent[params[1]] = false;
|
silent[params[1]] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -729,8 +607,8 @@ AMX_NATIVE_INFO fun_Exports[] = {
|
|||||||
{"get_user_maxspeed", get_user_maxspeed},
|
{"get_user_maxspeed", get_user_maxspeed},
|
||||||
{"set_user_gravity", set_user_gravity},
|
{"set_user_gravity", set_user_gravity},
|
||||||
{"get_user_gravity", get_user_gravity},
|
{"get_user_gravity", get_user_gravity},
|
||||||
{"set_user_hitzones", set_user_hitzones},
|
{"set_hitzones", set_hitzones},
|
||||||
{"get_user_hitzones", get_user_hitzones},
|
{"get_hitzones", get_hitzones},
|
||||||
{"set_user_noclip", set_user_noclip},
|
{"set_user_noclip", set_user_noclip},
|
||||||
{"get_user_noclip", get_user_noclip},
|
{"get_user_noclip", get_user_noclip},
|
||||||
{"set_user_footsteps", set_user_footsteps},
|
{"set_user_footsteps", set_user_footsteps},
|
||||||
@ -741,7 +619,7 @@ AMX_NATIVE_INFO fun_Exports[] = {
|
|||||||
/******************************************************************************************/
|
/******************************************************************************************/
|
||||||
void PlayerPreThink(edict_t *pEntity)
|
void PlayerPreThink(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
if (g_silent[ENTINDEX(pEntity)]) {
|
if (silent[ENTINDEX(pEntity)]) {
|
||||||
pEntity->v.flTimeStepSound = 999;
|
pEntity->v.flTimeStepSound = 999;
|
||||||
RETURN_META(MRES_HANDLED);
|
RETURN_META(MRES_HANDLED);
|
||||||
}
|
}
|
||||||
@ -749,46 +627,14 @@ void PlayerPreThink(edict_t *pEntity)
|
|||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <--- removed, only needed with akimbot
|
|
||||||
int ClientConnect(edict_t *pPlayer, const char *pszName, const char *pszAddress, char szRejectReason[128])
|
|
||||||
{
|
|
||||||
int index = ENTINDEX(pPlayer);
|
|
||||||
|
|
||||||
if (index < 1 || index > gpGlobals->maxClients) // This is probably not really necessary... but just in case to not cause out of bounds errors below.
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
// Find out if user is bot (this doesn't seem to be ever called when bot connects though, but leave it here)
|
|
||||||
const char* auth = GETPLAYERAUTHID(pPlayer);
|
|
||||||
|
|
||||||
if (strcmp(auth, "BOT") == 0)
|
|
||||||
g_bot[index] = true;
|
|
||||||
else
|
|
||||||
g_bot[index] = false;
|
|
||||||
|
|
||||||
// Reset stuff:
|
|
||||||
FUNUTIL_ResetPlayer(index);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClientDisconnect( edict_t *pEntity)
|
void ClientDisconnect( edict_t *pEntity)
|
||||||
{
|
{
|
||||||
int index = ENTINDEX(pEntity);
|
int index = ENTINDEX(pEntity);
|
||||||
|
silent[index] = false;
|
||||||
if (index < 1 || index > gpGlobals->maxClients) // This is probably not really necessary... but just in case to not cause out of bounds errors below.
|
|
||||||
RETURN_META(MRES_IGNORED);
|
|
||||||
|
|
||||||
// Reset stuff:
|
|
||||||
FUNUTIL_ResetPlayer(index);
|
|
||||||
|
|
||||||
// Set to be bot until proven not in ClientConnect
|
|
||||||
g_bot[index] = true;
|
|
||||||
|
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
DLL_FUNCTIONS gFunctionTable; /* = {
|
DLL_FUNCTIONS gFunctionTable = {
|
||||||
NULL, // pfnGameInit
|
NULL, // pfnGameInit
|
||||||
NULL, // pfnSpawn
|
NULL, // pfnSpawn
|
||||||
NULL, // pfnThink
|
NULL, // pfnThink
|
||||||
@ -807,7 +653,7 @@ DLL_FUNCTIONS gFunctionTable; /* = {
|
|||||||
NULL, // pfnRestoreGlobalState
|
NULL, // pfnRestoreGlobalState
|
||||||
NULL, // pfnResetGlobalState
|
NULL, // pfnResetGlobalState
|
||||||
|
|
||||||
ClientConnect, // pfnClientConnect
|
NULL, // pfnClientConnect
|
||||||
ClientDisconnect, // pfnClientDisconnect
|
ClientDisconnect, // pfnClientDisconnect
|
||||||
NULL, // pfnClientKill
|
NULL, // pfnClientKill
|
||||||
NULL, // pfnClientPutInServer
|
NULL, // pfnClientPutInServer
|
||||||
@ -849,7 +695,8 @@ DLL_FUNCTIONS gFunctionTable; /* = {
|
|||||||
NULL, // pfnCreateInstancedBaselines
|
NULL, // pfnCreateInstancedBaselines
|
||||||
NULL, // pfnInconsistentFile
|
NULL, // pfnInconsistentFile
|
||||||
NULL, // pfnAllowLagCompensation
|
NULL, // pfnAllowLagCompensation
|
||||||
};*/
|
};
|
||||||
|
|
||||||
C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion)
|
C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion)
|
||||||
{
|
{
|
||||||
if(!pFunctionTable) {
|
if(!pFunctionTable) {
|
||||||
@ -862,20 +709,13 @@ C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersi
|
|||||||
*interfaceVersion = INTERFACE_VERSION;
|
*interfaceVersion = INTERFACE_VERSION;
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//gFunctionTable.pfnClientConnect = ClientConnect; <--- removed, only needed with akimbot
|
|
||||||
//gFunctionTable.pfnClientDisconnect = ClientDisconnect; <--- removed, only needed with akimbot
|
|
||||||
//gFunctionTable.pfnClientPutInServer = ClientPutInServer;
|
|
||||||
gFunctionTable.pfnPlayerPreThink = PlayerPreThink;
|
|
||||||
|
|
||||||
memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS));
|
memcpy(pFunctionTable, &gFunctionTable, sizeof(DLL_FUNCTIONS));
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********/
|
/********/
|
||||||
|
|
||||||
/*void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
|
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
|
||||||
{
|
{
|
||||||
if (g_body == 255) {
|
if (g_body == 255) {
|
||||||
RETURN_META(MRES_IGNORED);
|
RETURN_META(MRES_IGNORED);
|
||||||
@ -890,58 +730,6 @@ C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersi
|
|||||||
|
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
|
|
||||||
{
|
|
||||||
/* from eiface.h:
|
|
||||||
// Returned by TraceLine
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int fAllSolid; // if true, plane is not valid
|
|
||||||
int fStartSolid; // if true, the initial point was in a solid area
|
|
||||||
int fInOpen;
|
|
||||||
int fInWater;
|
|
||||||
float flFraction; // time completed, 1.0 = didn't hit anything
|
|
||||||
vec3_t vecEndPos; // final position
|
|
||||||
float flPlaneDist;
|
|
||||||
vec3_t vecPlaneNormal; // surface normal at impact
|
|
||||||
edict_t *pHit; // entity the surface is on
|
|
||||||
int iHitgroup; // 0 == generic, non zero is specific body part
|
|
||||||
} TraceResult;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*if (g_bot[ENTINDEX(pentToSkip)]) <--- removed, only needed with akimbot
|
|
||||||
RETURN_META(MRES_IGNORED);*/
|
|
||||||
|
|
||||||
TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr); // pentToSkip gotta be the one that is shooting, so filter it
|
|
||||||
|
|
||||||
int hitIndex = ENTINDEX(ptr->pHit);
|
|
||||||
if (hitIndex >= 1 && hitIndex <= gpGlobals->maxClients) {
|
|
||||||
if ( !(
|
|
||||||
g_zones_getHit[hitIndex] & (1 << ptr->iHitgroup) // can ptr->pHit get hit in ptr->iHitgroup at all?
|
|
||||||
&& g_zones_toHit[hitIndex] & (1 << ptr->iHitgroup) ) // can pentToSkip hit other people in that hit zone?
|
|
||||||
) {
|
|
||||||
ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* if ( !(
|
|
||||||
g_zones_getHit[ENTINDEX(ptr->pHit)] & (1 << ptr->iHitgroup) // can ptr->pHit get hit in ptr->iHitgroup at all?
|
|
||||||
&& g_zones_toHit[ENTINDEX(pentToSkip)] & (1 << ptr->iHitgroup) ) // can pentToSkip hit other people in that hit zone?
|
|
||||||
) {
|
|
||||||
ptr->flFraction = 1.0; // set to not hit anything (1.0 = shot doesn't hit anything)
|
|
||||||
}*/
|
|
||||||
|
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
|
||||||
|
|
||||||
/*
|
|
||||||
MRES_IGNORED, // plugin didn't take any action
|
|
||||||
MRES_HANDLED, // plugin did something, but real function should still be called
|
|
||||||
MRES_OVERRIDE, // call real function, but use my return value
|
|
||||||
MRES_SUPERCEDE, // skip real function; use my return value
|
|
||||||
*/
|
|
||||||
|
|
||||||
//RETURN_META(MRES_IGNORED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enginefuncs_t meta_engfuncs;
|
enginefuncs_t meta_engfuncs;
|
||||||
@ -978,29 +766,22 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, m
|
|||||||
|
|
||||||
|
|
||||||
// JGHG added stuff below (initing stuff here)
|
// JGHG added stuff below (initing stuff here)
|
||||||
//g_body = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG); // init hs_body
|
g_body = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG); // init hs_body
|
||||||
|
CVAR_REGISTER(&fun_version);
|
||||||
// generic is needed or bots go crazy... don't know what its for otherwise. You can still kill people.
|
// generic is needed or bots go crazy... don't know what its for otherwise. You can still kill people.
|
||||||
// these hitzones never affect CS knife? ie you can always hit with knife no matter what you set here
|
// these hitzones never affect CS knife? ie you can always hit with knife no matter what you set here
|
||||||
//hs_body = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_LEFTARM); // init hs_body
|
//hs_body = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_LEFTARM); // init hs_body
|
||||||
// Set default zones for people to hit and get hit.
|
|
||||||
for (int i = 1; i <= 32; i++) {
|
|
||||||
g_zones_toHit[i] = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG);
|
|
||||||
g_zones_getHit[i] = (1<<HITGROUP_GENERIC) | (1<<HITGROUP_HEAD) | (1<<HITGROUP_CHEST) | (1<<HITGROUP_STOMACH) | (1<<HITGROUP_LEFTARM) | (1<<HITGROUP_RIGHTARM)| (1<<HITGROUP_LEFTLEG) | (1<<HITGROUP_RIGHTLEG);
|
|
||||||
// Also set to be bot until proven not in ClientDisconnect (that seems to be only called by real players...)
|
|
||||||
// g_bot[i] = true; <--- removed, only needed with akimbot
|
|
||||||
}
|
|
||||||
// JGHG added stuff above
|
// JGHG added stuff above
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define HITGROUP_GENERIC 0 // none == 1
|
#define HITGROUP_GENERIC 0 // none
|
||||||
#define HITGROUP_HEAD 1 = 2
|
#define HITGROUP_HEAD 1
|
||||||
#define HITGROUP_CHEST 2 = 4
|
#define HITGROUP_CHEST 2
|
||||||
#define HITGROUP_STOMACH 3 = 8
|
#define HITGROUP_STOMACH 3
|
||||||
#define HITGROUP_LEFTARM 4 = 16
|
#define HITGROUP_LEFTARM 4
|
||||||
#define HITGROUP_RIGHTARM 5 = 32
|
#define HITGROUP_RIGHTARM 5
|
||||||
#define HITGROUP_LEFTLEG 6 = 64
|
#define HITGROUP_LEFTLEG 6
|
||||||
#define HITGROUP_RIGHTLEG 7 = 128
|
#define HITGROUP_RIGHTLEG 7
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
LIBRARY fun_amx
|
LIBRARY fun
|
||||||
EXPORTS
|
EXPORTS
|
||||||
GiveFnptrsToDll @1
|
GiveFnptrsToDll @1
|
||||||
Meta_Attach @2
|
Meta_Attach @2
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
|
||||||
CFG=fun_amx - Win32 Debug
|
CFG=fun - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
@ -17,8 +17,8 @@ CFG=fun_amx - Win32 Debug
|
|||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "fun_amx - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "fun - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE "fun_amx - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
!MESSAGE "fun - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
@ -29,7 +29,7 @@ CPP=cl.exe
|
|||||||
MTL=midl.exe
|
MTL=midl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "fun_amx - Win32 Release"
|
!IF "$(CFG)" == "fun - Win32 Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
@ -56,10 +56,10 @@ LINK32=link.exe
|
|||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||||
# Begin Special Build Tool
|
# Begin Special Build Tool
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
PostBuild_Cmds=echo Copying dll... copy Release\fun_amx.dll K:\S\cstrike\addons\amxx\modules\fun_amx.dll echo Copying inc... copy ..\plugins\include\fun.inc K:\S\cstrike\addons\amxx\scripting\include
|
PostBuild_Cmds=echo Copying dll... copy Release\fun.dll K:\S\cstrike\addons\amx\dlls echo Copying inc... copy fun.inc K:\S\cstrike\addons\amx\examples\include copy fun.inc K:\S\cstrike\addons\amx\plugins\include
|
||||||
# End Special Build Tool
|
# End Special Build Tool
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "fun_amx - Win32 Debug"
|
!ELSEIF "$(CFG)" == "fun - Win32 Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
@ -89,8 +89,8 @@ LINK32=link.exe
|
|||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "fun_amx - Win32 Release"
|
# Name "fun - Win32 Release"
|
||||||
# Name "fun_amx - Win32 Debug"
|
# Name "fun - Win32 Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
@ -100,7 +100,7 @@ SOURCE=.\fun.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\fun_amx.def
|
SOURCE=.\fun.def
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
@ -117,7 +117,7 @@ SOURCE=.\fun.h
|
|||||||
# End Group
|
# End Group
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\plugins\include\fun.inc
|
SOURCE=.\fun.inc
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "fun_amx"=".\fun.dsp" - Package Owner=<4>
|
Project: "fun"=".\fun.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
|
@ -59,27 +59,27 @@ pfnmodule_engine_g* g_engModuleFunc; // These seem to be meta/amxmod related
|
|||||||
|
|
||||||
#define NAME "Fun"
|
#define NAME "Fun"
|
||||||
#define AUTHOR "AMX Mod X Dev Team"
|
#define AUTHOR "AMX Mod X Dev Team"
|
||||||
#define VERSION "0.16"
|
#define VERSION "0.1"
|
||||||
#define URL "http://www.amxmodx.org"
|
#define URL "http://www.amxmodx.org"
|
||||||
#define LOGTAG "FUN"
|
#define LOGTAG "FUN"
|
||||||
#define DATE __DATE__
|
#define DATE __DATE__
|
||||||
|
|
||||||
// Fun-specific defines below
|
// Fun-specific defines below
|
||||||
|
#define CVAR_FUN_VERSION "fun_version"
|
||||||
#define GETCLIENTLISTENING (*g_engfuncs.pfnVoice_GetClientListening)
|
#define GETCLIENTLISTENING (*g_engfuncs.pfnVoice_GetClientListening)
|
||||||
#define SETCLIENTLISTENING (*g_engfuncs.pfnVoice_SetClientListening)
|
#define SETCLIENTLISTENING (*g_engfuncs.pfnVoice_SetClientListening)
|
||||||
#define SETCLIENTMAXSPEED (*g_engfuncs.pfnSetClientMaxspeed)
|
#define SETCLIENTMAXSPEED (*g_engfuncs.pfnSetClientMaxspeed)
|
||||||
#define GETPLAYERAUTHID (*g_engfuncs.pfnGetPlayerAuthId)
|
|
||||||
#define SF_NORESPAWN (1 << 30)// !!!set this bit on guns and stuff that should never respawn.
|
#define SF_NORESPAWN (1 << 30)// !!!set this bit on guns and stuff that should never respawn.
|
||||||
#define STANDARDTIMESTEPSOUND 400
|
#define STANDARDTIMESTEPSOUND 400
|
||||||
|
|
||||||
#define HITGROUP_GENERIC 0 // none
|
#define HITGROUP_GENERIC 0 // none
|
||||||
#define HITGROUP_HEAD 1 // 1 << 1 = 2
|
#define HITGROUP_HEAD 1
|
||||||
#define HITGROUP_CHEST 2 // 1 << 2 = 4
|
#define HITGROUP_CHEST 2
|
||||||
#define HITGROUP_STOMACH 3 // 8
|
#define HITGROUP_STOMACH 3
|
||||||
#define HITGROUP_LEFTARM 4 // 16
|
#define HITGROUP_LEFTARM 4
|
||||||
#define HITGROUP_RIGHTARM 5 // 32
|
#define HITGROUP_RIGHTARM 5
|
||||||
#define HITGROUP_LEFTLEG 6 // 64
|
#define HITGROUP_LEFTLEG 6
|
||||||
#define HITGROUP_RIGHTLEG 7 // 128
|
#define HITGROUP_RIGHTLEG 7
|
||||||
// Fun-specific defines above
|
// Fun-specific defines above
|
||||||
|
|
||||||
// Globals below
|
// Globals below
|
||||||
@ -101,10 +101,7 @@ module_info_s module_info = {
|
|||||||
AMX_INTERFACE_VERSION,
|
AMX_INTERFACE_VERSION,
|
||||||
RELOAD_MODULE,
|
RELOAD_MODULE,
|
||||||
};
|
};
|
||||||
|
cvar_t fun_version = {"fun_version", "0.1", FCVAR_EXTDLL};
|
||||||
// The stuff below might end up in a class soon
|
int g_body = 0; // bits of parts of body to hit
|
||||||
int g_zones_toHit[33]; // where can people hit other people?
|
bool silent[33]; // used for set_user_footsteps()
|
||||||
int g_zones_getHit[33]; // where can people get hit by other people?
|
|
||||||
bool g_silent[33]; // used for set_user_footsteps()
|
|
||||||
//bool g_bot[33]; // is user bot? <--- removed, only needed with akimbot
|
|
||||||
// Globals above
|
// Globals above
|
||||||
|
@ -1,195 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="fun_amx"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory=".\Release"
|
|
||||||
IntermediateDirectory=".\Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FUN_EXPORTS"
|
|
||||||
StringPooling="TRUE"
|
|
||||||
RuntimeLibrary="0"
|
|
||||||
EnableFunctionLevelLinking="TRUE"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Release/fun.pch"
|
|
||||||
AssemblerListingLocation=".\Release/"
|
|
||||||
ObjectFile=".\Release/"
|
|
||||||
ProgramDataBaseFileName=".\Release/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile=".\Release/fun_amx.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\fun_amx.def"
|
|
||||||
ProgramDatabaseFile=".\Release/fun.pdb"
|
|
||||||
ImportLibrary=".\Release/fun.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Release/fun.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="echo Copying dll...
|
|
||||||
copy Release\fun.dll K:\S\cstrike\addons\amx\dlls
|
|
||||||
echo Copying inc...
|
|
||||||
copy fun.inc K:\S\cstrike\addons\amx\examples\include
|
|
||||||
copy fun.inc K:\S\cstrike\addons\amx\plugins\include
|
|
||||||
"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1053"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory=".\Debug"
|
|
||||||
IntermediateDirectory=".\Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FUN_EXPORTS"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="1"
|
|
||||||
UsePrecompiledHeader="2"
|
|
||||||
PrecompiledHeaderFile=".\Debug/fun.pch"
|
|
||||||
AssemblerListingLocation=".\Debug/"
|
|
||||||
ObjectFile=".\Debug/"
|
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
|
||||||
BrowseInformation="1"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
OutputFile="Debug/fun_debug.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ModuleDefinitionFile=".\fun.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile=".\Debug/fun_debug.pdb"
|
|
||||||
ImportLibrary=".\Debug/fun_debug.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
MkTypLibCompatible="TRUE"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
TargetEnvironment="1"
|
|
||||||
TypeLibraryName=".\Debug/fun.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1053"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
|
||||||
<File
|
|
||||||
RelativePath="fun.cpp">
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Release|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;FUN_EXPORTS;$(NoInherit)"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
<FileConfiguration
|
|
||||||
Name="Debug|Win32">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FUN_EXPORTS;$(NoInherit)"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
BrowseInformation="1"/>
|
|
||||||
</FileConfiguration>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="fun_amx.def">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
|
||||||
RelativePath="fun.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
|
||||||
</Filter>
|
|
||||||
<File
|
|
||||||
RelativePath="fun.inc">
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
@ -48,7 +48,7 @@ new g_cmdLoopback[16]
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Admin Base","0.16","AMXX Dev Team")
|
register_plugin("Admin Base","0.1","AMXX Dev Team")
|
||||||
register_cvar("amx_mode","2.0")
|
register_cvar("amx_mode","2.0")
|
||||||
register_cvar("amx_password_field","_pw")
|
register_cvar("amx_password_field","_pw")
|
||||||
register_cvar("amx_default_access","")
|
register_cvar("amx_default_access","")
|
||||||
@ -58,7 +58,6 @@ public plugin_init()
|
|||||||
register_cvar("amx_vote_answers","1")
|
register_cvar("amx_vote_answers","1")
|
||||||
register_cvar("amx_vote_delay","60")
|
register_cvar("amx_vote_delay","60")
|
||||||
register_cvar("amx_last_voting","0")
|
register_cvar("amx_last_voting","0")
|
||||||
register_cvar("amx_show_activity","2")
|
|
||||||
set_cvar_float("amx_last_voting",0.0)
|
set_cvar_float("amx_last_voting",0.0)
|
||||||
|
|
||||||
register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN)
|
register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN)
|
||||||
@ -72,12 +71,11 @@ public plugin_init()
|
|||||||
|
|
||||||
remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights
|
remove_user_flags(0,read_flags("z")) // Remove 'user' flag from server rights
|
||||||
|
|
||||||
new configsDir[128]
|
new filename[64]
|
||||||
get_configsdir(configsDir, 127)
|
get_basedir( filename , 31 )
|
||||||
server_cmd("exec %s/amxx.cfg", configsDir) // Execute main configuration file
|
server_cmd("exec %s/amx.cfg" , filename ) // Execute main configuration file
|
||||||
new users_ini_file[128]
|
format( filename, 63 , "%s/configs/users.ini" , filename )
|
||||||
format(users_ini_file, 127, "%s/users.ini", configsDir)
|
loadSettings( filename ) // Load admins accounts
|
||||||
loadSettings("addons/amxx/configs/users.ini") // Load admins accounts
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSettings(szFilename[])
|
loadSettings(szFilename[])
|
||||||
@ -85,26 +83,23 @@ loadSettings(szFilename[])
|
|||||||
if (!file_exists(szFilename)) return 0
|
if (!file_exists(szFilename)) return 0
|
||||||
|
|
||||||
new szText[256], szFlags[32], szAccess[32]
|
new szText[256], szFlags[32], szAccess[32]
|
||||||
new a, pos = 0, iAccess
|
new a, pos = 0
|
||||||
|
|
||||||
while ( g_aNum < MAX_ADMINS && read_file(szFilename,pos++,szText,255,a) )
|
while ( g_aNum < MAX_ADMINS && read_file(szFilename,pos++,szText,255,a) )
|
||||||
{
|
{
|
||||||
if ( szText[0] == ';' ) continue
|
if ( szText[0] == ';' ) continue
|
||||||
|
|
||||||
if ( parse(szText, g_aName[ g_aNum ] ,31, g_aPassword[ g_aNum ], 31, szAccess,31,szFlags,31 ) < 2 )
|
if ( parse(szText, g_aName[ g_aNum ] ,31,
|
||||||
continue
|
g_aPassword[ g_aNum ], 31, szAccess,31,szFlags,31 ) < 2 ) continue
|
||||||
|
|
||||||
iAccess = read_flags(szAccess)
|
if ( (containi(szAccess,"z")==-1) && (containi(szAccess,"y")==-1) )
|
||||||
|
szAccess[strlen(szAccess)] = 'y'
|
||||||
|
|
||||||
if (!(iAccess & ADMIN_USER) && !(iAccess & ADMIN_ADMIN)) {
|
g_aAccess[ g_aNum ] = read_flags( szAccess )
|
||||||
iAccess |= ADMIN_ADMIN
|
|
||||||
}
|
|
||||||
|
|
||||||
g_aAccess[ g_aNum ] = iAccess
|
|
||||||
g_aFlags[ g_aNum ] = read_flags( szFlags )
|
g_aFlags[ g_aNum ] = read_flags( szFlags )
|
||||||
++g_aNum
|
++g_aNum
|
||||||
}
|
}
|
||||||
server_print("[AMXX] Loaded %d admin%s from file",g_aNum, (g_aNum == 1) ? "" : "s" )
|
server_print("Loaded %d admin%s from file",g_aNum, (g_aNum == 1) ? "" : "s" )
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,9 +108,9 @@ public cmdReload(id,level,cid)
|
|||||||
if (!cmd_access(id,level,cid,1))
|
if (!cmd_access(id,level,cid,1))
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
new filename[128]
|
new filename[64]
|
||||||
get_configsdir(filename,127)
|
get_basedir(filename,31)
|
||||||
format(filename,63,"%s/users.ini", filename)
|
format(filename,63,"%s/configs/users.ini",filename)
|
||||||
|
|
||||||
g_aNum = 0
|
g_aNum = 0
|
||||||
loadSettings(filename) // Re-Load admins accounts
|
loadSettings(filename) // Re-Load admins accounts
|
||||||
@ -192,8 +187,8 @@ getAccess(id,name[],authid[],ip[], password[])
|
|||||||
else {
|
else {
|
||||||
new defaccess[32]
|
new defaccess[32]
|
||||||
get_cvar_string("amx_default_access",defaccess,31)
|
get_cvar_string("amx_default_access",defaccess,31)
|
||||||
if (!strlen(defaccess))
|
if (!defaccess[0])
|
||||||
copy(defaccess, 32, "z")
|
defaccess[0] = 'z'
|
||||||
new idefaccess = read_flags(defaccess)
|
new idefaccess = read_flags(defaccess)
|
||||||
if (idefaccess){
|
if (idefaccess){
|
||||||
result |= 8
|
result |= 8
|
||||||
@ -220,6 +215,7 @@ accessUser( id, name[] = "" )
|
|||||||
|
|
||||||
#if !defined NO_STEAM
|
#if !defined NO_STEAM
|
||||||
client_cmd(id,g_cmdLoopback)
|
client_cmd(id,g_cmdLoopback)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
client_cmd(id,"echo ^"* You have no entry to the server...^";disconnect")
|
client_cmd(id,"echo ^"* You have no entry to the server...^";disconnect")
|
||||||
#endif
|
#endif
|
||||||
|
@ -49,7 +49,7 @@ new g_cmdLoopback[16]
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Admin Base for MySQL","0.16","AMXX Dev Team")
|
register_plugin("Admin Base for MySQL","0.1","AMXX Dev Team")
|
||||||
|
|
||||||
register_cvar("amx_mode","2.0")
|
register_cvar("amx_mode","2.0")
|
||||||
register_cvar("amx_password_field","_pw")
|
register_cvar("amx_password_field","_pw")
|
||||||
@ -68,7 +68,6 @@ public plugin_init()
|
|||||||
register_cvar("amx_vote_answers","1")
|
register_cvar("amx_vote_answers","1")
|
||||||
register_cvar("amx_vote_delay","60")
|
register_cvar("amx_vote_delay","60")
|
||||||
register_cvar("amx_last_voting","0")
|
register_cvar("amx_last_voting","0")
|
||||||
register_cvar("amx_show_activity","2")
|
|
||||||
set_cvar_float("amx_last_voting",0.0)
|
set_cvar_float("amx_last_voting",0.0)
|
||||||
|
|
||||||
register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN)
|
register_concmd("amx_reloadadmins","cmdReload",ADMIN_ADMIN)
|
||||||
@ -81,10 +80,10 @@ public plugin_init()
|
|||||||
|
|
||||||
remove_user_flags(0,read_flags("z")) // remove 'user' flag from server rights
|
remove_user_flags(0,read_flags("z")) // remove 'user' flag from server rights
|
||||||
|
|
||||||
new configsDir[128]
|
new filename[32]
|
||||||
get_configsdir(configsDir, 127)
|
get_basedir( filename , 31 )
|
||||||
server_cmd("exec %s/amxx.cfg", configsDir) // Execute main configuration file
|
server_cmd("exec %s/amx.cfg" , filename)
|
||||||
server_cmd("exec %s/mysql.cfg;amx_sqladmins", configsDir)
|
server_cmd("exec %s/configs/mysql.cfg;amx_sqladmins" , filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
public adminSql() {
|
public adminSql() {
|
||||||
@ -96,7 +95,7 @@ public adminSql() {
|
|||||||
|
|
||||||
new mysql = mysql_connect(host,user,pass,db,error,127)
|
new mysql = mysql_connect(host,user,pass,db,error,127)
|
||||||
if(mysql < 1){
|
if(mysql < 1){
|
||||||
server_print("[AMXX] MySQL error: can't connect: '%s'",error)
|
server_print("MySQL error: can't connect: '%s'",error)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ public adminSql() {
|
|||||||
|
|
||||||
if(mysql_query(mysql,"SELECT auth,password,access,flags FROM admins") < 1) {
|
if(mysql_query(mysql,"SELECT auth,password,access,flags FROM admins") < 1) {
|
||||||
mysql_error(mysql,error,127)
|
mysql_error(mysql,error,127)
|
||||||
server_print("[AMXX] MySQL error: can't load admins: '%s'",error)
|
server_print("MySQL error: can't load admins: '%s'",error)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +123,7 @@ public adminSql() {
|
|||||||
++g_aNum
|
++g_aNum
|
||||||
}
|
}
|
||||||
|
|
||||||
server_print("[AMXX] Loaded %d admin%s from database",g_aNum, (g_aNum == 1) ? "" : "s" )
|
server_print("Loaded %d admin%s from database",g_aNum, (g_aNum == 1) ? "" : "s" )
|
||||||
mysql_close(mysql)
|
mysql_close(mysql)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ new g_Values[MAX_CLR][] = {{255,255,255},{255,0,0},{0,255,0},{0,0,255},{255,255,
|
|||||||
new Float:g_Pos[4][] = {{0.0,0.0},{0.05,0.55},{-1.0,0.2},{-1.0,0.7}}
|
new Float:g_Pos[4][] = {{0.0,0.0},{0.05,0.55},{-1.0,0.2},{-1.0,0.7}}
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Admin Chat","0.16","AMXX Dev Team")
|
register_plugin("Admin Chat","0.1","AMXX Dev Team")
|
||||||
register_clcmd("say","cmdSayChat",ADMIN_CHAT,"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
|
register_clcmd("say","cmdSayChat",ADMIN_CHAT,"@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
|
||||||
register_clcmd("say_team","cmdSayAdmin",0,"@<text> - displays message to admins")
|
register_clcmd("say_team","cmdSayAdmin",0,"@<text> - displays message to admins")
|
||||||
register_concmd("amx_say","cmdSay",ADMIN_CHAT,"<message> - sends message to all players")
|
register_concmd("amx_say","cmdSay",ADMIN_CHAT,"<message> - sends message to all players")
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
#include <amxmisc>
|
#include <amxmisc>
|
||||||
|
#include <engine>
|
||||||
|
|
||||||
#define MAXRCONCVARS 16
|
#define MAXRCONCVARS 16
|
||||||
new g_cvarRcon[ MAXRCONCVARS ][32]
|
new g_cvarRcon[ MAXRCONCVARS ][32]
|
||||||
@ -44,10 +45,11 @@ new bool:g_Paused
|
|||||||
new g_addCvar[] = "amx_cvar add %s"
|
new g_addCvar[] = "amx_cvar add %s"
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Admin Commands","0.16","AMXX Dev Team")
|
register_plugin("Admin Commands","0.1","AMXX Dev Team")
|
||||||
register_concmd("amx_kick","cmdKick",ADMIN_KICK,"<name or #userid> [reason]")
|
register_concmd("amx_kick","cmdKick",ADMIN_KICK,"<name or #userid> [reason]")
|
||||||
register_concmd("amx_ban","cmdBan",ADMIN_BAN,"<name or #userid> <id/ip> <minutes> [reason]")
|
register_concmd("amx_ban","cmdAddBan",ADMIN_BAN,"<authid or ip> <minutes> [reason]")
|
||||||
register_concmd("amx_addban","cmdAddBan",ADMIN_BAN,"<authid or ip> <minutes> [reason]")
|
register_concmd("amx_banid","cmdBan",ADMIN_BAN,"<name or #userid> <minutes> [reason]")
|
||||||
|
register_concmd("amx_banip","cmdBan",ADMIN_BAN,"<name or #userid> <minutes> [reason]")
|
||||||
register_concmd("amx_unban","cmdUnban",ADMIN_BAN,"<authid or ip>")
|
register_concmd("amx_unban","cmdUnban",ADMIN_BAN,"<authid or ip>")
|
||||||
register_concmd("amx_slay","cmdSlay",ADMIN_SLAY,"<name or #userid>")
|
register_concmd("amx_slay","cmdSlay",ADMIN_SLAY,"<name or #userid>")
|
||||||
register_concmd("amx_slap","cmdSlap",ADMIN_SLAY,"<name or #userid> [power]")
|
register_concmd("amx_slap","cmdSlap",ADMIN_SLAY,"<name or #userid> [power]")
|
||||||
@ -101,18 +103,12 @@ public cmdKick(id,level,cid){
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if !defined NO_STEAM
|
#if !defined NO_STEAM
|
||||||
if (reason[0])
|
|
||||||
server_cmd("kick #%d ^"%s^"",userid2,reason)
|
server_cmd("kick #%d ^"%s^"",userid2,reason)
|
||||||
else
|
|
||||||
server_cmd("kick #%d",userid2)
|
|
||||||
#else
|
#else
|
||||||
if (reason[0])
|
client_cmd(player,"echo ^"%s^";disconnect",reason)
|
||||||
client_cmd(player,"echo ^"Kicked: Reason: %s^";disconnect",reason)
|
|
||||||
else
|
|
||||||
client_cmd(player,"echo ^"Kicked^";disconnect",reason)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
console_print(id,"[AMXX] Client ^"%s^" kicked",name2)
|
console_print(id,"Client ^"%s^" kicked",name2)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,11 +119,11 @@ public cmdUnban(id,level,cid){
|
|||||||
read_argv(1,arg,31)
|
read_argv(1,arg,31)
|
||||||
if (contain(arg,".")!=-1) {
|
if (contain(arg,".")!=-1) {
|
||||||
server_cmd("removeip ^"%s^";writeip",arg)
|
server_cmd("removeip ^"%s^";writeip",arg)
|
||||||
console_print(id,"[AMXX] Ip ^"%s^" removed from ban list", arg )
|
console_print(id,"Ip ^"%s^" removed from ban list", arg )
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
server_cmd("removeid ^"%s^";writeid",arg)
|
server_cmd("removeid ^"%s^";writeid",arg)
|
||||||
console_print(id,"[AMXX] Authid ^"%s^" removed from ban list", arg )
|
console_print(id,"Authid ^"%s^" removed from ban list", arg )
|
||||||
}
|
}
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
switch(get_cvar_num("amx_show_activity")) {
|
switch(get_cvar_num("amx_show_activity")) {
|
||||||
@ -149,11 +145,11 @@ public cmdAddBan(id,level,cid){
|
|||||||
read_argv(3,reason,31)
|
read_argv(3,reason,31)
|
||||||
if (contain(arg,".")!=-1) {
|
if (contain(arg,".")!=-1) {
|
||||||
server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,arg)
|
server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,arg)
|
||||||
console_print(id,"[AMXX] Ip ^"%s^" added to ban list", arg )
|
console_print(id,"Ip ^"%s^" added to ban list", arg )
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
server_cmd("banid ^"%s^" ^"%s^";wait;writeid",minutes,arg)
|
server_cmd("banid ^"%s^" ^"%s^";wait;writeid",minutes,arg)
|
||||||
console_print(id,"[AMXX] Authid ^"%s^" added to ban list", arg )
|
console_print(id,"Authid ^"%s^" added to ban list", arg )
|
||||||
}
|
}
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
switch(get_cvar_num("amx_show_activity")) {
|
switch(get_cvar_num("amx_show_activity")) {
|
||||||
@ -167,67 +163,47 @@ public cmdAddBan(id,level,cid){
|
|||||||
}
|
}
|
||||||
|
|
||||||
public cmdBan(id,level,cid){
|
public cmdBan(id,level,cid){
|
||||||
if (!cmd_access(id,level,cid,4))
|
if (!cmd_access(id,level,cid,3))
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
new target[32],mode[3],minutes[8],reason[32]
|
new arg[32], cmd[32]
|
||||||
read_argv(1,target,31)
|
read_argv(0,cmd,31)
|
||||||
read_argv(2,mode,2)
|
read_argv(1,arg,31)
|
||||||
strtolower(mode)
|
new player = cmd_target(id,arg,9)
|
||||||
read_argv(3,minutes,7)
|
|
||||||
read_argv(4,reason,31)
|
|
||||||
if ( (!equal(mode,"id")) && (!equal(mode,"ip")) )
|
|
||||||
{
|
|
||||||
new hcmd[32],hinfo[128],hflag
|
|
||||||
get_concmd(cid,hcmd,31,hflag,hinfo,127,level)
|
|
||||||
console_print(id,"Usage: %s %s",hcmd,hinfo)
|
|
||||||
return PLUGIN_HANDLED
|
|
||||||
}
|
|
||||||
new player = cmd_target(id,target,9)
|
|
||||||
if (!player) return PLUGIN_HANDLED
|
if (!player) return PLUGIN_HANDLED
|
||||||
new authid[32],name2[32],authid2[32],name[32]
|
new minutes[32],authid[32],name2[32],authid2[32],name[32],reason[32]
|
||||||
new userid2 = get_user_userid(player)
|
new userid2 = get_user_userid(player)
|
||||||
|
read_argv(2,minutes,31)
|
||||||
get_user_authid(player,authid2,31)
|
get_user_authid(player,authid2,31)
|
||||||
get_user_authid(id,authid,31)
|
get_user_authid(id,authid,31)
|
||||||
get_user_name(player,name2,31)
|
get_user_name(player,name2,31)
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
userid2 = get_user_userid(player)
|
userid2 = get_user_userid(player)
|
||||||
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (mode ^"%s^") (minutes ^"%s^") (reason ^"%s^")",
|
read_argv(3,reason,31)
|
||||||
name,get_user_userid(id),authid, name2,userid2,authid2,mode,minutes,reason)
|
log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%s^") (reason ^"%s^")",
|
||||||
|
name,get_user_userid(id),authid, name2,userid2,authid2,minutes,reason)
|
||||||
|
|
||||||
new temp[64]
|
new temp[64]
|
||||||
if (str_to_num(minutes))
|
if (str_to_int(minutes))
|
||||||
format(temp,63,"for %s min.",minutes)
|
format(temp,63,"for %s min.",minutes)
|
||||||
else
|
else
|
||||||
temp = "permanently"
|
temp = "permanently"
|
||||||
|
|
||||||
if ( equal(mode,"ip") ){
|
if ( equal(cmd[7],"ip") || (!equal(cmd[7],"id") && get_cvar_num("sv_lan")) ){
|
||||||
new address[32]
|
new address[32]
|
||||||
get_user_ip(player,address,31,1)
|
get_user_ip(player,address,31,1)
|
||||||
#if !defined NO_STEAM
|
#if !defined NO_STEAM
|
||||||
if (reason[0])
|
|
||||||
server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address)
|
server_cmd("kick #%d ^"%s (banned %s)^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,reason,temp,minutes,address)
|
||||||
else
|
|
||||||
server_cmd("kick #%d ^"banned %s^";wait;addip ^"%s^" ^"%s^";wait;writeip",userid2,temp,minutes,address)
|
|
||||||
#else
|
#else
|
||||||
if (reason[0])
|
|
||||||
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
|
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
|
||||||
else
|
|
||||||
client_cmd(player,"echo ^"banned %s^";disconnect",temp)
|
|
||||||
server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,address)
|
server_cmd("addip ^"%s^" ^"%s^";wait;writeip",minutes,address)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if !defined NO_STEAM
|
#if !defined NO_STEAM
|
||||||
if (reason[0])
|
|
||||||
server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2)
|
server_cmd("kick #%d ^"%s (banned %s)^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,reason,temp,minutes,authid2)
|
||||||
else
|
|
||||||
server_cmd("kick #%d ^"banned %s^";wait;banid ^"%s^" ^"%s^";wait;writeid",userid2,temp,minutes,authid2)
|
|
||||||
#else
|
#else
|
||||||
if (reason[0])
|
|
||||||
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
|
client_cmd(player,"echo ^"%s (banned %s)^";disconnect",reason,temp)
|
||||||
else
|
|
||||||
client_cmd(player,"echo ^"banned %s^";disconnect",temp)
|
|
||||||
server_cmd("banid ^"%s^" ^"%s^";wait;writeip",minutes,authid2)
|
server_cmd("banid ^"%s^" ^"%s^";wait;writeip",minutes,authid2)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -242,7 +218,7 @@ public cmdBan(id,level,cid){
|
|||||||
client_print(0,print_chat,"%s ban %s %s",temp2,name2,temp)
|
client_print(0,print_chat,"%s ban %s %s",temp2,name2,temp)
|
||||||
}
|
}
|
||||||
|
|
||||||
console_print(id,"[AMXX] Client ^"%s^" banned",name2)
|
console_print(id,"Client ^"%s^" banned",name2)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +243,7 @@ public cmdSlay(id,level,cid){
|
|||||||
case 1: client_print(0,print_chat,"ADMIN: slay %s",name2)
|
case 1: client_print(0,print_chat,"ADMIN: slay %s",name2)
|
||||||
}
|
}
|
||||||
|
|
||||||
console_print(id,"[AMXX] Client ^"%s^" slayed",name2)
|
console_print(id,"Client ^"%s^" slayed",name2)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +256,7 @@ public cmdSlap(id,level,cid){
|
|||||||
if (!player) return PLUGIN_HANDLED
|
if (!player) return PLUGIN_HANDLED
|
||||||
new spower[32],authid[32],name2[32],authid2[32],name[32]
|
new spower[32],authid[32],name2[32],authid2[32],name[32]
|
||||||
read_argv(2,spower,31)
|
read_argv(2,spower,31)
|
||||||
new damage = str_to_num(spower)
|
new damage = str_to_int(spower)
|
||||||
user_slap(player,damage)
|
user_slap(player,damage)
|
||||||
get_user_authid(id,authid,31)
|
get_user_authid(id,authid,31)
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
@ -294,7 +270,7 @@ public cmdSlap(id,level,cid){
|
|||||||
case 1: client_print(0,print_chat,"ADMIN: slap %s with %d damage",name2,damage)
|
case 1: client_print(0,print_chat,"ADMIN: slap %s with %d damage",name2,damage)
|
||||||
}
|
}
|
||||||
|
|
||||||
console_print(id,"[AMXX] Client ^"%s^" slaped with %d damage",name2,damage)
|
console_print(id,"Client ^"%s^" slaped with %d damage",name2,damage)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,7 +283,7 @@ public cmdMap(id,level,cid){
|
|||||||
new arg[32]
|
new arg[32]
|
||||||
new arglen = read_argv(1,arg,31)
|
new arglen = read_argv(1,arg,31)
|
||||||
if ( !is_map_valid(arg) ){
|
if ( !is_map_valid(arg) ){
|
||||||
console_print(id,"[AMXX] Map with that name not found or map is invalid")
|
console_print(id,"Map with that name not found or map is invalid")
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
new authid[32],name[32]
|
new authid[32],name[32]
|
||||||
@ -342,25 +318,25 @@ public cmdCvar(id,level,cid){
|
|||||||
if ( g_cvarRconNum < MAXRCONCVARS )
|
if ( g_cvarRconNum < MAXRCONCVARS )
|
||||||
copy( g_cvarRcon[ g_cvarRconNum++ ] , 31, arg2 )
|
copy( g_cvarRcon[ g_cvarRconNum++ ] , 31, arg2 )
|
||||||
else
|
else
|
||||||
console_print(id,"[AMXX] Can't add more cvars for rcon access!")
|
console_print(id,"Can't add more cvars for rcon access!")
|
||||||
}
|
}
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
if (!cvar_exists(arg)){
|
if (!cvar_exists(arg)){
|
||||||
console_print(id,"[AMXX] Unknown cvar: %s",arg)
|
console_print(id,"Unknown cvar: %s",arg)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
if ( onlyRcon(arg) && !(get_user_flags(id) & ADMIN_RCON)){
|
if ( onlyRcon(arg) && !(get_user_flags(id) & ADMIN_RCON)){
|
||||||
console_print(id,"[AMXX] You have no access to that cvar")
|
console_print(id,"You have no access to that cvar")
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
else if (equal(arg,"sv_password") && !(get_user_flags(id) & ADMIN_PASSWORD)){
|
else if (equal(arg,"sv_password") && !(get_user_flags(id) & ADMIN_PASSWORD)){
|
||||||
console_print(id,"[AMXX] You have no access to that cvar")
|
console_print(id,"You have no access to that cvar")
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
if (read_argc() < 3){
|
if (read_argc() < 3){
|
||||||
get_cvar_string(arg,arg2,63)
|
get_cvar_string(arg,arg2,63)
|
||||||
console_print(id,"[AMXX] Cvar ^"%s^" is ^"%s^"",arg,arg2)
|
console_print(id,"Cvar ^"%s^" is ^"%s^"",arg,arg2)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
new authid[32],name[32]
|
new authid[32],name[32]
|
||||||
@ -382,7 +358,7 @@ public cmdCvar(id,level,cid){
|
|||||||
client_print(0,print_chat,"%s set cvar %s to ^"%s^"",temp,arg,arg2)
|
client_print(0,print_chat,"%s set cvar %s to ^"%s^"",temp,arg,arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
console_print(id,"[AMXX] Cvar ^"%s^" changed to ^"%s^"",arg,arg2)
|
console_print(id,"Cvar ^"%s^" changed to ^"%s^"",arg,arg2)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,9 +367,8 @@ public cmdPlugins(id,level,cid)
|
|||||||
if (!cmd_access(id,level,cid,1))
|
if (!cmd_access(id,level,cid,1))
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
new name[32],version[32],author[32],filename[32],status[32]
|
#if !defined NO_STEAM
|
||||||
|
#define MOTD_LEN 1024
|
||||||
/*
|
|
||||||
new motd_body[MOTD_LEN],state[4]
|
new motd_body[MOTD_LEN],state[4]
|
||||||
new num = get_pluginsnum()
|
new num = get_pluginsnum()
|
||||||
new running = 0
|
new running = 0
|
||||||
@ -405,6 +380,7 @@ public cmdPlugins(id,level,cid)
|
|||||||
{
|
{
|
||||||
if (equal(state,"one")) copy(state,3,"two")
|
if (equal(state,"one")) copy(state,3,"two")
|
||||||
else copy(state,3,"one")
|
else copy(state,3,"one")
|
||||||
|
new name[32],version[32],author[32],filename[32],status[32]
|
||||||
get_plugin(i,filename,31,name,31,version,31,author,31,status,31)
|
get_plugin(i,filename,31,name,31,version,31,author,31,status,31)
|
||||||
pos += format(motd_body[pos],MOTD_LEN-pos,"<tr class=^"%s^"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",state,name,version,author,filename,status)
|
pos += format(motd_body[pos],MOTD_LEN-pos,"<tr class=^"%s^"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",state,name,version,author,filename,status)
|
||||||
if (equal(status,"running"))
|
if (equal(status,"running"))
|
||||||
@ -412,19 +388,21 @@ public cmdPlugins(id,level,cid)
|
|||||||
}
|
}
|
||||||
format(motd_body[pos],MOTD_LEN-pos,"</table>%d plugins, %d running</body></html>",num,running)
|
format(motd_body[pos],MOTD_LEN-pos,"</table>%d plugins, %d running</body></html>",num,running)
|
||||||
show_motd(id,motd_body,"Currently loaded plugins:")
|
show_motd(id,motd_body,"Currently loaded plugins:")
|
||||||
*/
|
#else
|
||||||
new num = get_pluginsnum()
|
new num = get_pluginsnum()
|
||||||
new running = 0
|
new running = 0
|
||||||
console_print(id,"Currently loaded plugins:")
|
console_print(id,"Currently loaded plugins:")
|
||||||
console_print(id,"%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s","name","version","author","file","status")
|
console_print(id,"%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s","name","version","author","file","status")
|
||||||
for (new i=0;i<num;i++)
|
for (new i=0;i<num;i++)
|
||||||
{
|
{
|
||||||
|
new name[32],version[32],author[32],filename[32],status[32]
|
||||||
get_plugin(i,filename,31,name,31,version,31,author,31,status,31)
|
get_plugin(i,filename,31,name,31,version,31,author,31,status,31)
|
||||||
console_print(id,"%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s",name,version,author,filename,status)
|
console_print("%-18.17s %-8.7s %-17.16s %-16.15s %-9.8s",name,version,author,filename,status)
|
||||||
if (equal(status,"running"))
|
if (equal(status,"running"))
|
||||||
running++
|
running++
|
||||||
}
|
}
|
||||||
console_print(id,"%d plugins, %d running",num,running)
|
console_print(id,"%d plugins, %d running",num,running)
|
||||||
|
#endif
|
||||||
|
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
@ -434,9 +412,10 @@ public cmdModules(id,level,cid)
|
|||||||
if (!cmd_access(id,level,cid,1))
|
if (!cmd_access(id,level,cid,1))
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
|
|
||||||
new name[32],version[32],author[32],status,sStatus[16]
|
#if !defined NO_STEAM
|
||||||
|
#if !defined MOTD_LEN
|
||||||
/*
|
#define MOTD_LEN 1024
|
||||||
|
#endif
|
||||||
new motd_body[MOTD_LEN],state[4]
|
new motd_body[MOTD_LEN],state[4]
|
||||||
new num = get_modulesnum()
|
new num = get_modulesnum()
|
||||||
new pos = copy(motd_body,MOTD_LEN,"<html><head><body><style type=^"text/css^">")
|
new pos = copy(motd_body,MOTD_LEN,"<html><head><body><style type=^"text/css^">")
|
||||||
@ -447,26 +426,24 @@ public cmdModules(id,level,cid)
|
|||||||
{
|
{
|
||||||
if (equal(state,"one")) copy(state,3,"two")
|
if (equal(state,"one")) copy(state,3,"two")
|
||||||
else copy(state,3,"one")
|
else copy(state,3,"one")
|
||||||
get_module(i,name,31,author,31,version,31)
|
new name[32],version[32],author[32],filename[32],status[32]
|
||||||
|
get_plugin(i,filename,31,name,31,version,31,author,31,status,31)
|
||||||
pos += format(motd_body[pos],MOTD_LEN-pos,"<tr class=^"%s^"><td>%s</td><td>%s</td><td>%s</td></tr>",state,name,version,author)
|
pos += format(motd_body[pos],MOTD_LEN-pos,"<tr class=^"%s^"><td>%s</td><td>%s</td><td>%s</td></tr>",state,name,version,author)
|
||||||
}
|
}
|
||||||
format(motd_body[pos],MOTD_LEN-pos,"</table>%d modules</body></html>",num)
|
format(motd_body[pos],MOTD_LEN-pos,"</table>%d modules</body></html>",num)
|
||||||
show_motd(id,motd_body,"Currently loaded modules:")
|
show_motd(id,motd_body,"Currently loaded modules:")
|
||||||
*/
|
#else
|
||||||
new num = get_modulesnum()
|
new num = get_modulesnum()
|
||||||
console_print(id,"Currently loaded modules:")
|
console_print(id,"Currently loaded modules:")
|
||||||
console_print(id,"%-23.22s %-8.7s %-20.19s","name","version","author")
|
console_print(id,"%-23.22s %-8.7s %-20.19s","name","version","author")
|
||||||
for (new i=0;i<num;i++)
|
for (new i=0;i<num;i++)
|
||||||
{
|
{
|
||||||
get_module(i,name,31,author,31,version,31,status)
|
new name[32],version[32],author[32]
|
||||||
switch (status)
|
get_module(i,name,31,author,31,version,31)
|
||||||
{
|
console_print("%-23.22s %-8.7s %-20.19s",name,version,author)
|
||||||
case module_loaded: copy(sStatus,15,"running")
|
|
||||||
default: copy(sStatus,15,"error")
|
|
||||||
}
|
|
||||||
console_print(id,"%-23.22s %-8.7s %-20.19s",name,version,author)
|
|
||||||
}
|
}
|
||||||
console_print(id,"%d modules",num)
|
console_print(id,"%d modules",num)
|
||||||
|
#endif
|
||||||
|
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
@ -477,7 +454,7 @@ public cmdCfg(id,level,cid){
|
|||||||
new arg[128]
|
new arg[128]
|
||||||
read_argv(1,arg,127)
|
read_argv(1,arg,127)
|
||||||
if (!file_exists(arg)){
|
if (!file_exists(arg)){
|
||||||
console_print(id,"[AMXX] File ^"%s^" not found",arg)
|
console_print(id,"File ^"%s^" not found",arg)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
new authid[32],name[32]
|
new authid[32],name[32]
|
||||||
@ -485,7 +462,7 @@ public cmdCfg(id,level,cid){
|
|||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
log_amx("Cmd: ^"%s<%d><%s><>^" execute cfg (file ^"%s^")",
|
log_amx("Cmd: ^"%s<%d><%s><>^" execute cfg (file ^"%s^")",
|
||||||
name,get_user_userid(id),authid, arg)
|
name,get_user_userid(id),authid, arg)
|
||||||
console_print(id,"[AMXX] Executing file ^"%s^"",arg)
|
console_print(id,"Executing file ^"%s^"",arg)
|
||||||
server_cmd("exec %s",arg)
|
server_cmd("exec %s",arg)
|
||||||
|
|
||||||
switch(get_cvar_num("amx_show_activity")) {
|
switch(get_cvar_num("amx_show_activity")) {
|
||||||
@ -498,7 +475,7 @@ public cmdCfg(id,level,cid){
|
|||||||
|
|
||||||
public cmdLBack(){
|
public cmdLBack(){
|
||||||
set_cvar_float("pausable",g_pausAble)
|
set_cvar_float("pausable",g_pausAble)
|
||||||
console_print(g_pauseCon,"[AMXX] Server %s", g_Paused ? "unpaused" : "paused")
|
console_print(g_pauseCon,"Server %s", g_Paused ? "unpaused" : "paused")
|
||||||
if (g_Paused) g_Paused = false
|
if (g_Paused) g_Paused = false
|
||||||
else g_Paused = true
|
else g_Paused = true
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
@ -513,14 +490,14 @@ public cmdPause(id,level,cid){
|
|||||||
g_pausAble = get_cvar_float("pausable")
|
g_pausAble = get_cvar_float("pausable")
|
||||||
if (!slayer) slayer = find_player("h")
|
if (!slayer) slayer = find_player("h")
|
||||||
if (!slayer){
|
if (!slayer){
|
||||||
console_print(id,"[AMXX] Server was unable to pause the game. Real players on server are needed")
|
console_print(id,"Server was unable to pause the game. Real players on server are needed")
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
set_cvar_float("pausable",1.0)
|
set_cvar_float("pausable",1.0)
|
||||||
client_cmd(slayer,"pause;pauseAck")
|
client_cmd(slayer,"pause;pauseAck")
|
||||||
log_amx("Cmd: ^"%s<%d><%s><>^" %s server",
|
log_amx("Cmd: ^"%s<%d><%s><>^" %s server",
|
||||||
name,get_user_userid(id),authid, g_Paused ? "unpause" : "pause" )
|
name,get_user_userid(id),authid, g_Paused ? "unpause" : "pause" )
|
||||||
console_print(id,"[AMXX] Server proceed %s", g_Paused ? "unpausing" : "pausing")
|
console_print(id,"Server proceed %s", g_Paused ? "unpausing" : "pausing")
|
||||||
|
|
||||||
switch(get_cvar_num("amx_show_activity")) {
|
switch(get_cvar_num("amx_show_activity")) {
|
||||||
case 2: client_print(0,print_chat,"ADMIN %s: %s server",name,g_Paused ? "unpause" : "pause")
|
case 2: client_print(0,print_chat,"ADMIN %s: %s server",name,g_Paused ? "unpause" : "pause")
|
||||||
@ -540,7 +517,7 @@ public cmdRcon(id,level,cid){
|
|||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
log_amx("Cmd: ^"%s<%d><%s><>^" server console (cmdline ^"%s^")",
|
log_amx("Cmd: ^"%s<%d><%s><>^" server console (cmdline ^"%s^")",
|
||||||
name,get_user_userid(id),authid, arg)
|
name,get_user_userid(id),authid, arg)
|
||||||
console_print(id,"[AMXX] Commmand line ^"%s^" sent to server console",arg)
|
console_print(id,"Commmand line ^"%s^" sent to server console",arg)
|
||||||
server_cmd(arg)
|
server_cmd(arg)
|
||||||
return PLUGIN_HANDLED
|
return PLUGIN_HANDLED
|
||||||
}
|
}
|
||||||
@ -594,14 +571,14 @@ public cmdLeave(id,level,cid){
|
|||||||
get_user_name(b,nick,31)
|
get_user_name(b,nick,31)
|
||||||
ires = hasTag(nick,ltags,ltagsnum)
|
ires = hasTag(nick,ltags,ltagsnum)
|
||||||
if (ires!=-1){
|
if (ires!=-1){
|
||||||
console_print(id,"[AMXX] Skipping ^"%s^" (matching ^"%s^")",nick,ltags[ires])
|
console_print(id,"Skipping ^"%s^" (matching ^"%s^")",nick,ltags[ires])
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (get_user_flags(b)&ADMIN_IMMUNITY){
|
if (get_user_flags(b)&ADMIN_IMMUNITY){
|
||||||
console_print(id,"[AMXX] Skipping ^"%s^" (immunity)",nick)
|
console_print(id,"Skipping ^"%s^" (immunity)",nick)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
console_print(id,"[AMXX] Kicking ^"%s^"",nick)
|
console_print(id,"Kicking ^"%s^"",nick)
|
||||||
if (is_user_bot(b))
|
if (is_user_bot(b))
|
||||||
server_cmd("kick #%d",get_user_userid(b))
|
server_cmd("kick #%d",get_user_userid(b))
|
||||||
else
|
else
|
||||||
@ -614,7 +591,7 @@ public cmdLeave(id,level,cid){
|
|||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
}
|
}
|
||||||
console_print(id,"[AMXX] Kicked %d clients",count)
|
console_print(id,"Kicked %d clients",count)
|
||||||
new authid[32],name[32]
|
new authid[32],name[32]
|
||||||
get_user_authid(id,authid,31)
|
get_user_authid(id,authid,31)
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
|
@ -41,7 +41,7 @@ new g_timeInfo1[] = "Time Left: %d:%02d min. Next Map: %s"
|
|||||||
new g_timeInfo2[] = "No Time Limit. Next Map: %s"
|
new g_timeInfo2[] = "No Time Limit. Next Map: %s"
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("Admin Help","0.16","AMXX Dev Team")
|
register_plugin("Admin Help","0.1","AMXX Dev Team")
|
||||||
register_concmd("amx_help","cmdHelp",0,"- displays this help")
|
register_concmd("amx_help","cmdHelp",0,"- displays this help")
|
||||||
setHelp(0)
|
setHelp(0)
|
||||||
}
|
}
|
||||||
@ -51,11 +51,11 @@ public client_putinserver(id)
|
|||||||
|
|
||||||
public cmdHelp(id,level,cid){
|
public cmdHelp(id,level,cid){
|
||||||
new arg1[8],flags = get_user_flags(id)
|
new arg1[8],flags = get_user_flags(id)
|
||||||
new start = read_argv(1,arg1,7) ? str_to_num(arg1) : 1
|
new start = read_argv(1,arg1,7) ? str_to_int(arg1) : 1
|
||||||
if (--start < 0) start = 0
|
if (--start < 0) start = 0
|
||||||
new clcmdsnum = get_concmdsnum(flags,id)
|
new clcmdsnum = get_concmdsnum(flags,id)
|
||||||
if (start >= clcmdsnum) start = clcmdsnum - 1
|
if (start >= clcmdsnum) start = clcmdsnum - 1
|
||||||
console_print(id,"^n----- AMX Mod X Help: Commands -----")
|
console_print(id,"^n----- AMX Help: Commands -----")
|
||||||
new info[128], cmd[32], eflags
|
new info[128], cmd[32], eflags
|
||||||
new end = start + HELPAMOUNT
|
new end = start + HELPAMOUNT
|
||||||
if (end > clcmdsnum) end = clcmdsnum
|
if (end > clcmdsnum) end = clcmdsnum
|
||||||
|
@ -42,7 +42,7 @@ new g_cmdLoopback[16]
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Slots Reservation","0.16","AMXX Dev Team")
|
register_plugin("Slots Reservation","0.1","AMXX Dev Team")
|
||||||
register_cvar("amx_reservation","1")
|
register_cvar("amx_reservation","1")
|
||||||
|
|
||||||
format( g_cmdLoopback, 15, "amxres%c%c%c%c" ,
|
format( g_cmdLoopback, 15, "amxres%c%c%c%c" ,
|
||||||
|
@ -54,7 +54,7 @@ new bool:g_execResult
|
|||||||
new Float:g_voteRatio
|
new Float:g_voteRatio
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("Admin Votes","0.16","AMXX Dev Team")
|
register_plugin("Admin Votes","0.1","AMXX Dev Team")
|
||||||
register_menucmd(register_menuid("Change map to ") ,(1<<0)|(1<<1),"voteCount")
|
register_menucmd(register_menuid("Change map to ") ,(1<<0)|(1<<1),"voteCount")
|
||||||
register_menucmd(register_menuid("Choose map: ") ,(1<<0)|(1<<1)|(1<<2)|(1<<3),"voteCount")
|
register_menucmd(register_menuid("Choose map: ") ,(1<<0)|(1<<1)|(1<<2)|(1<<3),"voteCount")
|
||||||
register_menucmd(register_menuid("Kick ") ,(1<<0)|(1<<1),"voteCount")
|
register_menucmd(register_menuid("Kick ") ,(1<<0)|(1<<1),"voteCount")
|
||||||
@ -333,7 +333,7 @@ public cmdVoteKickBan(id,level,cid) {
|
|||||||
if (voteban)
|
if (voteban)
|
||||||
get_user_authid(player,g_optionName[0],31)
|
get_user_authid(player,g_optionName[0],31)
|
||||||
else
|
else
|
||||||
num_to_str(get_user_userid(player),g_optionName[0],31)
|
int_to_str(get_user_userid(player),g_optionName[0],31)
|
||||||
new authid[32],name[32]
|
new authid[32],name[32]
|
||||||
get_user_authid(id,authid,31)
|
get_user_authid(id,authid,31)
|
||||||
get_user_name(id,name,31)
|
get_user_name(id,name,31)
|
||||||
|
@ -38,7 +38,7 @@ new Float:g_Flooding[33]
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Anti Flood","0.16","AMXX Dev Team")
|
register_plugin("Anti Flood","0.1","AMXX Dev Team")
|
||||||
register_clcmd("say","chkFlood")
|
register_clcmd("say","chkFlood")
|
||||||
register_clcmd("say_team","chkFlood")
|
register_clcmd("say_team","chkFlood")
|
||||||
register_cvar("amx_flood_time","0.75")
|
register_cvar("amx_flood_time","0.75")
|
||||||
|
@ -88,24 +88,22 @@ new g_cstrikeRunning
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Commands Menu","0.16","AMXX Dev Team")
|
register_plugin("Commands Menu","0.1","AMXX Dev Team")
|
||||||
|
|
||||||
new configsDir[64];
|
new basedir[32], workdir[64]
|
||||||
get_configsdir(configsDir, 63);
|
get_basedir( basedir , 31 )
|
||||||
new config[64]
|
|
||||||
for(new a = 0; a < MAX_CMDS_LAYERS; ++a) {
|
for(new a = 0; a < MAX_CMDS_LAYERS; ++a) {
|
||||||
register_menucmd(register_menuid( g_cmdMenuName[ a ] ),1023,"actionCmdMenu")
|
register_menucmd(register_menuid( g_cmdMenuName[ a ] ),1023,"actionCmdMenu")
|
||||||
register_clcmd( g_cmdMenuCmd[ a ] ,"cmdCmdMenu",ADMIN_MENU, g_cmdMenuHelp[ a ] )
|
register_clcmd( g_cmdMenuCmd[ a ] ,"cmdCmdMenu",ADMIN_MENU, g_cmdMenuHelp[ a ] )
|
||||||
format(config,63,"%s/%s",configsDir,g_cmdMenuCfg[a])
|
format( workdir, 63, "%s/configs/%s" , basedir , g_cmdMenuCfg[ a ] )
|
||||||
loadCmdSettings(config,a)
|
loadCmdSettings( workdir , a )
|
||||||
}
|
}
|
||||||
|
|
||||||
register_menucmd(register_menuid("Cvars Menu"),1023,"actionCvarMenu")
|
register_menucmd(register_menuid("Cvars Menu"),1023,"actionCvarMenu")
|
||||||
register_clcmd("amx_cvarmenu","cmdCvarMenu",ADMIN_CVAR,"- displays cvars menu")
|
register_clcmd("amx_cvarmenu","cmdCvarMenu",ADMIN_CVAR,"- displays cvars menu")
|
||||||
|
|
||||||
new cvars_ini_file[64];
|
format( workdir, 63, "%s/configs/cvars.ini" , basedir )
|
||||||
format(cvars_ini_file, 63, "%s/%s", configsDir, "cvars.ini");
|
loadCvarSettings( workdir )
|
||||||
loadCvarSettings(cvars_ini_file)
|
|
||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
}
|
}
|
||||||
|
@ -46,12 +46,12 @@ new g_MessagesNum
|
|||||||
new g_Current
|
new g_Current
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Info. Messages","0.16","AMXX Dev Team")
|
register_plugin("Info. Messages","0.1","AMXX Dev Team")
|
||||||
register_srvcmd("amx_imessage","setMessage")
|
register_srvcmd("amx_imessage","setMessage")
|
||||||
register_cvar("amx_freq_imessage","10")
|
register_cvar("amx_freq_imessage","10")
|
||||||
new lastinfo[8]
|
new lastinfo[8]
|
||||||
get_localinfo("lastinfomsg",lastinfo,7)
|
get_localinfo("lastinfomsg",lastinfo,7)
|
||||||
g_Current = str_to_num(lastinfo)
|
g_Current = str_to_int(lastinfo)
|
||||||
set_localinfo("lastinfomsg","")
|
set_localinfo("lastinfomsg","")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,11 +82,11 @@ public setMessage(id,level,cid) {
|
|||||||
while(replace(g_Messages[g_MessagesNum],380,"\n","^n")){}
|
while(replace(g_Messages[g_MessagesNum],380,"\n","^n")){}
|
||||||
new mycol[12]
|
new mycol[12]
|
||||||
read_argv(2,mycol,11) // RRRGGGBBB
|
read_argv(2,mycol,11) // RRRGGGBBB
|
||||||
g_Values[g_MessagesNum][2] = str_to_num(mycol[6])
|
g_Values[g_MessagesNum][2] = str_to_int(mycol[6])
|
||||||
mycol[6] = 0
|
mycol[6] = 0
|
||||||
g_Values[g_MessagesNum][1] = str_to_num(mycol[3])
|
g_Values[g_MessagesNum][1] = str_to_int(mycol[3])
|
||||||
mycol[3] = 0
|
mycol[3] = 0
|
||||||
g_Values[g_MessagesNum][0] = str_to_num(mycol[0])
|
g_Values[g_MessagesNum][0] = str_to_int(mycol[0])
|
||||||
g_MessagesNum++
|
g_MessagesNum++
|
||||||
new Float:freq_im = get_cvar_float("amx_freq_imessage")
|
new Float:freq_im = get_cvar_float("amx_freq_imessage")
|
||||||
if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345)
|
if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345)
|
||||||
@ -95,6 +95,6 @@ public setMessage(id,level,cid) {
|
|||||||
|
|
||||||
public plugin_end(){
|
public plugin_end(){
|
||||||
new lastinfo[8]
|
new lastinfo[8]
|
||||||
num_to_str(g_Current,lastinfo,7)
|
int_to_str(g_Current,lastinfo,7)
|
||||||
set_localinfo("lastinfomsg",lastinfo)
|
set_localinfo("lastinfomsg",lastinfo)
|
||||||
}
|
}
|
@ -49,7 +49,7 @@ stock Entvars_Set_Byte(iIndex, iVariable, iNewValue)
|
|||||||
return entity_set_byte(iIndex, iVariable, iNewValue)
|
return entity_set_byte(iIndex, iVariable, iNewValue)
|
||||||
|
|
||||||
stock CreateEntity(szClassname[])
|
stock CreateEntity(szClassname[])
|
||||||
return create_entity(szClassname)
|
return create_entity(szClassname[])
|
||||||
|
|
||||||
stock ENT_SetModel(iIndex, szModel[])
|
stock ENT_SetModel(iIndex, szModel[])
|
||||||
return entity_set_model(iIndex, szModel)
|
return entity_set_model(iIndex, szModel)
|
||||||
@ -58,7 +58,7 @@ stock ENT_SetOrigin(iIndex, Float:fNewOrigin[3])
|
|||||||
return entity_set_origin(iIndex, fNewOrigin)
|
return entity_set_origin(iIndex, fNewOrigin)
|
||||||
|
|
||||||
stock FindEntity(iIndex, szValue[])
|
stock FindEntity(iIndex, szValue[])
|
||||||
return find_ent_by_class(iIndex, szValue)
|
return find_entity(iIndex, szValue)
|
||||||
|
|
||||||
stock RemoveEntity(iIndex)
|
stock RemoveEntity(iIndex)
|
||||||
return remove_entity(iIndex)
|
return remove_entity(iIndex)
|
||||||
@ -96,9 +96,6 @@ stock AttachView(iIndex, iTargetIndex)
|
|||||||
stock SetView(iIndex, ViewType)
|
stock SetView(iIndex, ViewType)
|
||||||
return set_view(iIndex, ViewType)
|
return set_view(iIndex, ViewType)
|
||||||
|
|
||||||
stock SetSpeak(iIndex, iSpeakFlags)
|
|
||||||
return set_speak(iIndex, iSpeakFlags)
|
|
||||||
|
|
||||||
forward vexd_pfntouch(pToucher, pTouched)
|
forward vexd_pfntouch(pToucher, pTouched)
|
||||||
|
|
||||||
forward ServerFrame()
|
forward ServerFrame()
|
@ -11,7 +11,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _amxconst_included
|
#define _amxconst_included
|
||||||
|
|
||||||
#define AMXX_VERSION 0.16
|
#define AMXX_VERSION 0.1
|
||||||
|
|
||||||
/* Uncomment if you are not using Steam */
|
/* Uncomment if you are not using Steam */
|
||||||
//#define NO_STEAM
|
//#define NO_STEAM
|
||||||
@ -97,7 +97,6 @@
|
|||||||
#define CSW_FIVESEVEN 11
|
#define CSW_FIVESEVEN 11
|
||||||
#define CSW_UMP45 12
|
#define CSW_UMP45 12
|
||||||
#define CSW_SG550 13
|
#define CSW_SG550 13
|
||||||
#define CSW_GALI 14
|
|
||||||
#define CSW_GALIL 14
|
#define CSW_GALIL 14
|
||||||
#define CSW_FAMAS 15
|
#define CSW_FAMAS 15
|
||||||
#define CSW_USP 16
|
#define CSW_USP 16
|
||||||
@ -209,15 +208,3 @@ enum {
|
|||||||
force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
|
force_model_samebounds, /* For model files only, the geometry must fit in the same bbox */
|
||||||
force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
|
force_model_specifybounds, /* For model files only, the geometry must fit in the specified bbox */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Status for get_module() */
|
|
||||||
enum {
|
|
||||||
module_none = 0,
|
|
||||||
module_query,
|
|
||||||
module_badload,
|
|
||||||
module_loaded,
|
|
||||||
module_noinfo,
|
|
||||||
module_noquery,
|
|
||||||
module_noattach,
|
|
||||||
module_old,
|
|
||||||
};
|
|
@ -42,7 +42,7 @@ stock cmd_target(id,const arg[],flags = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] )
|
else if ( ( player = find_player("c",arg) )==0 && arg[0]=='#' && arg[1] )
|
||||||
player = find_player("k",str_to_num(arg[1]))
|
player = find_player("k",strtonum(arg[1]))
|
||||||
if (!player) {
|
if (!player) {
|
||||||
console_print(id,"Client with that name or userid not found")
|
console_print(id,"Client with that name or userid not found")
|
||||||
return 0
|
return 0
|
||||||
@ -91,20 +91,12 @@ stock is_running(const arg[]) {
|
|||||||
return equal(mod_name,arg)
|
return equal(mod_name,arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stock build_path( path[] , len , {Float,_}:... ) {
|
||||||
|
new basedir[32]
|
||||||
|
get_localinfo( "amxx_basedir", basedir , 31 )
|
||||||
|
format_args( path , len , 2 )
|
||||||
|
return replace( path , len , "$basedir", basedir )
|
||||||
|
}
|
||||||
|
|
||||||
stock get_basedir( name[], len )
|
stock get_basedir( name[], len )
|
||||||
return get_localinfo( "amxx_basedir", name , len )
|
return get_localinfo( "amxx_basedir", name , len )
|
||||||
|
|
||||||
stock get_configsdir(name[],len)
|
|
||||||
return get_localinfo("amxx_configsdir",name,len)
|
|
||||||
|
|
||||||
stock get_customdir(name[],len)
|
|
||||||
return get_localinfo("amxx_customdir",name,len)
|
|
||||||
|
|
||||||
#if defined NO_STEAM
|
|
||||||
stock get_user_wonid(index)
|
|
||||||
{
|
|
||||||
new authid[32]
|
|
||||||
get_user_authid(index,authid,31)
|
|
||||||
return str_to_num(authid)
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -15,9 +15,20 @@
|
|||||||
#include <engine>
|
#include <engine>
|
||||||
#include <fun>
|
#include <fun>
|
||||||
|
|
||||||
|
native numtostr(num,string[],len)
|
||||||
|
|
||||||
|
native strtonum(const string[])
|
||||||
|
|
||||||
|
stock set_user_hitzones(index=0,target=0,body=255)
|
||||||
|
return set_hitzones(body)
|
||||||
|
|
||||||
|
stock get_user_hitzones(index,target)
|
||||||
|
return get_hitzones()
|
||||||
|
|
||||||
stock user_spawn(index)
|
stock user_spawn(index)
|
||||||
return spawn(index)
|
return spawn(index)
|
||||||
|
|
||||||
|
/* use log_amx() instead */
|
||||||
stock get_logfile( name[], len )
|
stock get_logfile( name[], len )
|
||||||
return get_time("admin%m%d.log",name,len)
|
return get_time("admin%m%d.log",name,len)
|
||||||
|
|
||||||
@ -26,17 +37,3 @@ stock get_user_money(index)
|
|||||||
|
|
||||||
stock set_user_money(index,money,flash=1)
|
stock set_user_money(index,money,flash=1)
|
||||||
return cs_set_user_money(index,money,flash)
|
return cs_set_user_money(index,money,flash)
|
||||||
|
|
||||||
stock numtostr(num,string[],len)
|
|
||||||
return num_to_str(num,string,len)
|
|
||||||
|
|
||||||
stock strtonum(const string[])
|
|
||||||
return str_to_num(string)
|
|
||||||
|
|
||||||
stock build_path( path[] , len , {Float,_}:... )
|
|
||||||
{
|
|
||||||
new basedir[32]
|
|
||||||
get_localinfo("amxx_basedir",basedir,31)
|
|
||||||
format_args(path,len,2)
|
|
||||||
return replace(path,len,"$basedir",basedir)
|
|
||||||
}
|
|
@ -254,6 +254,9 @@ native get_user_name(index,name[],len);
|
|||||||
/* Gets player authid. */
|
/* Gets player authid. */
|
||||||
native get_user_authid(index, authid[] ,len);
|
native get_user_authid(index, authid[] ,len);
|
||||||
|
|
||||||
|
/* Returns player wonid. */
|
||||||
|
native get_user_wonid(index);
|
||||||
|
|
||||||
/* Returns player userid. */
|
/* Returns player userid. */
|
||||||
native get_user_userid(index);
|
native get_user_userid(index);
|
||||||
|
|
||||||
@ -442,21 +445,6 @@ 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. */
|
||||||
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
|
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
|
||||||
|
|
||||||
/* These functinos are used to generate client messages.
|
|
||||||
* You may generate menu, smoke, shockwaves, thunderlights,
|
|
||||||
* intermission and many many others messages.
|
|
||||||
* See HL SDK for more examples. */
|
|
||||||
native message_begin( dest, msg_type, origin[3]={0,0,0},player=0);
|
|
||||||
native message_end();
|
|
||||||
native write_byte( x );
|
|
||||||
native write_char( x );
|
|
||||||
native write_short( x );
|
|
||||||
native write_long( x );
|
|
||||||
native write_entity( x );
|
|
||||||
native write_angle( x );
|
|
||||||
native write_coord( x );
|
|
||||||
native write_string( x[] );
|
|
||||||
|
|
||||||
/* Gets info about client command. */
|
/* Gets info about client command. */
|
||||||
native get_clcmd(index, command[], len1, &flags, info[], len2, flag);
|
native get_clcmd(index, command[], len1, &flags, info[], len2, flag);
|
||||||
|
|
||||||
@ -548,11 +536,10 @@ native is_module_loaded(const name[]);
|
|||||||
* authorLen - maximal length of the author
|
* authorLen - maximal length of the author
|
||||||
* version[] - the version of the module will be stored here
|
* version[] - the version of the module will be stored here
|
||||||
* versionLen - maximal length of the version
|
* versionLen - maximal length of the version
|
||||||
* status - the status of the module will be stored here
|
|
||||||
* Return value:
|
* Return value:
|
||||||
* id - success
|
* id - success
|
||||||
* -1 - module not found */
|
* -1 - module not found */
|
||||||
native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen, &status);
|
native get_module(id, name[], nameLen, author[], authorLen, version[], versionLen);
|
||||||
|
|
||||||
/* Returns number of currently registered modules */
|
/* Returns number of currently registered modules */
|
||||||
native get_modulesnum();
|
native get_modulesnum();
|
||||||
|
@ -17,10 +17,10 @@ native cs_get_user_deaths(index);
|
|||||||
native cs_set_user_deaths(index, newdeaths);
|
native cs_set_user_deaths(index, newdeaths);
|
||||||
|
|
||||||
/* Returns index of entity (does not have to be a player) which hostage is following. 0 is hostage doesn't follow anything. */
|
/* Returns index of entity (does not have to be a player) which hostage is following. 0 is hostage doesn't follow anything. */
|
||||||
native cs_get_hostage_foll(index);
|
native cs_get_hostage_follow(index);
|
||||||
|
|
||||||
/* Set hostage to follow entity specified in followedindex. Does not have to be a player. If followedindex is 0 the hostage will stop following. */
|
/* Set hostage to follow entity specified in followedindex. Does not have to be a player. If followedindex is 0 the hostage will stop following. */
|
||||||
native cs_set_hostage_foll(index, followedindex = 0);
|
native cs_set_hostage_follow(index, followedindex = 0);
|
||||||
|
|
||||||
/* Get unique hostage id. */
|
/* Get unique hostage id. */
|
||||||
native cs_get_hostage_id(index);
|
native cs_get_hostage_id(index);
|
||||||
@ -41,21 +41,21 @@ native cs_get_hostage_id(index);
|
|||||||
* flash
|
* flash
|
||||||
* he
|
* he
|
||||||
* smoke */
|
* smoke */
|
||||||
native cs_get_user_bpammo(index, weapon);
|
native cs_get_user_backpackammo(index, weapon);
|
||||||
|
|
||||||
/* Restock/remove ammo in a user's backpack. */
|
/* Restock/remove ammo in a user's backpack. */
|
||||||
native cs_set_user_bpammo(index, weapon, amount);
|
native cs_set_user_backpackammo(index, weapon, amount);
|
||||||
|
|
||||||
/* Returns 1 if user has a defuse kit. */
|
/* Returns 1 if user has a defuse kit. */
|
||||||
native cs_get_user_defuse(index);
|
native cs_get_user_defusekit(index);
|
||||||
|
|
||||||
/* If defusekit is 1, the user will have a defuse kit.
|
/* If defusekit is 1, the user will have a defuse kit.
|
||||||
* You can specify a different colour for the defuse kit icon showing on hud. Default is the normal green.
|
* You can specify a different colour for the defuse kit icon showing on hud. Default is the normal green.
|
||||||
* You can specify an icon. Default is "defuser". Set flash to 1 if you want the icon to flash red. */
|
* You can specify an icon. Default is "defuser". Set flash to 1 if you want the icon to flash red. */
|
||||||
native cs_set_user_defuse(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0);
|
native cs_set_user_defusekit(index, defusekit = 1, r = 0, g = 160, b = 0, icon[] = "defuser", flash = 0);
|
||||||
|
|
||||||
/* Is user in buyzone? Returns 1 when true, 0 when false. */
|
/* Is user in buyzone? Returns 1 when true, 0 when false. */
|
||||||
native cs_get_user_buyzone(index);
|
native cs_get_user_inside_buyzone(index);
|
||||||
|
|
||||||
/* Get user model. */
|
/* Get user model. */
|
||||||
native cs_get_user_model(index, model[], len);
|
native cs_get_user_model(index, model[], len);
|
||||||
@ -73,10 +73,10 @@ native cs_get_user_money(index);
|
|||||||
native cs_set_user_money(index, money, flash = 1);
|
native cs_set_user_money(index, money, flash = 1);
|
||||||
|
|
||||||
/* Does user have night vision goggles? */
|
/* Does user have night vision goggles? */
|
||||||
native cs_get_user_nvg(index);
|
native cs_get_user_nvgoggles(index);
|
||||||
|
|
||||||
/* Set nvgoggles to 1 to give night vision goggles to index. Set it to 0 to remove them. */
|
/* Set nvgoggles to 1 to give night vision goggles to index. Set it to 0 to remove them. */
|
||||||
native cs_set_user_nvg(index, nvgoggles = 1);
|
native cs_set_user_nvgoggles(index, nvgoggles = 1);
|
||||||
|
|
||||||
/* Returns 1 if user has the "skill" to plant bomb, else 0. Normally this would only be true for a terrorist carrying a bomb. */
|
/* Returns 1 if user has the "skill" to plant bomb, else 0. Normally this would only be true for a terrorist carrying a bomb. */
|
||||||
native cs_get_user_plant(index);
|
native cs_get_user_plant(index);
|
||||||
@ -104,20 +104,14 @@ native cs_get_user_vip(index);
|
|||||||
native cs_set_user_vip(index, vip = 1);
|
native cs_set_user_vip(index, vip = 1);
|
||||||
|
|
||||||
/* Returns 1 if specified weapon is in burst mode. */
|
/* Returns 1 if specified weapon is in burst mode. */
|
||||||
native cs_get_weapon_burst(index);
|
native cs_get_weapon_burstmode(index);
|
||||||
|
|
||||||
/* If burstmode = 1, weapon will be changed to burst mode, 0 and non-burst mode (semiautomatic/automatic) will be activated.
|
/* If burstmode = 1, weapon will be changed to burst mode, 0 and non-burst mode (semiautomatic/automatic) will be activated.
|
||||||
* Only GLOCK and FAMAS can enter/leave burst mode. */
|
* Only GLOCK and FAMAS can enter/leave burst mode. */
|
||||||
native cs_set_weapon_burst(index, burstmode = 1);
|
native cs_set_weapon_burstmode(index, burstmode = 1);
|
||||||
|
|
||||||
/* Returns 1 if weapon is silenced, else 0. */
|
/* Returns 1 if weapon is silenced, else 0. */
|
||||||
native cs_get_weapon_silen(index);
|
native cs_get_weapon_silenced(index);
|
||||||
|
|
||||||
/* If silence = 1, weapon will be silenced, 0 and silencer will be removed. Only USP and M4A1 can be silenced. */
|
/* If silence = 1, weapon will be silenced, 0 and silencer will be removed. Only USP and M4A1 can be silenced. */
|
||||||
native cs_set_weapon_silen(index, silence = 1);
|
native cs_set_weapon_silenced(index, silence = 1);
|
||||||
|
|
||||||
/* Returns amount of ammo in weapon's clip. */
|
|
||||||
native cs_get_weapon_ammo(index);
|
|
||||||
|
|
||||||
/* Set amount of ammo in weapon's clip. */
|
|
||||||
native cs_set_weapon_ammo(index, newammo);
|
|
@ -13,6 +13,21 @@
|
|||||||
|
|
||||||
#include <engine_const>
|
#include <engine_const>
|
||||||
|
|
||||||
|
/* These functinos are used to generate client messages.
|
||||||
|
* You may generate menu, smoke, shockwaves, thunderlights,
|
||||||
|
* intermission and many many others messages.
|
||||||
|
* See HL SDK for more examples. */
|
||||||
|
native message_begin( dest, msg_type, origin[3]={0,0,0},player=0);
|
||||||
|
native message_end();
|
||||||
|
native write_byte( x );
|
||||||
|
native write_char( x );
|
||||||
|
native write_short( x );
|
||||||
|
native write_long( x );
|
||||||
|
native write_entity( x );
|
||||||
|
native write_angle( x );
|
||||||
|
native write_coord( x );
|
||||||
|
native write_string( x[] );
|
||||||
|
|
||||||
/* This is a highly experimental command that will directly hook a message in the engine!
|
/* This is a highly experimental command that will directly hook a message in the engine!
|
||||||
* You can overwrite the message before anything happens and either let the message continue
|
* You can overwrite the message before anything happens and either let the message continue
|
||||||
* or fully block it. Here is how it works:
|
* or fully block it. Here is how it works:
|
||||||
@ -24,7 +39,7 @@ native register_message(iMsgId, szFunction[]);
|
|||||||
/* The get/set _msg commands will utterly fail if used outside a hooked message scope.
|
/* The get/set _msg commands will utterly fail if used outside a hooked message scope.
|
||||||
* They should never, NEVER, EVER be used unless inside a registered message function.
|
* They should never, NEVER, EVER be used unless inside a registered message function.
|
||||||
* There are eight different ways of sending a message, five are ints, two are floats, and one is string.
|
* There are eight different ways of sending a message, five are ints, two are floats, and one is string.
|
||||||
* These are denoted by iArgType. argn is the number
|
* These are denoted by iArgType. msg_tid is the message you are hooking. argn is the number
|
||||||
* of the argument. Exceeding the bounds of 1 to get_msg_args() is a bad idea. */
|
* of the argument. Exceeding the bounds of 1 to get_msg_args() is a bad idea. */
|
||||||
|
|
||||||
/* Gets number of arguments that were passed to this message */
|
/* Gets number of arguments that were passed to this message */
|
||||||
@ -51,48 +66,14 @@ native set_msg_arg_string(argn, szString[]);
|
|||||||
native get_offset(id, offset);
|
native get_offset(id, offset);
|
||||||
native Float:get_offset_float(id, offset);
|
native Float:get_offset_float(id, offset);
|
||||||
native get_offset_short(id, offset);
|
native get_offset_short(id, offset);
|
||||||
native get_offset_char(id, offset);
|
|
||||||
|
|
||||||
/* sets pvPrivateData offset. */
|
/* sets pvPrivateData offset. */
|
||||||
native set_offset(id, offset, value);
|
native set_offset(id, offset, value);
|
||||||
native set_offset_float(id, offset, Float:value);
|
native set_offset_float(id, offset, Float:value);
|
||||||
native set_offset_short(id, offset, value);
|
native set_offset_short(id, offset);
|
||||||
native set_offset_char(id, offset, value);
|
|
||||||
|
|
||||||
/* Get entity pointer into string pointer[]. If pointer/len is 0 pointer is returned as integer. */
|
|
||||||
native get_entity_pointer(index, pointer[] = 0, len = 0);
|
|
||||||
|
|
||||||
/* Precaches any file. */
|
/* Precaches any file. */
|
||||||
native precache_generic(szFile[]);
|
native precache_generic(szFile[]);
|
||||||
/* Precaches an event. */
|
|
||||||
native precache_event(type, Name[], {float,_}:...);
|
|
||||||
|
|
||||||
//set/get a user's speak flags
|
|
||||||
native set_speak(iIndex, iSpeakFlags)
|
|
||||||
native get_speak(iIndex)
|
|
||||||
|
|
||||||
//Drops an entity to the floor (work?)
|
|
||||||
native drop_to_floor(entity)
|
|
||||||
|
|
||||||
/* Get whole buffer containing keys and their data. */
|
|
||||||
native get_info_keybuffer(id, buffer[], length);
|
|
||||||
|
|
||||||
/* Use an entity with another entity. "used" could be a hostage, "user" a player. */
|
|
||||||
native force_use(pPlayer, pEntity);
|
|
||||||
|
|
||||||
/* Get globals from server. */
|
|
||||||
native Float:get_global_float(variable);
|
|
||||||
native get_global_int(variable);
|
|
||||||
native get_global_string(variable, string[], maxlen);
|
|
||||||
native get_global_vector(variable, Float:vector[3]);
|
|
||||||
native get_global_edict(variable);
|
|
||||||
|
|
||||||
/* Set entity bounds. */
|
|
||||||
native set_size(index, Float:mins[3], Float:maxs[3]);
|
|
||||||
|
|
||||||
/* Get decal index */
|
|
||||||
native get_decal_index(const szDecalName[]);
|
|
||||||
|
|
||||||
|
|
||||||
/* Sets/gets things in an entities Entvars Struct. */
|
/* Sets/gets things in an entities Entvars Struct. */
|
||||||
native entity_get_int(iIndex, iKey);
|
native entity_get_int(iIndex, iKey);
|
||||||
@ -104,22 +85,19 @@ native entity_set_vector(iIndex, iKey, Float:vNewVector[3]);
|
|||||||
native entity_get_edict(iIndex, iKey);
|
native entity_get_edict(iIndex, iKey);
|
||||||
native entity_set_edict(iIndex, iKey, iNewIndex);
|
native entity_set_edict(iIndex, iKey, iNewIndex);
|
||||||
native entity_get_string(iIndex, iKey, szReturn[], iRetLen);
|
native entity_get_string(iIndex, iKey, szReturn[], iRetLen);
|
||||||
native entity_set_string(iIndex, iKey, const szNewVal[]);
|
native entity_set_string(iIndex, iKey, szNewVal[]);
|
||||||
native entity_get_byte(iIndex, iKey);
|
native entity_get_byte(iIndex, iKey);
|
||||||
native entity_set_byte(iIndex, iKey, iVal);
|
native entity_set_byte(iIndex, iKey, iVal);
|
||||||
|
|
||||||
/* Creates an entity, will return the index of the created entity. ClassName must be valid. */
|
/* Creates an entity, will return the index of the created entity. ClassName must be valid. */
|
||||||
native create_entity(szClassname[]);
|
native create_entity(szClassname[]);
|
||||||
|
|
||||||
/* Finds an entity in the world, will return 0 if nothing is found */
|
/* Finds an entity in the world, will return -1 if nothing is found */
|
||||||
native find_ent_by_class(iIndex, szClass[]);
|
native find_entity(iIndex, szClass[]);
|
||||||
//optionally you can set a jghg2 type
|
native find_ent_by_owner(iIndex, szClass[], iOwner);
|
||||||
// 1: target, 2:targetname, 0:classname (default)
|
|
||||||
native find_ent_by_owner(iIndex, szClass[], iOwner, iJghgType=0);
|
|
||||||
native find_ent_by_target(iIndex, szClass[]);
|
native find_ent_by_target(iIndex, szClass[]);
|
||||||
native find_ent_by_tname(iIndex, szClass[]);
|
native find_ent_by_tname(iIndex, szClass[]);
|
||||||
native find_ent_by_model(iIndex, szClass[], szModel[]);
|
native find_ent_by_model(iIndex, szClass[], szModel[]);
|
||||||
native find_ent_in_sphere(start_from_ent, Float:origin[3], Float:radius);
|
|
||||||
|
|
||||||
//this will CBaseEntity::Think() or something from the entity
|
//this will CBaseEntity::Think() or something from the entity
|
||||||
native call_think(entity)
|
native call_think(entity)
|
||||||
@ -131,7 +109,7 @@ native is_valid_ent(iIndex);
|
|||||||
native entity_set_origin(iIndex, Float:fNewOrigin[3]);
|
native entity_set_origin(iIndex, Float:fNewOrigin[3]);
|
||||||
|
|
||||||
/* Sets the model of an Entity. */
|
/* Sets the model of an Entity. */
|
||||||
native entity_set_model(iIndex, const szModel[]);
|
native entity_set_model(iIndex, szModel[]);
|
||||||
|
|
||||||
/* Remove an entity from the world. */
|
/* Remove an entity from the world. */
|
||||||
native remove_entity(iIndex);
|
native remove_entity(iIndex);
|
||||||
@ -206,12 +184,4 @@ forward client_kill(id);
|
|||||||
forward client_PreThink(id);
|
forward client_PreThink(id);
|
||||||
forward client_PostThink(id);
|
forward client_PostThink(id);
|
||||||
|
|
||||||
//from jghg2
|
|
||||||
/* As above, but returns number of ents stored in entlist. Use to find a specific type of entity classname (specify in _lookforclassname) around a
|
|
||||||
* certain entity specified in aroundent. All matching ents are stored in entlist. Specify max amount of entities to find in maxents.
|
|
||||||
* If aroundent is 0 its origin is not used, but origin in 6th parameter. Ie, do not specify 6th parameter (origin) if you specified an entity
|
|
||||||
* in aroundent.
|
|
||||||
*/
|
|
||||||
native find_sphere_class(aroundent, _lookforclassname[], Float:radius, entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0});
|
|
||||||
|
|
||||||
#include <engine_stocks>
|
#include <engine_stocks>
|
@ -308,52 +308,3 @@ enum {
|
|||||||
#define EF_NOINTERP 32 /* don't interpolate the next frame */
|
#define EF_NOINTERP 32 /* don't interpolate the next frame */
|
||||||
#define EF_LIGHT 64 /* rocket flare glow sprite */
|
#define EF_LIGHT 64 /* rocket flare glow sprite */
|
||||||
#define EF_NODRAW 128 /* don't draw entity */
|
#define EF_NODRAW 128 /* don't draw entity */
|
||||||
|
|
||||||
#if defined _jghg_enums
|
|
||||||
#endinput
|
|
||||||
#endif
|
|
||||||
#define _jghg_enums
|
|
||||||
enum {
|
|
||||||
// Edict
|
|
||||||
GL_trace_ent = 0,
|
|
||||||
|
|
||||||
// Float
|
|
||||||
GL_coop,
|
|
||||||
GL_deathmatch,
|
|
||||||
GL_force_retouch,
|
|
||||||
GL_found_secrets,
|
|
||||||
GL_frametime,
|
|
||||||
GL_serverflags,
|
|
||||||
GL_teamplay,
|
|
||||||
GL_time,
|
|
||||||
GL_trace_allsolid,
|
|
||||||
GL_trace_fraction,
|
|
||||||
GL_trace_inopen,
|
|
||||||
GL_trace_inwater,
|
|
||||||
GL_trace_plane_dist,
|
|
||||||
GL_trace_startsolid,
|
|
||||||
|
|
||||||
// Int
|
|
||||||
GL_cdAudioTrack,
|
|
||||||
GL_maxClients,
|
|
||||||
GL_maxEntities,
|
|
||||||
GL_msg_entity,
|
|
||||||
GL_trace_flags,
|
|
||||||
GL_trace_hitgroup,
|
|
||||||
|
|
||||||
// String
|
|
||||||
GL_pStringBase,
|
|
||||||
GL_mapname,
|
|
||||||
GL_startspot,
|
|
||||||
|
|
||||||
// Vector
|
|
||||||
GL_trace_endpos,
|
|
||||||
GL_trace_plane_normal,
|
|
||||||
GL_v_forward,
|
|
||||||
GL_v_right,
|
|
||||||
GL_v_up,
|
|
||||||
GL_vecLandmarkOffset,
|
|
||||||
|
|
||||||
// Void (not supported)
|
|
||||||
GL_pSaveData
|
|
||||||
}
|
|
@ -11,12 +11,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _engine_stocks_included
|
#define _engine_stocks_included
|
||||||
|
|
||||||
//wrapper for find_ent_by_class
|
|
||||||
stock find_ent(iStart, szClassname[])
|
|
||||||
{
|
|
||||||
return find_ent_by_class(iStart, szClassname)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Changes an integer vec to a floating vec */
|
/* Changes an integer vec to a floating vec */
|
||||||
|
|
||||||
stock IVecFVec(IVec[3], Float:FVec[3])
|
stock IVecFVec(IVec[3], Float:FVec[3])
|
||||||
@ -67,13 +61,13 @@ stock get_entity_distance(ent1, ent2)
|
|||||||
/* Get grenade thrown by this user */
|
/* Get grenade thrown by this user */
|
||||||
stock get_grenade(id)
|
stock get_grenade(id)
|
||||||
{
|
{
|
||||||
new iGrenade = find_ent_by_class(-1, "grenade")
|
new iGrenade = find_entity(-1, "grenade")
|
||||||
while(iGrenade > 0)
|
while(iGrenade > 0)
|
||||||
{
|
{
|
||||||
if(entity_get_edict(iGrenade, EV_ENT_owner) == id)
|
if(entity_get_edict(iGrenade, EV_ENT_owner) == id)
|
||||||
return iGrenade
|
return iGrenade
|
||||||
|
|
||||||
iGrenade = find_ent_by_class(iGrenade, "grenade")
|
iGrenade = find_entity(iGrenade, "grenade")
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -98,7 +92,7 @@ stock remove_entity_name(eName[])
|
|||||||
while (iEntity > 0)
|
while (iEntity > 0)
|
||||||
{
|
{
|
||||||
remove_entity(iEntity)
|
remove_entity(iEntity)
|
||||||
iEntity = find_ent_by_class(-1, eName)
|
iEntity = find_entity(-1, eName)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
@ -192,15 +186,3 @@ stock set_entity_flags(ent,flag,onoff)
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If visible = 1, entity will be set to be visible, else invisible. */
|
|
||||||
stock set_entity_visibility(entity, visible = 1) {
|
|
||||||
entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW)
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns 1 if entity is visible. */
|
|
||||||
stock get_entity_visibility(entity) {
|
|
||||||
return (entity_get_int(entity, EV_INT_effects) & EF_NODRAW)
|
|
||||||
}
|
|
@ -5,11 +5,6 @@
|
|||||||
* This file is provided as is (no warranties).
|
* This file is provided as is (no warranties).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined _fun_included
|
|
||||||
#endinput
|
|
||||||
#endif
|
|
||||||
#define _fun_included
|
|
||||||
|
|
||||||
/* Returns 1 if receiver hears sender via voice communication. */
|
/* Returns 1 if receiver hears sender via voice communication. */
|
||||||
native get_client_listen(receiver, sender);
|
native get_client_listen(receiver, sender);
|
||||||
|
|
||||||
@ -40,25 +35,21 @@ native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255,
|
|||||||
* is announced with proper message to all players. */
|
* is announced with proper message to all players. */
|
||||||
native give_item(index, const item[]);
|
native give_item(index, const item[]);
|
||||||
|
|
||||||
/* Sets hit zones for player.
|
/* (not yet implemented, don't know how to use native)
|
||||||
|
* Sets hit zones for player. This event is announced
|
||||||
|
* with proper message to all players.
|
||||||
* Parts of body are as bits:
|
* Parts of body are as bits:
|
||||||
* 1 - generic
|
|
||||||
* 2 - head
|
* 2 - head
|
||||||
* 4 - chest
|
* 4 - chest
|
||||||
* 8 - stomach
|
* 8 - stomach
|
||||||
* 16 - left arm
|
* 16 - left arm
|
||||||
* 32 - right arm
|
* 32 - right arm
|
||||||
* 64 - left leg
|
* 64 - left leg
|
||||||
* 128 - right leg
|
* 128 - right leg */
|
||||||
* Set index to a player's index and leave target at 0 to define what bodyparts this player can hit when he is firing.
|
native set_hitzones(body = 255);
|
||||||
* Set index to 0 and target to a player's index to define what bodyparts on player other players can hit when they are firing.
|
|
||||||
* Set both index and target to 0 to define globally what bodyparts people can hit and what bodyparts can be hit when firing. */
|
|
||||||
native set_user_hitzones(index = 0, target = 0, body = 255);
|
|
||||||
|
|
||||||
/* Get user hitzones.
|
/* Get current hitzones. */
|
||||||
* To get what bodyparts a player can hit when firing, set the player's index to index and target to 0.
|
native get_hitzones();
|
||||||
* To get what bodyparts other players can hit when firing at player, set index to 0 and target to player's index. */
|
|
||||||
native get_user_hitzones(index, target);
|
|
||||||
|
|
||||||
/* Sets users max. speed. */
|
/* Sets users max. speed. */
|
||||||
native set_user_maxspeed(index, Float:speed = -1.0);
|
native set_user_maxspeed(index, Float:speed = -1.0);
|
||||||
|
@ -1,172 +0,0 @@
|
|||||||
// JGHG2 module
|
|
||||||
//This file is provided for backwards compatibility.
|
|
||||||
//It includes the engine and cstrike modules automatically.
|
|
||||||
//It is intended for AMX Mod X
|
|
||||||
|
|
||||||
#if !defined INCLUDED_JGHG
|
|
||||||
#define INCLUDED_JGHG
|
|
||||||
|
|
||||||
#include <engine>
|
|
||||||
#include <cstrike>
|
|
||||||
|
|
||||||
#if !defined _jghg_enums
|
|
||||||
#define _jghg_enums
|
|
||||||
// Global member variables
|
|
||||||
enum {
|
|
||||||
// Edict
|
|
||||||
GL_trace_ent = 0,
|
|
||||||
|
|
||||||
// Float
|
|
||||||
GL_coop,
|
|
||||||
GL_deathmatch,
|
|
||||||
GL_force_retouch,
|
|
||||||
GL_found_secrets,
|
|
||||||
GL_frametime,
|
|
||||||
GL_serverflags,
|
|
||||||
GL_teamplay,
|
|
||||||
GL_time,
|
|
||||||
GL_trace_allsolid,
|
|
||||||
GL_trace_fraction,
|
|
||||||
GL_trace_inopen,
|
|
||||||
GL_trace_inwater,
|
|
||||||
GL_trace_plane_dist,
|
|
||||||
GL_trace_startsolid,
|
|
||||||
|
|
||||||
// Int
|
|
||||||
GL_cdAudioTrack,
|
|
||||||
GL_maxClients,
|
|
||||||
GL_maxEntities,
|
|
||||||
GL_msg_entity,
|
|
||||||
GL_trace_flags,
|
|
||||||
GL_trace_hitgroup,
|
|
||||||
|
|
||||||
// String
|
|
||||||
GL_pStringBase,
|
|
||||||
GL_mapname,
|
|
||||||
GL_startspot,
|
|
||||||
|
|
||||||
// Vector
|
|
||||||
GL_trace_endpos,
|
|
||||||
GL_trace_plane_normal,
|
|
||||||
GL_v_forward,
|
|
||||||
GL_v_right,
|
|
||||||
GL_v_up,
|
|
||||||
GL_vecLandmarkOffset,
|
|
||||||
|
|
||||||
// Void (not supported)
|
|
||||||
GL_pSaveData
|
|
||||||
}
|
|
||||||
|
|
||||||
// jghg_categories
|
|
||||||
enum {
|
|
||||||
jghg2_classname = 0,
|
|
||||||
jghg2_target = 1,
|
|
||||||
jghg2_targetname = 2
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
stock jghg_find_ent_owner(start_from_ent, jghg_category, value[], owner_index)
|
|
||||||
{
|
|
||||||
find_ent_by_owner(start_from_ent, value, owner_index, jghg_category)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock find_ent_sphere(start_from_ent, Float:origin[3], Float:radius)
|
|
||||||
{
|
|
||||||
return find_ent_in_sphere(start_from_ent, origin, radius)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock get_hostage_id(hostage)
|
|
||||||
{
|
|
||||||
return cs_get_hostage_id(hostage)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
stock get_owner(id)
|
|
||||||
{
|
|
||||||
return entity_get_edict(id, EV_ENT_owner)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock get_pdata(entity, offset)
|
|
||||||
{
|
|
||||||
return get_offset(entity, offset)
|
|
||||||
}
|
|
||||||
stock Float:get_pdata_float(entity, offset)
|
|
||||||
{
|
|
||||||
return get_offset_float(entity, offset)
|
|
||||||
}
|
|
||||||
stock get_pdata_char(entity, offset)
|
|
||||||
{
|
|
||||||
return get_offset_char(entity, offset)
|
|
||||||
}
|
|
||||||
stock get_pdata_short(entity, offset)
|
|
||||||
{
|
|
||||||
return get_offset_short(entity, offset)
|
|
||||||
}
|
|
||||||
stock set_pdata(entity, offset, value)
|
|
||||||
{
|
|
||||||
return set_offset(entity, offset, value)
|
|
||||||
}
|
|
||||||
stock set_pdata_float(entity, offset, Float:value)
|
|
||||||
{
|
|
||||||
return set_offset_float(entity, offset, value)
|
|
||||||
}
|
|
||||||
stock set_pdata_char(entity, offset, value)
|
|
||||||
{
|
|
||||||
return set_offset_char(entity, offset, value)
|
|
||||||
}
|
|
||||||
stock set_pdata_short(entity, offset, value)
|
|
||||||
{
|
|
||||||
return set_offset_short(entity, offset, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock is_ent_valid(id)
|
|
||||||
{
|
|
||||||
return is_valid_ent(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock number_of_entities()
|
|
||||||
{
|
|
||||||
return entity_count()
|
|
||||||
}
|
|
||||||
|
|
||||||
stock use(used, user)
|
|
||||||
{
|
|
||||||
return force_use(user, used)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock Float:globals_get_float(variable)
|
|
||||||
{
|
|
||||||
return get_global_float(variable)
|
|
||||||
}
|
|
||||||
stock globals_get_int(variable)
|
|
||||||
{
|
|
||||||
return get_global_int(variable)
|
|
||||||
}
|
|
||||||
stock globals_get_string(variable, string[], maxlen)
|
|
||||||
{
|
|
||||||
return get_global_string(variable, string, maxlen)
|
|
||||||
}
|
|
||||||
stock globals_get_vector(variable, Float:vector[3])
|
|
||||||
{
|
|
||||||
return get_global_vector(variable, vector)
|
|
||||||
}
|
|
||||||
stock globals_get_edict(variable)
|
|
||||||
{
|
|
||||||
return get_global_edict(variable)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock get_max_entities() {
|
|
||||||
return get_global_int(GL_maxEntities)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock jghg2_set_size(index, Float:mins[3], Float:maxs[3])
|
|
||||||
{
|
|
||||||
return set_size(index, mins, maxs)
|
|
||||||
}
|
|
||||||
|
|
||||||
stock jghg2_think(index)
|
|
||||||
{
|
|
||||||
return call_think(index)
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // INCLUDED_JGHG
|
|
@ -40,6 +40,18 @@ native num_to_str(num,string[],len);
|
|||||||
/* Returns converted string to number. */
|
/* Returns converted string to number. */
|
||||||
native str_to_num(const string[]);
|
native str_to_num(const string[]);
|
||||||
|
|
||||||
|
stock int_to_str(num,string[],len)
|
||||||
|
return num_to_str(num,string,len)
|
||||||
|
|
||||||
|
stock str_to_int(const string[])
|
||||||
|
return str_to_num(string)
|
||||||
|
|
||||||
|
stock numtostr(num,string[],len)
|
||||||
|
return num_to_str(num,string,len)
|
||||||
|
|
||||||
|
stock strtonum(const string[])
|
||||||
|
return str_to_num(string)
|
||||||
|
|
||||||
/* Checks if two strings equal. If len var is set
|
/* Checks if two strings equal. If len var is set
|
||||||
* then there are only c chars comapred. */
|
* then there are only c chars comapred. */
|
||||||
native equal(const a[],const b[],c=0);
|
native equal(const a[],const b[],c=0);
|
||||||
|
@ -1,105 +0,0 @@
|
|||||||
/* Xtrafun backwards compatibility
|
|
||||||
*
|
|
||||||
* by the AMX Mod X Development Team
|
|
||||||
* These natives were originally made by SpaceDude, EJ, and JustinHoMi.
|
|
||||||
*
|
|
||||||
* This file is provided as is (no warranties).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined _xtrafun_included
|
|
||||||
#define _xtrafun_included
|
|
||||||
|
|
||||||
#if !defined _engine_included
|
|
||||||
#include <engine.inc>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Gets the velocity of an entity */
|
|
||||||
stock get_entity_velocity(index, velocity[3]) {
|
|
||||||
new Float:vector[3]
|
|
||||||
entity_get_vector(index, EV_VEC_velocity, vector)
|
|
||||||
FVecIVec(vector, velocity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sets the velocity of an entity */
|
|
||||||
stock set_entity_velocity(index, velocity[3]) {
|
|
||||||
new Float:vector[3]
|
|
||||||
IVecFVec(velocity, vector)
|
|
||||||
entity_set_vector(index, EV_VEC_velocity, vector)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Gets the origin of an entity */
|
|
||||||
stock get_entity_origin(index, origin[3]) {
|
|
||||||
new Float:vector[3]
|
|
||||||
entity_get_vector(index, EV_VEC_origin, vector)
|
|
||||||
FVecIVec(vector, origin)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sets the origin of an entity */
|
|
||||||
stock set_entity_origin(index, origin[3]) {
|
|
||||||
new Float:vector[3]
|
|
||||||
IVecFVec(originvector)
|
|
||||||
entity_set_vector(index, EV_VEC_origin, vector)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Gets the velocity of a player */
|
|
||||||
stock get_user_velocity(index, velocity[3]) {
|
|
||||||
get_entity_velocity(index, velocity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sets the velocity of a player */
|
|
||||||
stock set_user_velocity(index, velocity[3]) {
|
|
||||||
set_entity_velocity(index, velocity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the index of the grenade belonging to index.
|
|
||||||
* Model of grenade is returned in model[].
|
|
||||||
* Specify the grenadeindex to start searching from,
|
|
||||||
* or leave it at 0 to search from the start.
|
|
||||||
* Returns grenade index.
|
|
||||||
* Paths + models of grenades in Counter-Strike:
|
|
||||||
* HEGRENADE = "models/w_hegrenade.mdl"
|
|
||||||
* FLASHBANG = "models/w_flashbang.mdl"
|
|
||||||
* SMOKEGRENADE = "models/w_smokegrenade.mdl" */
|
|
||||||
stock get_grenade_index(index, model[], len, grenadeindex = 0) {
|
|
||||||
new entfind = grenadeindex
|
|
||||||
new entowner = index
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
entfind = find_ent_by_class(entfind, "grenade")
|
|
||||||
|
|
||||||
if (entfind && is_valid_ent(entfind)) {
|
|
||||||
if (entity_get_edict(entFind, EV_ENT_owner) == entowner) {
|
|
||||||
entity_get_string(entfind, EV_SZ_model, model)
|
|
||||||
return entfind
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Eventually comes here if loop fails to find a grenade with specified owner.
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find the number of entities in the game */
|
|
||||||
stock current_num_ents() {
|
|
||||||
return entity_count();
|
|
||||||
}
|
|
||||||
|
|
||||||
enum {
|
|
||||||
classname = 0,
|
|
||||||
target,
|
|
||||||
targetname
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find an entity ID from start_from_ent id (use 0 to start from
|
|
||||||
* the beginning, category is either "classname", "target" or
|
|
||||||
* "targetname", value is the name you are searching for */
|
|
||||||
stock find_entity(start_from_ent, category, value[]) {
|
|
||||||
switch (category) {
|
|
||||||
case target: return find_ent_by_target(start_from_ent, value)
|
|
||||||
case targetname: return find_ent_by_tname(start_from_ent, value)
|
|
||||||
}
|
|
||||||
return find_ent_by_class(start_from_ent, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // _xtrafun_included
|
|
@ -52,7 +52,7 @@ new bool:g_selected = false
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Nextmap Chooser","0.16","AMXX Dev Team")
|
register_plugin("Nextmap Chooser","0.1","AMXX Dev Team")
|
||||||
register_menucmd(register_menuid("AMX Choose nextmap:"),(-1^(-1<<(SELECTMAPS+2))),"countVote")
|
register_menucmd(register_menuid("AMX Choose nextmap:"),(-1^(-1<<(SELECTMAPS+2))),"countVote")
|
||||||
register_cvar("amx_extendmap_max","90")
|
register_cvar("amx_extendmap_max","90")
|
||||||
register_cvar("amx_extendmap_step","15")
|
register_cvar("amx_extendmap_step","15")
|
||||||
@ -63,10 +63,9 @@ public plugin_init()
|
|||||||
get_localinfo("lastMap",g_lastMap,31)
|
get_localinfo("lastMap",g_lastMap,31)
|
||||||
set_localinfo("lastMap","")
|
set_localinfo("lastMap","")
|
||||||
|
|
||||||
new maps_ini_file[64];
|
new filename[64]
|
||||||
get_configsdir(maps_ini_file, 63);
|
build_path( filename , 63 , "$basedir/configs/maps.ini" )
|
||||||
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
|
if ( loadSettings( filename ) )
|
||||||
if ( loadSettings(maps_ini_file) )
|
|
||||||
set_task(15.0,"voteNextmap",987456,"",0,"b")
|
set_task(15.0,"voteNextmap",987456,"",0,"b")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,12 @@
|
|||||||
|
|
||||||
#include <amxmodx>
|
#include <amxmodx>
|
||||||
#include <amxmisc>
|
#include <amxmisc>
|
||||||
|
#include <engine>
|
||||||
|
|
||||||
#define MAX_MAPS 64
|
#define MAX_MAPS 64
|
||||||
|
|
||||||
new g_mapName[MAX_MAPS][32]
|
new g_mapName[MAX_MAPS][32]
|
||||||
|
new g_mapDesc[MAX_MAPS][32]
|
||||||
new g_mapNums
|
new g_mapNums
|
||||||
new g_menuPosition[33]
|
new g_menuPosition[33]
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ new g_choosed
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Maps Menu","0.16","AMXX Dev Team")
|
register_plugin("Maps Menu","0.1","AMXX Dev Team")
|
||||||
register_clcmd("amx_mapmenu","cmdMapsMenu",ADMIN_MAP,"- displays changelevel menu")
|
register_clcmd("amx_mapmenu","cmdMapsMenu",ADMIN_MAP,"- displays changelevel menu")
|
||||||
register_clcmd("amx_votemapmenu","cmdVoteMapMenu",ADMIN_MAP,"- displays votemap menu")
|
register_clcmd("amx_votemapmenu","cmdVoteMapMenu",ADMIN_MAP,"- displays votemap menu")
|
||||||
|
|
||||||
@ -62,10 +64,9 @@ public plugin_init()
|
|||||||
register_menucmd(register_menuid("Votemap Menu"),1023,"actionVoteMapMenu")
|
register_menucmd(register_menuid("Votemap Menu"),1023,"actionVoteMapMenu")
|
||||||
register_menucmd(register_menuid("The winner: ") ,3,"actionResult")
|
register_menucmd(register_menuid("The winner: ") ,3,"actionResult")
|
||||||
|
|
||||||
new maps_ini_file[64];
|
new filename[64]
|
||||||
get_configsdir(maps_ini_file, 63);
|
build_path( filename , 63 , "$basedir/configs/maps.ini" )
|
||||||
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
|
load_settings( filename )
|
||||||
load_settings(maps_ini_file)
|
|
||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
}
|
}
|
||||||
@ -185,14 +186,14 @@ displayVoteMapsMenu(id,pos)
|
|||||||
{
|
{
|
||||||
++b
|
++b
|
||||||
if ( g_cstrikeRunning)
|
if ( g_cstrikeRunning)
|
||||||
len += format(menuBody[len],511-len,"\d%d. %s^n\w", b ,g_mapName[ a ])
|
len += format(menuBody[len],511-len,"\d%d. %s^n\w", b ,g_mapDesc[ a ])
|
||||||
else
|
else
|
||||||
len += format(menuBody[len],511-len,"#. %s^n", g_mapName[ a ])
|
len += format(menuBody[len],511-len,"#. %s^n", g_mapDesc[ a ])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
keys |= (1<<b)
|
keys |= (1<<b)
|
||||||
len += format(menuBody[len],511-len,"%d. %s^n", ++b ,g_mapName[ a ])
|
len += format(menuBody[len],511-len,"%d. %s^n", ++b ,g_mapDesc[ a ])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +220,7 @@ displayVoteMapsMenu(id,pos)
|
|||||||
for(new c = 0; c < 4; c++)
|
for(new c = 0; c < 4; c++)
|
||||||
{
|
{
|
||||||
if ( c < g_voteSelectedNum[id] )
|
if ( c < g_voteSelectedNum[id] )
|
||||||
len += format(menuBody[len],511-len,"%s^n", g_mapName[ g_voteSelected[id][ c ] ] )
|
len += format(menuBody[len],511-len,"%s^n", g_mapDesc[ g_voteSelected[id][ c ] ] )
|
||||||
else
|
else
|
||||||
len += format(menuBody[len],511-len,"^n" )
|
len += format(menuBody[len],511-len,"^n" )
|
||||||
}
|
}
|
||||||
@ -311,7 +312,7 @@ public actionVoteMapMenu(id,key)
|
|||||||
"\yWhich map do you want?^n\w^n" : "Which map do you want?^n^n")
|
"\yWhich map do you want?^n\w^n" : "Which map do you want?^n^n")
|
||||||
for(new c = 0; c < g_voteSelectedNum[id] ; ++c)
|
for(new c = 0; c < g_voteSelectedNum[id] ; ++c)
|
||||||
{
|
{
|
||||||
len += format(menuBody[len],511,"%d. %s^n", c + 1 , g_mapName[ g_voteSelected[id][ c ] ] )
|
len += format(menuBody[len],511,"%d. %s^n", c + 1 , g_mapDesc[ g_voteSelected[id][ c ] ] )
|
||||||
keys |= (1<<c)
|
keys |= (1<<c)
|
||||||
}
|
}
|
||||||
keys |= (1<<8)
|
keys |= (1<<8)
|
||||||
@ -320,7 +321,7 @@ public actionVoteMapMenu(id,key)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
len = format(menuBody,511, g_cstrikeRunning ? "\yChange map to^n%s?^n\w^n1. Yes^n2. No^n"
|
len = format(menuBody,511, g_cstrikeRunning ? "\yChange map to^n%s?^n\w^n1. Yes^n2. No^n"
|
||||||
: "Change map to^n%s?^n^n1. Yes^n2. No^n" , g_mapName[ g_voteSelected[id][ 0 ] ] )
|
: "Change map to^n%s?^n^n1. Yes^n2. No^n" , g_mapDesc[ g_voteSelected[id][ 0 ] ] )
|
||||||
keys = (1<<0) | (1<<1)
|
keys = (1<<0) | (1<<1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ displayMapsMenu(id,pos)
|
|||||||
for(new a = start; a < end; ++a)
|
for(new a = start; a < end; ++a)
|
||||||
{
|
{
|
||||||
keys |= (1<<b)
|
keys |= (1<<b)
|
||||||
len += format(menuBody[len],511-len,"%d. %s^n",++b,g_mapName[ a ])
|
len += format(menuBody[len],511-len,"%d. %s^n",++b,g_mapDesc[ a ])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end != g_mapNums)
|
if (end != g_mapNums)
|
||||||
@ -437,17 +438,25 @@ load_settings(filename[])
|
|||||||
if (!file_exists(filename))
|
if (!file_exists(filename))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
new text[256]
|
new text[256], szDesc[48]
|
||||||
new a , pos = 0
|
new a , pos = 0
|
||||||
|
|
||||||
while ( g_mapNums < MAX_MAPS && read_file(filename,pos++,text,255,a) )
|
while ( g_mapNums < MAX_MAPS && read_file(filename,pos++,text,255,a) )
|
||||||
{
|
{
|
||||||
if ( text[0] == ';' ) continue
|
if ( text[0] == ';' ) continue
|
||||||
|
|
||||||
if ( parse(text,g_mapName[g_mapNums],31) < 1 ) continue
|
if ( parse(text, g_mapName[g_mapNums] ,31, szDesc ,47) < 2 ) continue
|
||||||
|
|
||||||
if ( !is_map_valid( g_mapName[g_mapNums] ) ) continue
|
if ( !is_map_valid( g_mapName[g_mapNums] ) ) continue
|
||||||
|
|
||||||
|
if ( strlen( szDesc ) > 31 )
|
||||||
|
{
|
||||||
|
copy(g_mapDesc[g_mapNums],28, szDesc )
|
||||||
|
g_mapDesc[g_mapNums][28] = g_mapDesc[g_mapNums][29] = g_mapDesc[g_mapNums][30] = '.'
|
||||||
|
g_mapDesc[g_mapNums][31] = 0
|
||||||
|
}
|
||||||
|
else copy(g_mapDesc[g_mapNums],31, szDesc )
|
||||||
|
|
||||||
g_mapNums++
|
g_mapNums++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ new g_funModule
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Menus Front-End","0.16","AMXX Dev Team")
|
register_plugin("Menus Front-End","0.1","AMXX Dev Team")
|
||||||
|
|
||||||
register_menucmd(register_menuid("AMX Mod X Menu"),1023,"actionMenu")
|
register_menucmd(register_menuid("AMX Mod X Menu"),1023,"actionMenu")
|
||||||
register_clcmd("amxmodmenu","cmdMenu",ADMIN_MENU,"- displays menus")
|
register_clcmd("amxmodmenu","cmdMenu",ADMIN_MENU,"- displays menus")
|
||||||
|
@ -146,7 +146,7 @@ new g_teamsNames[2][] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("CS Misc. Stats","0.16","AMXX Dev Team")
|
register_plugin("CS Misc. Stats","0.1","AMXX Dev Team")
|
||||||
register_event("DeathMsg","eDeathMsg","a")
|
register_event("DeathMsg","eDeathMsg","a")
|
||||||
register_event("TextMsg","eRestart","a","2&#Game_C","2&#Game_w")
|
register_event("TextMsg","eRestart","a","2&#Game_C","2&#Game_w")
|
||||||
register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
|
register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
|
||||||
|
@ -45,7 +45,7 @@ new g_pos
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("NextMap","0.16","AMXX Dev Team")
|
register_plugin("NextMap","0.1","AMXX Dev Team")
|
||||||
register_event("30","changeMap","a")
|
register_event("30","changeMap","a")
|
||||||
register_clcmd("say nextmap","sayNextMap",0,"- displays nextmap")
|
register_clcmd("say nextmap","sayNextMap",0,"- displays nextmap")
|
||||||
register_cvar("amx_nextmap","",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
|
register_cvar("amx_nextmap","",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
|
||||||
@ -53,7 +53,7 @@ public plugin_init()
|
|||||||
new szString[32], szString2[32], szString3[8]
|
new szString[32], szString2[32], szString3[8]
|
||||||
get_localinfo( "lastmapcycle", szString , 31 )
|
get_localinfo( "lastmapcycle", szString , 31 )
|
||||||
parse( szString, szString2, 31, szString3 , 7 )
|
parse( szString, szString2, 31, szString3 , 7 )
|
||||||
g_pos = str_to_num( szString3 )
|
g_pos = str_to_int( szString3 )
|
||||||
get_cvar_string( "mapcyclefile" , g_mapCycle , 31 )
|
get_cvar_string( "mapcyclefile" , g_mapCycle , 31 )
|
||||||
|
|
||||||
if ( !equal( g_mapCycle , szString2 ) )
|
if ( !equal( g_mapCycle , szString2 ) )
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#define MAX_SYSTEM 32
|
#define MAX_SYSTEM 32
|
||||||
|
|
||||||
new g_menuPos[33]
|
new g_menuPos[33]
|
||||||
new g_fileToSave[64];
|
new g_fileToSave[64]
|
||||||
new g_cstrikeRunning
|
new g_cstrikeRunning
|
||||||
new g_Modified
|
new g_Modified
|
||||||
new g_couldntFind[] = "Couldn't find a plugin matching ^"%s^""
|
new g_couldntFind[] = "Couldn't find a plugin matching ^"%s^""
|
||||||
@ -53,7 +53,7 @@ new g_system[MAX_SYSTEM]
|
|||||||
new g_systemNum
|
new g_systemNum
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Pause Plugins","0.16","AMXX Dev Team")
|
register_plugin("Pause Plugins","0.1","AMXX Dev Team")
|
||||||
register_concmd("amx_pausecfg","cmdPlugin",ADMIN_CFG,"- list commands for pause/unpause managment")
|
register_concmd("amx_pausecfg","cmdPlugin",ADMIN_CFG,"- list commands for pause/unpause managment")
|
||||||
register_clcmd("amx_pausecfgmenu","cmdMenu",ADMIN_CFG,"- pause/unpause plugins with menu")
|
register_clcmd("amx_pausecfgmenu","cmdMenu",ADMIN_CFG,"- pause/unpause plugins with menu")
|
||||||
#if defined DIRECT_ONOFF
|
#if defined DIRECT_ONOFF
|
||||||
@ -62,9 +62,6 @@ public plugin_init(){
|
|||||||
#endif
|
#endif
|
||||||
register_menucmd(register_menuid("Pause/Unpause Plugins"),1023,"actionMenu")
|
register_menucmd(register_menuid("Pause/Unpause Plugins"),1023,"actionMenu")
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
get_configsdir(g_fileToSave, 63);
|
|
||||||
format(g_fileToSave, 63, "%s/pausecfg.ini", g_fileToSave);
|
|
||||||
|
|
||||||
return PLUGIN_CONTINUE
|
return PLUGIN_CONTINUE
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,6 +82,7 @@ public cmdON(id,level,cid){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public plugin_cfg() {
|
public plugin_cfg() {
|
||||||
|
build_path( g_fileToSave , 63 , "$basedir/configs/pausecfg.ini" )
|
||||||
loadSettings(g_fileToSave)
|
loadSettings(g_fileToSave)
|
||||||
// Put here titles of plugins which you don't want to pause
|
// Put here titles of plugins which you don't want to pause
|
||||||
server_cmd(g_addCmd , "Pause Plugins" )
|
server_cmd(g_addCmd , "Pause Plugins" )
|
||||||
@ -320,7 +318,7 @@ public cmdPlugin(id,level,cid){
|
|||||||
}
|
}
|
||||||
else if ( equal(cmds, "list" ) ) {
|
else if ( equal(cmds, "list" ) ) {
|
||||||
new arg1[8], running = 0
|
new arg1[8], running = 0
|
||||||
new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1
|
new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1
|
||||||
if (--start < 0) start = 0
|
if (--start < 0) start = 0
|
||||||
new plgnum = get_pluginsnum()
|
new plgnum = get_pluginsnum()
|
||||||
if (start >= plgnum) start = plgnum - 1
|
if (start >= plgnum) start = plgnum - 1
|
||||||
|
@ -55,7 +55,7 @@ new g_cstrikeRunning
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Players Menu","0.16","AMXX Dev Team")
|
register_plugin("Players Menu","0.1","AMXX Dev Team")
|
||||||
register_clcmd("amx_kickmenu","cmdKickMenu",ADMIN_KICK,"- displays kick menu")
|
register_clcmd("amx_kickmenu","cmdKickMenu",ADMIN_KICK,"- displays kick menu")
|
||||||
register_clcmd("amx_banmenu","cmdBanMenu",ADMIN_BAN,"- displays ban menu")
|
register_clcmd("amx_banmenu","cmdBanMenu",ADMIN_BAN,"- displays ban menu")
|
||||||
register_clcmd("amx_slapmenu","cmdSlapMenu",ADMIN_SLAY,"- displays slap/slay menu")
|
register_clcmd("amx_slapmenu","cmdSlapMenu",ADMIN_SLAY,"- displays slap/slay menu")
|
||||||
@ -70,10 +70,9 @@ public plugin_init()
|
|||||||
|
|
||||||
g_cstrikeRunning = is_running("cstrike")
|
g_cstrikeRunning = is_running("cstrike")
|
||||||
|
|
||||||
new clcmds_ini_file[64];
|
new filename[64]
|
||||||
get_configsdir(clcmds_ini_file, 63);
|
build_path( filename , 63 , "$basedir/configs/clcmds.ini" )
|
||||||
format(clcmds_ini_file, 63, "%s/clcmds.ini", clcmds_ini_file);
|
load_settings( filename )
|
||||||
load_settings(clcmds_ini_file)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ban menu */
|
/* Ban menu */
|
||||||
@ -576,7 +575,7 @@ public actionClcmdMenu(id,key)
|
|||||||
copy(command,63,g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
copy(command,63,g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
|
||||||
get_user_authid(player,authid,31)
|
get_user_authid(player,authid,31)
|
||||||
get_user_name(player,name,31)
|
get_user_name(player,name,31)
|
||||||
num_to_str(get_user_userid(player),userid,31)
|
int_to_str(get_user_userid(player),userid,31)
|
||||||
replace(command,63,"%userid%",userid)
|
replace(command,63,"%userid%",userid)
|
||||||
replace(command,63,"%authid%",authid)
|
replace(command,63,"%authid%",authid)
|
||||||
replace(command,63,"%name%",name)
|
replace(command,63,"%name%",name)
|
||||||
|
@ -336,7 +336,7 @@ new g_Aliases2[MAXMENUPOS][] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Restrict Weapons","0.16","AMXX Dev Team")
|
register_plugin("Restrict Weapons","0.1","AMXX Dev Team")
|
||||||
register_clcmd("buyammo1","ammoRest1")
|
register_clcmd("buyammo1","ammoRest1")
|
||||||
register_clcmd("buyammo2","ammoRest2")
|
register_clcmd("buyammo2","ammoRest2")
|
||||||
#if !defined NO_STEAM
|
#if !defined NO_STEAM
|
||||||
@ -363,14 +363,12 @@ public plugin_init(){
|
|||||||
register_menucmd(-34,511,"menuItem")
|
register_menucmd(-34,511,"menuItem")
|
||||||
register_concmd("amx_restrict","cmdRest",ADMIN_CFG,"- displays help for weapons restriction")
|
register_concmd("amx_restrict","cmdRest",ADMIN_CFG,"- displays help for weapons restriction")
|
||||||
|
|
||||||
new configsDir[64];
|
|
||||||
get_configsdir(configsDir, 63);
|
|
||||||
#if defined MAPSETTINGS
|
#if defined MAPSETTINGS
|
||||||
new mapname[32]
|
new mapname[32]
|
||||||
get_mapname(mapname,31)
|
get_mapname(mapname,31)
|
||||||
format(g_saveFile,63,"%s/weaprest_%s.ini",configsDir,mapname)
|
build_path( g_saveFile , 63 , "$basedir/configs/weaprest_%s.ini" ,mapname )
|
||||||
#else
|
#else
|
||||||
format(g_saveFile,63,"%s/weaprest.ini",configsDir)
|
build_path( g_saveFile , 63 , "$basedir/configs/weaprest.ini" )
|
||||||
#endif
|
#endif
|
||||||
loadSettings(g_saveFile)
|
loadSettings(g_saveFile)
|
||||||
}
|
}
|
||||||
@ -468,7 +466,7 @@ public cmdRest(id,level,cid){
|
|||||||
switchCommand( id, 0 )
|
switchCommand( id, 0 )
|
||||||
else if ( equali( "list" , cmd ) ) {
|
else if ( equali( "list" , cmd ) ) {
|
||||||
new arg1[8]
|
new arg1[8]
|
||||||
new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1
|
new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1
|
||||||
if (--start < 0) start = 0
|
if (--start < 0) start = 0
|
||||||
if (start >= MAXMENUPOS) start = MAXMENUPOS - 1
|
if (start >= MAXMENUPOS) start = MAXMENUPOS - 1
|
||||||
new end = start + 10
|
new end = start + 10
|
||||||
@ -497,12 +495,8 @@ public cmdRest(id,level,cid){
|
|||||||
else if ( equali( "load" , cmd ) ) {
|
else if ( equali( "load" , cmd ) ) {
|
||||||
setc( g_blockPos, 112, 0 ) // Clear current settings
|
setc( g_blockPos, 112, 0 ) // Clear current settings
|
||||||
new arg1[64]
|
new arg1[64]
|
||||||
if ( read_argv(2, arg1 , 63 ) )
|
if ( read_argv(2, arg1 , 63 ) ) build_path( arg1 , 63, "$basedir/%s", arg1 )
|
||||||
{
|
else copy( arg1, 63, g_saveFile )
|
||||||
new configsdir[32]
|
|
||||||
get_configsdir(configsdir,31)
|
|
||||||
format(arg1,63,"%s/%s",configsdir,arg1)
|
|
||||||
}
|
|
||||||
if ( loadSettings( arg1 ) ){
|
if ( loadSettings( arg1 ) ){
|
||||||
console_print( id , "Configuration has been loaded (file ^"%s^")" , arg1 )
|
console_print( id , "Configuration has been loaded (file ^"%s^")" , arg1 )
|
||||||
g_Modified = true
|
g_Modified = true
|
||||||
|
BIN
plugins/sc
BIN
plugins/sc
Binary file not shown.
BIN
plugins/sc.exe
BIN
plugins/sc.exe
Binary file not shown.
@ -46,7 +46,7 @@ new g_Length
|
|||||||
new g_Frequency
|
new g_Frequency
|
||||||
|
|
||||||
public plugin_init(){
|
public plugin_init(){
|
||||||
register_plugin("Scrolling Message","0.16","AMXX Dev Team")
|
register_plugin("Scrolling Message","0.1","AMXX Dev Team")
|
||||||
register_srvcmd("amx_scrollmsg","setMessage")
|
register_srvcmd("amx_scrollmsg","setMessage")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ public setMessage(id,level,cid) {
|
|||||||
g_Length = strlen(g_scrollMsg)
|
g_Length = strlen(g_scrollMsg)
|
||||||
new mytime[32]
|
new mytime[32]
|
||||||
read_argv(2,mytime,31)
|
read_argv(2,mytime,31)
|
||||||
g_Frequency = str_to_num(mytime)
|
g_Frequency = str_to_int(mytime)
|
||||||
if (g_Frequency > 0) {
|
if (g_Frequency > 0) {
|
||||||
new minimal = floatround((g_Length + 48) * (SPEED + 0.1))
|
new minimal = floatround((g_Length + 48) * (SPEED + 0.1))
|
||||||
if (g_Frequency < minimal) {
|
if (g_Frequency < minimal) {
|
||||||
|
@ -71,7 +71,7 @@ new g_teamScore[2]
|
|||||||
new g_disabledMsg[] = "Server has disabled that option"
|
new g_disabledMsg[] = "Server has disabled that option"
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("CS Stats","0.16","AMXX Dev Team")
|
register_plugin("CS Stats","0.1","AMXX Dev Team")
|
||||||
register_event("CS_DeathMsg","eCSDeathMsg","a")
|
register_event("CS_DeathMsg","eCSDeathMsg","a")
|
||||||
register_event("ResetHUD","eResetHud","b")
|
register_event("ResetHUD","eResetHud","b")
|
||||||
register_event("SendAudio","eRoundEnd","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
|
register_event("SendAudio","eRoundEnd","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
|
||||||
@ -372,14 +372,14 @@ public displayStats(id,dest) {
|
|||||||
pos += copy(g_Buffer[pos],2047-pos,"body{font-family:Arial,sans-serif;font-size:12px;color:#FFCC99;background-color:#000000;margin-left:8px;margin-top:3px}.header{background-color:#9C0000;}.one{background-color:#310000;}.two{background-color:#630000;}")
|
pos += copy(g_Buffer[pos],2047-pos,"body{font-family:Arial,sans-serif;font-size:12px;color:#FFCC99;background-color:#000000;margin-left:8px;margin-top:3px}.header{background-color:#9C0000;}.one{background-color:#310000;}.two{background-color:#630000;}")
|
||||||
pos += format(g_Buffer[pos],2047-pos,"</style></head><body><table><tr class=^"one^"><td>Kills:</td><td>%d</td></tr><tr class=^"two^"><td>Deaths:</td><td>%d</td></tr><tr class=^"one^"><td>Damage:</td><td>%d</td></tr><tr class=^"two^"><td>Hits:</td><td>%d</td></tr><tr class=^"one^"><td>Shots:</td><td>%d</td></tr></table><br><br>",
|
pos += format(g_Buffer[pos],2047-pos,"</style></head><body><table><tr class=^"one^"><td>Kills:</td><td>%d</td></tr><tr class=^"two^"><td>Deaths:</td><td>%d</td></tr><tr class=^"one^"><td>Damage:</td><td>%d</td></tr><tr class=^"two^"><td>Hits:</td><td>%d</td></tr><tr class=^"one^"><td>Shots:</td><td>%d</td></tr></table><br><br>",
|
||||||
stats[0],stats[1],stats[6],stats[5],stats[4])
|
stats[0],stats[1],stats[6],stats[5],stats[4])
|
||||||
pos += copy(g_Buffer[pos],2047-pos,"<table><tr class=^"header^"><td>Weapon</td><td>Shots</td><td>Hits</td><td>Damage</td><td>Kills</td><td>Deaths</td></tr>")
|
pos += copy(g_Buffer[pos],2047-pos,"<table><tr class^"header^"><td>Weapon</td><td>Shots</td><td>Hits</td><td>Damage</td><td>Kills</td><td>deaths</td></tr>")
|
||||||
for(new a = 1; a < 31; ++a) {
|
for(new a = 1; a < 31; ++a) {
|
||||||
if (get_user_wstats(id,a,stats,body)) {
|
if (get_user_wstats(id,a,stats,body)) {
|
||||||
if (equal(state,"one")) copy(state,3,"two")
|
if (equal(state,"one")) copy(state,3,"two")
|
||||||
else copy(state,3,"one")
|
else copy(state,3,"one")
|
||||||
get_weaponname(a,name,31)
|
get_weaponname(a,name,31)
|
||||||
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"%s^"><td>%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td></tr>",
|
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"%s^"><td>%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td></tr>",
|
||||||
state,name[7],stats[4],stats[5],stats[6],stats[0],stats[1])
|
name[7],stats[4],stats[5],stats[6],stats[0],stats[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
copy(g_Buffer[pos],2047-pos,"</table></body></html>")
|
copy(g_Buffer[pos],2047-pos,"</table></body></html>")
|
||||||
@ -419,10 +419,10 @@ displayRank(id,dest) {
|
|||||||
pos += format(g_Buffer[pos],2047-pos,"</style></head><body><table><tr><td colspan=2>%s rank is %d of %d</td></tr>",(id==dest)?"Your":"His", rank_pos,get_statsnum())
|
pos += format(g_Buffer[pos],2047-pos,"</style></head><body><table><tr><td colspan=2>%s rank is %d of %d</td></tr>",(id==dest)?"Your":"His", rank_pos,get_statsnum())
|
||||||
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"one^"><td>Kills:</td><td>%d</td></tr><tr class=^"two^"><td>Deaths:</td><td>%d</td></tr><tr class=^"one^"><td>Damage:</td><td>%d</td></tr><tr class=^"two^"><td>Hits:</td><td>%d</td></tr><tr class=^"one^"><td>Shots:</td><td>%d</td></tr><tr><td> </td><td> </td></tr>",
|
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"one^"><td>Kills:</td><td>%d</td></tr><tr class=^"two^"><td>Deaths:</td><td>%d</td></tr><tr class=^"one^"><td>Damage:</td><td>%d</td></tr><tr class=^"two^"><td>Hits:</td><td>%d</td></tr><tr class=^"one^"><td>Shots:</td><td>%d</td></tr><tr><td> </td><td> </td></tr>",
|
||||||
stats[0],stats[1],stats[6],stats[5],stats[4])
|
stats[0],stats[1],stats[6],stats[5],stats[4])
|
||||||
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"header^"><td colspan=2>Hits</td></tr><tr class=^"one^"><td>%s:</td><td>%d</td></tr><tr class=^"two^"><td>%s:</td><td>%d</td></tr><tr class=^"one^"><td>%s:</td><td>%d</td></tr><tr class=^"two^"><td>%s:</td><td>%d</td></tr><tr class=^"one^"><td>%s:</td><td>%d</td></tr><tr class=^"two^"><td>%s:</td><td>%d</td></tr><tr class=^"one^"><td>%s:</td><td>%d</td></tr>",
|
pos += format(g_Buffer[pos],2047-pos,"<tr class=^"header^"><td colspan=2>Hits</td></tr><tr class^"one^"><td>%s:</td><td>%d</td></tr><tr class^"two^"><td>%s:</td><td>%d</td></tr><tr class^"one^"><td>%s:</td><td>%d</td></tr><tr class^"two^"><td>%s:</td><td>%d</td></tr><tr class^"one^"><td>%s:</td><td>%d</td></tr><tr class^"two^"><td>%s:</td><td>%d</td></tr><tr class^"one^"><td>%s:</td><td>%d</td></tr>",
|
||||||
g_bodyParts[1],body[1],g_bodyParts[2],body[2],g_bodyParts[3],body[3], g_bodyParts[4],body[4],
|
g_bodyParts[1],body[1],g_bodyParts[2],body[2],g_bodyParts[3],body[3], g_bodyParts[4],body[4],
|
||||||
g_bodyParts[5],body[5],g_bodyParts[6],body[6],g_bodyParts[7],body[7])
|
g_bodyParts[5],body[5],g_bodyParts[6],body[6],g_bodyParts[7],body[7])
|
||||||
copy(g_Buffer[pos],2047-pos,"</table></body></html>")
|
copy(g_Buffer,2047,"</table></body></html>")
|
||||||
#else
|
#else
|
||||||
pos = format(g_Buffer,2047,"%s rank is %d of %d^n^n",(id==dest)?"Your":"His", rank_pos,get_statsnum())
|
pos = format(g_Buffer,2047,"%s rank is %d of %d^n^n",(id==dest)?"Your":"His", rank_pos,get_statsnum())
|
||||||
pos += format(g_Buffer[pos],2047-pos,"%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n^n",
|
pos += format(g_Buffer[pos],2047-pos,"%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n^n",
|
||||||
|
@ -39,7 +39,7 @@ new g_pingSum[33]
|
|||||||
new g_pingCount[33]
|
new g_pingCount[33]
|
||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
register_plugin("CS Stats Logging","0.16","AMXX Dev Team")
|
register_plugin("CS Stats Logging","0.1","AMXX Dev Team")
|
||||||
|
|
||||||
public client_disconnect(id) {
|
public client_disconnect(id) {
|
||||||
if ( is_user_bot( id ) ) return PLUGIN_CONTINUE
|
if ( is_user_bot( id ) ) return PLUGIN_CONTINUE
|
||||||
|
@ -51,10 +51,9 @@ public plugin_precache(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("Stats Configuration","0.16","AMXX Dev Team")
|
register_plugin("Stats Configuration","0.1","AMXX Dev Team")
|
||||||
register_menucmd(register_menuid("\yStats Configuration"),1023,"actionCfgMenu")
|
register_menucmd(register_menuid("\yStats Configuration"),1023,"actionCfgMenu")
|
||||||
get_configsdir(g_fileToSave, 63)
|
build_path( g_fileToSave , 63 , "$basedir/configs/stats.ini" )
|
||||||
format(g_fileToSave, 63, "%s/stats.ini", g_fileToSave)
|
|
||||||
loadSettings(g_fileToSave)
|
loadSettings(g_fileToSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +105,7 @@ public cmdCfg( id,level,cid ){
|
|||||||
}
|
}
|
||||||
else if ( equali(cmds, "list" ) ) {
|
else if ( equali(cmds, "list" ) ) {
|
||||||
new arg1[8]
|
new arg1[8]
|
||||||
new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1
|
new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1
|
||||||
if (--start < 0) start = 0
|
if (--start < 0) start = 0
|
||||||
if (start >= g_menuDataNum) start = g_menuDataNum - 1
|
if (start >= g_menuDataNum) start = g_menuDataNum - 1
|
||||||
new end = start + 10
|
new end = start + 10
|
||||||
|
@ -45,7 +45,7 @@ new g_cstrikeRunning
|
|||||||
|
|
||||||
public plugin_init()
|
public plugin_init()
|
||||||
{
|
{
|
||||||
register_plugin("Teleport Menu","0.16","AMXX Dev Team")
|
register_plugin("Teleport Menu","0.1","AMXX Dev Team")
|
||||||
register_clcmd("amx_teleportmenu","cmdTelMenu",ADMIN_CFG,"- displays teleport menu")
|
register_clcmd("amx_teleportmenu","cmdTelMenu",ADMIN_CFG,"- displays teleport menu")
|
||||||
register_menucmd(register_menuid("Teleport Menu"),1023,"actionTelMenu")
|
register_menucmd(register_menuid("Teleport Menu"),1023,"actionTelMenu")
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ new g_CountDown
|
|||||||
new g_Switch
|
new g_Switch
|
||||||
|
|
||||||
public plugin_init() {
|
public plugin_init() {
|
||||||
register_plugin("TimeLeft","0.16","AMXX Dev Team")
|
register_plugin("TimeLeft","0.1","AMXX Dev Team")
|
||||||
register_cvar("amx_time_voice","1")
|
register_cvar("amx_time_voice","1")
|
||||||
register_srvcmd("amx_time_display","setDisplaying")
|
register_srvcmd("amx_time_display","setDisplaying")
|
||||||
register_cvar("amx_timeleft","00:00",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
|
register_cvar("amx_timeleft","00:00",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
|
||||||
@ -54,8 +54,8 @@ public sayTheTime(id){
|
|||||||
new mhours[6], mmins[6], whours[32], wmins[32], wpm[6]
|
new mhours[6], mmins[6], whours[32], wmins[32], wpm[6]
|
||||||
get_time("%H",mhours,5)
|
get_time("%H",mhours,5)
|
||||||
get_time("%M",mmins,5)
|
get_time("%M",mmins,5)
|
||||||
new mins = str_to_num(mmins)
|
new mins = str_to_int(mmins)
|
||||||
new hrs = str_to_num(mhours)
|
new hrs = str_to_int(mhours)
|
||||||
if (mins)
|
if (mins)
|
||||||
num_to_word(mins,wmins,31)
|
num_to_word(mins,wmins,31)
|
||||||
else
|
else
|
||||||
@ -154,7 +154,7 @@ public setDisplaying(){
|
|||||||
while (i < argc && i < 32){
|
while (i < argc && i < 32){
|
||||||
read_argv(i+1,arg,31)
|
read_argv(i+1,arg,31)
|
||||||
parse(arg,flags,31,num,31)
|
parse(arg,flags,31,num,31)
|
||||||
g_TimeSet[i][0] = str_to_num(num)
|
g_TimeSet[i][0] = str_to_int(num)
|
||||||
g_TimeSet[i][1] = read_flags(flags)
|
g_TimeSet[i][1] = read_flags(flags)
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user