48 Commits

Author SHA1 Message Date
7e90fe8a70 Tagged 1.76c 2007-02-02 05:20:01 +00:00
68f1ce7a52 fixed an initialization bug 2006-12-23 22:05:51 +00:00
e5b0ed3af1 fixed bug am48866 part 2 2006-12-23 19:01:11 +00:00
49e70063fa fixed bug am48866 2006-12-23 18:59:30 +00:00
7aa4cf70be removed amd64 support from installer (and yep, installer's version is already up-to-date ;] ) 2006-12-19 19:50:20 +00:00
b661873426 removed amd64 crap 2006-12-19 14:34:41 +00:00
8e290cdf31 final build info 2006-12-19 14:26:31 +00:00
42f23a832a bumped version number for plugins 2006-12-19 14:24:01 +00:00
13e619bf97 bumped versions 2006-12-19 14:18:05 +00:00
4332d6c271 fixed bug am47617 2006-12-19 14:03:02 +00:00
627b3f0f98 Fixed bug 48522 2006-12-19 12:24:36 +00:00
b7b55d060a sawce's sdk fixes 2006-12-19 11:19:45 +00:00
b110021f4f fixed bug am48308 2006-12-19 11:12:12 +00:00
96c49f4ff9 defaulted value back to 0 for backwards compat 2006-12-19 11:03:00 +00:00
f53c877670 fixed bug am27152 2006-12-19 10:57:43 +00:00
b237317e50 Fixed bug am48018 2006-12-19 10:36:26 +00:00
73b2ceb855 fixed bug am47988 2006-12-19 03:32:58 +00:00
b64fb4678d fixed issue 48202 2006-12-19 02:35:16 +00:00
d6ed1a8d8a Fixed bug am48234 2006-12-19 02:24:09 +00:00
b762174c30 fixed bug am48275 2006-12-19 02:02:49 +00:00
86838bead1 Fixed bug am48294 2006-12-19 01:58:46 +00:00
e6c15d9f05 Fixed bug am48580 2006-12-19 01:57:18 +00:00
266ed797c5 Fixed bug at48523 2006-12-18 14:33:06 +00:00
93cb2060dd fixed typo 2006-12-11 04:07:55 +00:00
0cd1782d01 fixed bug at48369 once and for all 2006-12-10 22:58:28 +00:00
75a5dadd4d small bug fix, compressed exe again :x 2006-12-10 22:37:01 +00:00
f03449acbd fixed 3rd bug at48369 2006-12-10 22:32:49 +00:00
34f127b9aa fixed 2nd bug at48369 2006-12-10 22:25:09 +00:00
0c345ceebc fixed bug at48201 2006-12-09 18:23:52 +00:00
c5dc780635 correction since commit 3164 was accidental 2006-12-06 08:46:44 +00:00
fe0e461c76 checks if the none option is the majority vote 2006-12-06 07:41:38 +00:00
935da9f0de version bump? >:o 2006-12-05 19:31:22 +00:00
36e9f29d55 2006-12-03 02:20:32 +00:00
c66c076a03 fixed bug at47865 2006-11-28 20:04:04 +00:00
4eaea443e1 who would have thought that iterators change?! 2006-11-22 07:33:54 +00:00
299f1b5f62 Fixed bug am46960 (cannot unpause through menu) 2006-11-22 06:14:10 +00:00
4e7bf7e348 ! 2006-11-22 05:39:08 +00:00
d048996b50 fixed bug am47194 (journal crash) 2006-11-22 05:30:58 +00:00
a34c8daf34 again... oops 2006-11-22 04:17:08 +00:00
6cd5a51c8e fixed issue am47452 2006-11-22 04:14:56 +00:00
5cabf748ca fixed issue am47474 2006-11-22 04:13:39 +00:00
1905ea7295 added info about console commands 2006-11-22 02:47:15 +00:00
89158f9342 Added request am47144 (register_*cmd return id) 2006-11-22 02:45:12 +00:00
db7dc509e0 Fixed another serious bug where deleting menus and not returning PLUGIN_HANDLED would cause the iterator to fail and crash 2006-11-21 23:59:21 +00:00
c15a23a2a7 fixed a serious bug where deleted forwards could be placed in the re-use cache too soon 2006-11-21 23:06:50 +00:00
3e0866e57a fixed bug am47134 2006-11-11 19:05:46 +00:00
551e5298cc fixed bug am46924 2006-11-05 18:38:09 +00:00
dfea3e8a13 corrected typo (at46807) 2006-11-03 13:27:17 +00:00
51 changed files with 459 additions and 206 deletions

View File

@ -226,6 +226,8 @@ void CSPForward::Set(int func, AMX *amx, int numParams, const ForwardParam *para
name[0] = '\0';
amx_GetPublic(amx, func, name);
m_Name.assign(name);
m_ToDelete = false;
m_InExec = false;
}
void CSPForward::Set(const char *funcName, AMX *amx, int numParams, const ForwardParam *paramTypes)
@ -236,6 +238,8 @@ void CSPForward::Set(const char *funcName, AMX *amx, int numParams, const Forwar
m_HasFunc = (amx_FindPublic(amx, funcName, &m_Func) == AMX_ERR_NONE);
isFree = false;
m_Name.assign(funcName);
m_ToDelete = false;
m_InExec = false;
}
cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
@ -248,13 +252,15 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
cell realParams[FORWARD_MAX_PARAMS];
cell *physAddrs[FORWARD_MAX_PARAMS];
if (!m_HasFunc)
if (!m_HasFunc || m_ToDelete)
return 0;
CPluginMngr::CPlugin *pPlugin = g_plugins.findPluginFast(m_Amx);
if (!pPlugin->isExecutable(m_Func))
return 0;
m_InExec = true;
Debugger *pDebugger = (Debugger *)m_Amx->userdata[UD_DEBUGGER];
if (pDebugger)
pDebugger->BeginExec();
@ -356,6 +362,8 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
}
}
m_InExec = false;
return retVal;
}
@ -452,7 +460,20 @@ bool CForwardMngr::isIdValid(int id) const
cell CForwardMngr::executeForwards(int id, cell *params)
{
int retVal = (id & 1) ? m_SPForwards[id >> 1]->execute(params, m_TmpArrays) : m_Forwards[id >> 1]->execute(params, m_TmpArrays);
int retVal;
if (id & 1)
{
CSPForward *fwd = m_SPForwards[id >> 1];
retVal = fwd->execute(params, m_TmpArrays);
if (fwd->m_ToDelete)
{
fwd->m_ToDelete = false;
unregisterSPForward(id);
}
} else {
retVal = m_Forwards[id >> 1]->execute(params, m_TmpArrays);
}
m_TmpArraysNum = 0;
return retVal;
@ -524,8 +545,15 @@ void CForwardMngr::unregisterSPForward(int id)
if (!isIdValid(id) || m_SPForwards.at(id >> 1)->isFree)
return;
m_SPForwards.at(id >> 1)->isFree = true;
m_FreeSPForwards.push(id);
CSPForward *fwd = m_SPForwards.at(id >> 1);
if (fwd->m_InExec)
{
fwd->m_ToDelete = true;
} else {
fwd->isFree = true;
m_FreeSPForwards.push(id);
}
}
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num, int fwd_type)

View File

@ -143,6 +143,7 @@ public:
// Single plugin forward
class CSPForward
{
friend class CForwardMngr;
const char *m_FuncName;
int m_NumParams;
@ -152,6 +153,8 @@ class CSPForward
int m_Func;
bool m_HasFunc;
String m_Name;
bool m_InExec;
bool m_ToDelete;
public:
bool isFree;

View File

@ -87,6 +87,10 @@ void MenuMngr::removeMenuId(int id)
{
if (c->menuid == id)
{
if (m_watch_iter.a == c)
{
++m_watch_iter;
}
if (lc)
lc->next = c->next;
else
@ -140,4 +144,13 @@ void MenuMngr::clear()
}
}
MenuMngr::iterator MenuMngr::SetWatchIter(MenuMngr::iterator iter)
{
MenuMngr::iterator old = m_watch_iter;
m_watch_iter = iter;
return old;
}
int MenuMngr::MenuIdEle::uniqueid = 0;

View File

@ -76,7 +76,8 @@ private:
} *headcmd;
public:
MenuMngr() { headid = 0; headcmd = 0; }
MenuMngr() : m_watch_iter(end())
{ headid = NULL; headcmd = NULL; }
~MenuMngr();
// Interface
@ -89,6 +90,7 @@ public:
class iterator
{
friend class MenuMngr;
MenuCommand* a;
public:
iterator(MenuCommand*aa) : a(aa) {}
@ -101,6 +103,11 @@ public:
inline iterator begin() const { return iterator(headcmd); }
inline iterator end() const { return iterator(0); }
MenuMngr::iterator SetWatchIter(MenuMngr::iterator iter);
inline MenuMngr::iterator GetWatchIter() { return m_watch_iter; }
private:
MenuMngr::iterator m_watch_iter;
};
#endif //MENUS_H

View File

@ -1219,7 +1219,7 @@ static cell AMX_NATIVE_CALL register_concmd(AMX *amx, cell *params) /* 4 param *
cmd->setCmdType(CMD_ConsoleCommand);
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
return 1;
return cmd->getId();
}
static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
@ -1253,7 +1253,7 @@ static cell AMX_NATIVE_CALL register_clcmd(AMX *amx, cell *params) /* 4 param */
cmd->setCmdType(CMD_ClientCommand);
return 1;
return cmd->getId();
}
static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param */
@ -1288,7 +1288,7 @@ static cell AMX_NATIVE_CALL register_srvcmd(AMX *amx, cell *params) /* 2 param *
cmd->setCmdType(CMD_ServerCommand);
REG_SVR_COMMAND((char*)cmd->getCommand(), plugin_srvcmd);
return 0;
return cmd->getId();
}
static cell AMX_NATIVE_CALL get_concmd(AMX *amx, cell *params) /* 7 param */
@ -4263,7 +4263,19 @@ static cell AMX_NATIVE_CALL is_user_hacking(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
{
memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell));
cell value = params[2];
if (!value)
{
memset(get_amxaddr(amx, params[1]), 0, params[3] * sizeof(cell));
} else {
int size = params[3];
cell *addr = get_amxaddr(amx, params[1]);
for (int i=0; i<size; i++)
{
addr[i] = value;
}
}
return 1;
}

View File

@ -73,7 +73,7 @@
#define AMXXLOG_Log g_log.Log
#define AMXXLOG_Error g_log.LogError
#define AMX_VERSION "1.76b"
#define AMX_VERSION "1.76c"
extern AMX_NATIVE_INFO core_Natives[];
extern AMX_NATIVE_INFO time_Natives[];

View File

@ -904,6 +904,7 @@ void C_ClientCommand(edict_t *pEntity)
while (a)
{
g_menucmds.SetWatchIter(a);
if ((*a).matchCommand(menuid, bit_key) && (*a).getPlugin()->isExecutable((*a).getFunction()))
{
if (pPlayer->newmenu != -1)
@ -940,7 +941,12 @@ void C_ClientCommand(edict_t *pEntity)
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
}
}
++a;
if (g_menucmds.GetWatchIter() != a)
{
a = g_menucmds.GetWatchIter();
} else {
++a;
}
}
}
}

View File

@ -598,7 +598,7 @@ int set_amxnatives(AMX* amx, char error[128])
if ((err = amx_Exec(amx, &retval, idx)) != AMX_ERR_NONE)
{
Debugger::GenericMessage(amx, err);
AMXXLOG_Log("An error occurred in plugins_native. This is dangerous!");
AMXXLOG_Log("An error occurred in plugin_natives. This is dangerous!");
}
}

View File

@ -778,10 +778,6 @@
RelativePath="..\md5.h"
>
</File>
<File
RelativePath="..\menus.h"
>
</File>
<File
RelativePath="..\messages.h"
>

View File

@ -343,13 +343,16 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
bool enabled = true;
int ret = 0;
int slots = 0;
int option_display = 0;
for (item_t i = start; i <= end; i++)
{
pItem = m_Items[i];
if (pItem->access && !(pItem->access & g_players[player].flags[0]))
{
enabled = false;
}
if (pItem->handler != -1)
{
@ -372,23 +375,33 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
enabled = false;
}
}
if (enabled)
{
keys |= (1<<option);
}
option_display = ++option;
if (option_display == 10)
{
option_display = 0;
}
if (enabled)
{
keys |= (1<<option);
if (m_AutoColors)
{
_snprintf(buffer, sizeof(buffer)-1, "\\r%d.\\w %s\n", ++option, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "\\r%d.\\w %s\n", option_display, pItem->name.c_str());
} else {
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", ++option, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", option_display, pItem->name.c_str());
}
} else {
if (m_AutoColors)
{
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", ++option, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", option_display, pItem->name.c_str());
} else {
_snprintf(buffer, sizeof(buffer)-1, "#. %s\n", pItem->name.c_str());
option++;
}
}
slots++;

View File

@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post

View File

@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,7,6,2
PRODUCTVERSION 1,7,6,2
FILEVERSION 1,7,6,3187
PRODUCTVERSION 1,7,6,3187
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -45,12 +45,12 @@ BEGIN
BEGIN
VALUE "Comments", "AMX Mod X"
VALUE "FileDescription", "AMX Mod X"
VALUE "FileVersion", "1.76b"
VALUE "FileVersion", "1.76c"
VALUE "InternalName", "amxmodx"
VALUE "LegalCopyright", "Copyright (c) 2004-2006, AMX Mod X Dev Team"
VALUE "OriginalFilename", "amxmodx_mm.dll"
VALUE "ProductName", "AMX Mod X"
VALUE "ProductVersion", "1.76b"
VALUE "ProductVersion", "1.76c"
END
END
BLOCK "VarFileInfo"

View File

@ -244,9 +244,14 @@ void CPlayer::saveBDefused(){
// *****************************************************
bool ignoreBots (edict_t *pEnt, edict_t *pOther){
if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
bool ignoreBots(edict_t *pEnt, edict_t *pOther)
{
rankBots = (int)csstats_rankbots->value ? true : false;
if (!rankBots && (pEnt->v.flags & FL_FAKECLIENT || (pOther && pOther->v.flags & FL_FAKECLIENT)))
{
return true;
}
return false;
}

View File

@ -58,7 +58,7 @@ cvar_t *csstats_rank;
cvar_t* csstats_rankbots;
cvar_t* csstats_pause;
cvar_t init_csstats_rankbots ={"csstats_rankbots","1"};
cvar_t init_csstats_rankbots ={"csstats_rankbots","0"};
cvar_t init_csstats_pause = {"csstats_pause","0"};
struct sUserMsg

View File

@ -5,7 +5,7 @@
// Module info
#define MODULE_NAME "CSX"
#define MODULE_VERSION "1.76a"
#define MODULE_VERSION "1.76c"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "CSX"

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <stdarg.h>
#if defined __linux__
#include <unistd.h>
#endif
@ -24,8 +25,8 @@ int Journal::Replay(VaultMap *pMap)
BinaryReader br(m_fp);
int8_t len8;
int16_t len16;
uint8_t len8;
uint16_t len16;
char *key = NULL;
char *val = NULL;
String sKey;

View File

@ -2773,7 +2773,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL);
MF_OverrideNatives(NULL, "");
}
#endif

View File

@ -5,7 +5,7 @@
// Module info
#define MODULE_NAME "nVault"
#define MODULE_VERSION "1.76"
#define MODULE_VERSION "1.76c"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "nVault"

View File

@ -169,6 +169,8 @@ public:
} else {
iter++;
}
} else {
iter++;
}
}
}

View File

@ -32,8 +32,8 @@
-M
-$M16384,1048576
-K$00400000
-LE"c:\programme\borland\delphi7\Projects\Bpl"
-LN"c:\programme\borland\delphi7\Projects\Bpl"
-LE"c:\program files\borland\delphi7\Projects\Bpl"
-LN"c:\program files\borland\delphi7\Projects\Bpl"
-DmadExcept
-w-UNSAFE_TYPE
-w-UNSAFE_CODE

View File

@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=4
Release=3
Build=1
Build=3
Debug=0
PreRelease=0
Special=0
@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=AMX Mod X Dev Team
FileDescription=
FileVersion=1.4.3.1
FileVersion=1.4.3.3
InternalName=
LegalCopyright=AMX Mod X Dev Team
LegalTrademarks=

Binary file not shown.

Binary file not shown.

View File

@ -80,7 +80,7 @@ function IEInstalled: Boolean;
function GetAMXXDir(ListenServer: Boolean): String;
function CloseDocument(eDocument: TDocument; SaveActiveDoc, RemoveTab: Boolean): Boolean;
function AddExtension(eFilename, eHighlighter: String): String;
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
@ -468,11 +468,15 @@ begin
Collection.Close(eDocument.Index, RemoveTab);
end;
function AddExtension(eFilename, eHighlighter: String): String;
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
begin
if ExtractFileExt(eFilename) = '' then begin
if eHighlighter = 'Pawn' then
Result := eFilename + '.sma';
if eHighlighter = 'Pawn' then begin
if (ExtractFileExt(Document.Title) = '.inc') then
Result := eFilename + '.inc'
else
Result := eFilename + '.sma';
end;
if eHighlighter = 'C++' then
Result := eFilename + '.cpp';
if eHighlighter = 'HTML' then

View File

@ -7375,8 +7375,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
ColorHighLight = 8623776
ColorShadow = 8623776
Caption = 'Generate'
ModalResult = 1
TabOrder = 4
ModalResult = 1
end
object cmdCancel: TFlatButton
Left = 334
@ -7388,8 +7388,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
ColorHighLight = 8623776
ColorShadow = 8623776
Caption = 'Cancel'
ModalResult = 2
TabOrder = 5
ModalResult = 2
end
object pnlText: TPanel
Left = 6
@ -7430,7 +7430,7 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
ColorFlat = clWhite
TabOrder = 1
Text = '12,0'
OnChange = txtTimeToShowChange
OnExit = txtTimeToShowExit
OnKeyPress = txtTimeToShowKeyPress
end
end

View File

@ -47,10 +47,10 @@ type
procedure cmdSelectColorClick(Sender: TObject);
procedure txtTextChange(Sender: TObject);
procedure txtTimeToShowKeyPress(Sender: TObject; var Key: Char);
procedure txtTimeToShowChange(Sender: TObject);
procedure chkXCenterClick(Sender: TObject);
procedure chkYCenterClick(Sender: TObject);
procedure txtPosExit(Sender: TObject);
procedure txtTimeToShowExit(Sender: TObject);
private
eDown: Boolean;
eStartPos: TPoint;
@ -89,7 +89,7 @@ begin
lblHudMsg.Left := 0
else if lblHudMsg.Left > pnlHudmessage.Width then
lblHudMsg.Left := pnlHudmessage.Width;
txtXPos.Text := FloatToStr(RoundTo(lblHudMsg.Left / pnlHudmessage.Width, -2));
txtXPos.Text := FloatToStrF(lblHudMsg.Left / pnlHudmessage.Width, ffFixed, -2, 2);
end;
{ Y Pos }
@ -99,7 +99,7 @@ begin
lblHudMsg.Top := 0
else if lblHudMsg.Top > pnlHudmessage.Height then
lblHudMsg.Top := pnlHudmessage.Height;
txtYPos.Text := FloatToStr(RoundTo(lblHudMsg.Top / pnlHudmessage.Height, -2));
txtYPos.Text := FloatToStrF(lblHudMsg.Top / pnlHudmessage.Height, ffFixed, -2, 2);
end;
end;
end;
@ -169,7 +169,7 @@ procedure TfrmHudMsgGenerator.txtTextKeyPress(Sender: TObject;
var Key: Char);
begin
if Key = #13 then begin
txtText.SelText := '\n';
txtText.SelText := '^n';
Key := #0;
end;
end;
@ -195,7 +195,7 @@ begin
if txtText.Text = '' then
lblHudMsg.Caption := 'Custom Hudmessage'
else
lblHudMsg.Caption := StringReplace(txtText.Text, '\n', #13, [rfReplaceAll]);
lblHudMsg.Caption := StringReplace(txtText.Text, '^n', #13, [rfReplaceAll]);
if chkXCenter.Checked then
CenterX;
@ -210,20 +210,6 @@ begin
Key := ',';
end;
procedure TfrmHudMsgGenerator.txtTimeToShowChange(Sender: TObject);
var eVal: Real;
begin
try
eVal := Round(StrToFloat(txtTimeToShow.Text));
if eVal < 0 then begin
eVal := 0.0;
txtTimeToShow.Text := FloatToStr(eVal);
end;
except
txtTimeToShow.Text := '12,0';
end;
end;
procedure TfrmHudMsgGenerator.chkXCenterClick(Sender: TObject);
var eChar: Char;
begin
@ -276,4 +262,16 @@ begin
txtYPos.OnKeyPress(txtXPos, eChar);
end;
procedure TfrmHudMsgGenerator.txtTimeToShowExit(Sender: TObject);
var eVal: Real;
begin
try
eVal := Round(StrToFloat(txtTimeToShow.Text));
if eVal < 0 then
txtTimeToShow.Text := '0,0';
except
txtTimeToShow.Text := '12,0';
end;
end;
end.

View File

@ -4544,7 +4544,6 @@ object frmMain: TfrmMain
TabOrder = 1
OnClick = cmdCancelClick
CaptionGlowColor = clBtnFace
DropDownArrow = True
LinkFont.Charset = DEFAULT_CHARSET
LinkFont.Color = clBlue
LinkFont.Height = -11
@ -6569,6 +6568,7 @@ object frmMain: TfrmMain
end
object IdFTP: TIdFTP
MaxLineAction = maSplit
ReadTimeout = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
Left = 722

View File

@ -894,7 +894,7 @@ end;
procedure TfrmMain.mnuSaveAsClick(Sender: TObject);
begin
if sdSave.Execute then begin
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter);
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter, ActiveDoc);
ActiveDoc.Save;
tbDocs.Tabs[ActiveDoc.Index].Caption := ActiveDoc.Title;
end;
@ -1296,7 +1296,7 @@ begin
b := Integer(frmAllFilesForm.lstFiles.Items.Objects[a]);
if TDocument(Collection.Items[b]).Untitled then begin
if sdSave.Execute then begin
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter);
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter, TDocument(Collection.Items[b]));
TDocument(Collection.Items[b]).Save;
TJvTabBarItem(tbDocs.Tabs[b]).Caption := TDocument(Collection.Items[b]).Title;
end
@ -1547,7 +1547,7 @@ begin
else begin
frmMain.sdSave.FilterIndex := 1;
if frmMain.sdSave.Execute then begin
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
eItem.Save;
end
else begin
@ -1571,7 +1571,7 @@ begin
else begin
frmMain.sdSave.FilterIndex := 2;
if frmMain.sdSave.Execute then begin
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
eItem.Save;
end
else begin
@ -1595,7 +1595,7 @@ begin
else begin
frmMain.sdSave.FilterIndex := 0;
if frmMain.sdSave.Execute then begin
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter, eItem);
eItem.Save;
end
else begin
@ -1706,6 +1706,7 @@ procedure TfrmMain.mnuHudmessageClick(Sender: TObject);
function Dot(eIn: string): string;
begin
Result := StringReplace(eIn, ',', '.', [rfReplaceAll]);
Result := StringReplace(Result, '.00', '.0', [rfReplaceAll]);
end;
var eStr: string;
@ -2231,7 +2232,7 @@ begin
sciEditor.Lines.Add(#9 + 'if (socket_change(sck' + frmConnGen.txtName.Text + ', 100)) {');
sciEditor.Lines.Add(#9 + #9 + 'new buf[512], lines[30][100], count = 0');
sciEditor.Lines.Add(#9 + #9 + 'socket_recv(sck' + frmConnGen.txtName.Text + ', buf, 511)');
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 50, 119, buf, 13)');
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 29, 99, buf, 13)');
sciEditor.Lines.Add(#9 + #9 + 'for(new i=0;i<count;i++) {');
sciEditor.Lines.Add(#9 + #9 + #9 + '/* Process items here */');
sciEditor.Lines.Add(#9 + #9 + '}');

View File

@ -3,4 +3,4 @@ source = /home/users/dvander/amxx
makeopts =
output = /home/users/dvander/done
devenv = /usr/bin/make
release = amxmodx-1.76
release = amxmodx-1.76c

View File

@ -3,4 +3,4 @@ source = R:\amxmodx
makeopts =
output = c:\real\done
devenv = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.com
release = amxmodx-1.76b
release = amxmodx-1.76c

View File

@ -2,7 +2,7 @@
; Licensed under the GNU General Public License
; Originally written by -=HaXoMaTiC=-
!define PRODUCT_NAME "AMX Mod X Installer"
!define PRODUCT_VERSION "1.76b"
!define PRODUCT_VERSION "1.76c"
!define PRODUCT_PUBLISHER "AMX Mod X Dev Team"
!define PRODUCT_WEB_SITE "http://www.amxmodx.org/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Installer.exe"
@ -149,38 +149,27 @@ Section "MainSection" SEC01
File "installer\files\base\data\lang\timeleft.txt"
SetOutPath "$INSTDIR\files\base\dlls"
File "installer\files\base\dlls\amxmodx_mm.dll"
File "installer\files\base\dlls\amxmodx_mm_amd64.so"
File "installer\files\base\dlls\amxmodx_mm_i386.so"
File "installer\files\base\dlls\metamod.dll"
File "installer\files\base\dlls\metamod_amd64.so"
File "installer\files\base\dlls\metamod_i386.so"
SetOutPath "$INSTDIR\files\base\modules"
File "installer\files\base\modules\nvault_amxx.dll"
File "installer\files\base\modules\nvault_amxx_amd64.so"
File "installer\files\base\modules\nvault_amxx_i386.so"
File "installer\files\base\modules\engine_amxx.dll"
File "installer\files\base\modules\engine_amxx_amd64.so"
File "installer\files\base\modules\engine_amxx_i386.so"
File "installer\files\base\modules\fakemeta_amxx.dll"
File "installer\files\base\modules\fakemeta_amxx_amd64.so"
File "installer\files\base\modules\fakemeta_amxx_i386.so"
File "installer\files\base\modules\fun_amxx.dll"
File "installer\files\base\modules\fun_amxx_amd64.so"
File "installer\files\base\modules\fun_amxx_i386.so"
File "installer\files\base\modules\geoip_amxx.dll"
File "installer\files\base\modules\geoip_amxx_amd64.so"
File "installer\files\base\modules\geoip_amxx_i386.so"
File "installer\files\base\modules\sqlite_amxx.dll"
File "installer\files\base\modules\sqlite_amxx_amd64.so"
File "installer\files\base\modules\sqlite_amxx_i386.so"
File "installer\files\base\modules\mysql_amxx.dll"
File "installer\files\base\modules\mysql_amxx_amd64.so"
File "installer\files\base\modules\mysql_amxx_i386.so"
File "installer\files\base\modules\regex_amxx.dll"
File "installer\files\base\modules\regex_amxx_amd64.so"
File "installer\files\base\modules\regex_amxx_i386.so"
File "installer\files\base\modules\sockets_amxx.dll"
File "installer\files\base\modules\sockets_amxx_amd64.so"
File "installer\files\base\modules\sockets_amxx_i386.so"
SetOutPath "$INSTDIR\files\base\plugins"
File "installer\files\base\plugins\admin.amxx"
@ -329,10 +318,8 @@ Section "MainSection" SEC01
File "installer\files\cstrike\data\WinCSX.exe"
SetOutPath "$INSTDIR\files\cstrike\modules"
File "installer\files\cstrike\modules\cstrike_amxx.dll"
File "installer\files\cstrike\modules\cstrike_amxx_amd64.so"
File "installer\files\cstrike\modules\cstrike_amxx_i386.so"
File "installer\files\cstrike\modules\csx_amxx.dll"
File "installer\files\cstrike\modules\csx_amxx_amd64.so"
File "installer\files\cstrike\modules\csx_amxx_i386.so"
SetOutPath "$INSTDIR\files\cstrike\plugins"
File "installer\files\cstrike\plugins\miscstats.amxx"
@ -585,10 +572,8 @@ Section Uninstall
Delete "$INSTDIR\files\cstrike\plugins\restmenu.amxx"
Delete "$INSTDIR\files\cstrike\plugins\miscstats.amxx"
Delete "$INSTDIR\files\cstrike\modules\csx_amxx_i386.so"
Delete "$INSTDIR\files\cstrike\modules\csx_amxx_amd64.so"
Delete "$INSTDIR\files\cstrike\modules\csx_amxx.dll"
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx_i386.so"
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx_amd64.so"
Delete "$INSTDIR\files\cstrike\modules\cstrike_amxx.dll"
Delete "$INSTDIR\files\cstrike\data\csstats.amxx"
Delete "$INSTDIR\files\cstrike\data\WinCSX.amxx"
@ -729,37 +714,26 @@ Section Uninstall
Delete "$INSTDIR\files\base\plugins\adminchat.amxx"
Delete "$INSTDIR\files\base\plugins\admin.amxx"
Delete "$INSTDIR\files\base\modules\nvault_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\nvault_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\nvault_amxx.dll"
Delete "$INSTDIR\files\base\modules\sockets_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\sockets_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\sockets_amxx.dll"
Delete "$INSTDIR\files\base\modules\regex_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\regex_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\regex_amxx.dll"
Delete "$INSTDIR\files\base\modules\sqlite_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\sqlite_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\sqlite_amxx.dll"
Delete "$INSTDIR\files\base\modules\mysql_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\mysql_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\mysql_amxx.dll"
Delete "$INSTDIR\files\base\modules\geoip_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\geoip_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\geoip_amxx.dll"
Delete "$INSTDIR\files\base\modules\fun_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\fun_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\fun_amxx.dll"
Delete "$INSTDIR\files\base\modules\fakemeta_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\fakemeta_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\fakemeta_amxx.dll"
Delete "$INSTDIR\files\base\modules\engine_amxx_i386.so"
Delete "$INSTDIR\files\base\modules\engine_amxx_amd64.so"
Delete "$INSTDIR\files\base\modules\engine_amxx.dll"
Delete "$INSTDIR\files\base\dlls\metamod_i386.so"
Delete "$INSTDIR\files\base\dlls\metamod_amd64.so"
Delete "$INSTDIR\files\base\dlls\metamod.dll"
Delete "$INSTDIR\files\base\dlls\amxmodx_mm_i386.so"
Delete "$INSTDIR\files\base\dlls\amxmodx_mm_amd64.so"
Delete "$INSTDIR\files\base\dlls\amxmodx_mm.dll"
Delete "$INSTDIR\files\base\data\lang\timeleft.txt"
Delete "$INSTDIR\files\base\data\lang\time.txt"

Binary file not shown.

View File

@ -3,10 +3,10 @@ unit UnitInstall;
interface
uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages,
TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs;
TlHelp32, IdFTPCommon, ComCtrls, Dialogs, JclFileUtils;
type TMod = (modNone, modCS, modDoD, modTFC, modNS, modTS, modESF);
type TOS = (osWindows, osLinux32, osLinux64);
type TOS = (osWindows, osLinux32{, osLinux64});
procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True);
procedure AddDone(Additional: String = '');
@ -213,7 +213,7 @@ begin
if Pos('_amd64', ExtractFileName(eFile)) <> 0 then
Result := True;
end;
osLinux64: begin
{osLinux64: begin
if ExtractFileExt(eFile) = '.dll' then
Result := True;
if ExtractFileExt(eFile) = '.exe' then
@ -221,7 +221,7 @@ begin
if Pos('_i386', ExtractFileName(eFile)) <> 0 then
Result := True;
end;
end;}
end;
end;
@ -350,10 +350,10 @@ begin
eStr[i] := '//' + eStr[i];
end;
eStr.Add('gamedll "addons\metamod\dlls\metamod.dll"');
if OS = osLinux64 then
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"')
else
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
//if OS = osLinux64 then
// eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_amd64.so"')
//else
eStr.Add('gamedll_linux "addons/metamod/dlls/metamod_i386.so"');
FileSetAttr(ePath + 'liblist.gam', 0);
eStr.SaveToFile(ePath + 'liblist.gam');
FileSetAttr(ePath + 'liblist.gam', faReadOnly); // important for listen servers
@ -614,11 +614,13 @@ begin
ePath := '/';
CurNode := frmMain.trvDirectories.Selected;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
Screen.Cursor := crAppStart;
frmMain.cmdCancel.Show;
frmMain.cmdCancel.Caption := '&Cancel';

View File

@ -6101,14 +6101,14 @@ object frmMain: TfrmMain
end
object lblStep2: TLabel
Left = 44
Top = 254
Top = 230
Width = 244
Height = 13
Caption = '4. Connect to server and select the mod directory:'
end
object lblStep4: TLabel
Left = 44
Top = 214
Top = 188
Width = 117
Height = 13
Caption = '3. Select a game addon:'
@ -6122,7 +6122,7 @@ object frmMain: TfrmMain
end
object lblStep5: TLabel
Left = 44
Top = 358
Top = 334
Width = 64
Height = 13
Caption = '5. Click Next.'
@ -6312,7 +6312,7 @@ object frmMain: TfrmMain
end
object cmdConnect: TFlatButton
Left = 416
Top = 269
Top = 247
Width = 71
Height = 20
ColorFocused = 16245198
@ -6326,30 +6326,34 @@ object frmMain: TfrmMain
end
object pnlDirectory: TPanel
Left = 44
Top = 270
Top = 246
Width = 367
Height = 83
BevelOuter = bvLowered
TabOrder = 2
DesignSize = (
367
83)
object trvDirectories: TTreeView
Left = 1
Top = 1
Width = 365
Height = 81
Align = alClient
Anchors = [akLeft, akTop, akRight, akBottom]
BorderStyle = bsNone
Images = ilImages
Indent = 19
ReadOnly = True
TabOrder = 0
OnChange = trvDirectoriesChange
OnCollapsing = trvDirectoriesCollapsing
OnExpanding = trvDirectoriesExpanding
OnExpanded = trvDirectoriesExpanded
OnMouseDown = trvDirectoriesMouseDown
end
end
object cboGameAddon: TFlatComboBox
Left = 44
Top = 230
Top = 204
Width = 443
Height = 21
Style = csDropDownList
@ -6372,27 +6376,9 @@ object frmMain: TfrmMain
Left = 44
Top = 158
Width = 441
Height = 50
Height = 25
BevelOuter = bvLowered
TabOrder = 5
object lblOSNote: TLabel
Left = 4
Top = 24
Width = 435
Height = 22
Caption =
'Note: Most linux servers run on a 32-bit platform. If you are no' +
't sure what platform your server is using, you can still ask you' +
'r provider for further information about this topic.'
Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -9
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
WordWrap = True
end
object optWindows: TFlatRadioButton
Left = 5
Top = 5
@ -6417,6 +6403,7 @@ object frmMain: TfrmMain
Width = 82
Height = 14
Caption = 'Linux (64-bit)'
Enabled = False
TabOrder = 2
end
end
@ -6769,6 +6756,7 @@ object frmMain: TfrmMain
object IdFTP: TIdFTP
Intercept = IdLogFile
MaxLineAction = maException
ReadTimeout = 0
RecvBufferSize = 1024
SendBufferSize = 1024
OnWork = IdFTPWork

View File

@ -108,10 +108,9 @@ type
pnlOS: TPanel;
optWindows: TFlatRadioButton;
optLinux32: TFlatRadioButton;
optLinux64: TFlatRadioButton;
lblOSNote: TLabel;
lblStep5: TLabel;
lblFTP: TLabel;
optLinux64: TFlatRadioButton;
procedure jvwStepsCancelButtonClick(Sender: TObject);
procedure cmdCancelClick(Sender: TObject);
procedure cmdNextClick(Sender: TObject);
@ -123,7 +122,6 @@ type
procedure cmdProxySettingsClick(Sender: TObject);
procedure txtPortChange(Sender: TObject);
procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode);
procedure trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
procedure FormDestroy(Sender: TObject);
procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
@ -137,6 +135,8 @@ type
procedure frbFTPClick(Sender: TObject);
procedure frbLocalClick(Sender: TObject);
procedure trvModsClick(Sender: TObject);
procedure trvDirectoriesMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
private
OldProgress: Integer;
CurrProgress: Integer;
@ -148,7 +148,7 @@ var
frmMain: TfrmMain;
gMultiAccount: Boolean;
const VERSION = '1.76b';
const VERSION = '1.76c';
implementation
@ -214,11 +214,13 @@ begin
eStr := TStringList.Create;
ePath := '/';
CurNode := trvDirectories.Selected;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
try
IdFTP.ChangeDir(ePath);
except
@ -236,6 +238,7 @@ begin
if eStr.IndexOf('liblist.gam') = -1 then begin
MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING);
eStr.Free;
Screen.Cursor := crDefault;
exit;
end
else
@ -246,7 +249,7 @@ begin
cmdConnect.Enabled := False;
optWindows.Enabled := False;
optLinux32.Enabled := False;
optLinux64.Enabled := False;
//optLinux64.Enabled := False;
cboGameAddon.Enabled := False;
// preinstall...
MakeDir(ExtractFilePath(ParamStr(0)) + 'temp');
@ -277,10 +280,10 @@ begin
if optWindows.Checked then
eOS := osWindows
else if optLinux32.Checked then
eOS := osLinux32
else
eOS := osLinux64;
else //if optLinux32.Checked then
eOS := osLinux32;
//else
// eOS := osLinux64;
jspInstallProgress.Show;
frmMain.Height := 382;
@ -576,7 +579,7 @@ begin
end;
end
else if frbFTP.Checked then begin // FTP
frmMain.Height := 445;
frmMain.Height := 421;
jspFTP.Show;
end;
end;
@ -639,6 +642,7 @@ begin
cmdConnect.Enabled := True;
cmdConnect.Caption := 'Disconnect';
cmdCancel.Caption := '&Close';
cmdNext.Enabled := True;
CurNode := nil;
if eStr.Count <> 0 then begin
@ -816,10 +820,12 @@ begin
// get complete path
ePath := '/';
CurNode := Node;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
// change dir and add directories in it
try
Repaint;
@ -838,11 +844,6 @@ begin
end;
end;
procedure TfrmMain.trvDirectoriesChange(Sender: TObject; Node: TTreeNode);
begin
cmdNext.Enabled := Assigned(trvDirectories.Selected);
end;
procedure TfrmMain.FormDestroy(Sender: TObject);
begin
FileList.Free;
@ -936,4 +937,15 @@ begin
cmdNext.Enabled := (Assigned(trvMods.Selected));
end;
procedure TfrmMain.trvDirectoriesMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var Node: TTreeNode;
begin
Node := trvDirectories.GetNodeAt(X, Y);
if (Assigned(Node)) then begin
if (Node.DisplayRect(True).Right < X) then
trvDirectories.Selected := nil;
end;
end;
end.

View File

@ -460,7 +460,7 @@ public adminSql()
new qcolAccess = SQL_FieldNameToNum(query, "access")
new qcolFlags = SQL_FieldNameToNum(query, "flags")
while (SQL_MoreResults(query))
while ((g_aNum < MAX_ADMINS) && (SQL_MoreResults(query)))
{
SQL_ReadResult(query, qcolAuth, g_aName[g_aNum], 31)
SQL_ReadResult(query, qcolPass, g_aPassword[g_aNum], 31)

View File

@ -45,8 +45,20 @@ new g_Modified
new g_blockPos[112]
new g_saveFile[64]
new g_Restricted[] = "* This item is restricted *"
new g_szWeapRestr[27] = "0000000000000000000000000"
new g_szWeapRestr[27] = "00000000000000000000000000"
new g_szEquipAmmoRestr[10] = "000000000"
new g_InBuyMenu[33]
new g_RegisteredMenus[10]
new g_menuStrings[6][] =
{
"BuyPistol",
"BuyShotgun",
"BuySubMachineGun",
"BuyRifle",
"BuyMachineGun",
"BuyItem"
}
new g_menusNames[7][] =
{
@ -295,6 +307,19 @@ new g_Aliases2[MAXMENUPOS][] =
new g_Autobuy[33][AUTOBUYLENGTH + 1]
//new g_Rebuy[33][AUTOBUYLENGTH + 1]
bool:IsOurMenuID(id)
{
for (new i=1; i<=g_RegisteredMenus[0]; i++)
{
if (g_RegisteredMenus[i] == id)
{
return true
}
}
return false
}
setWeapon(a, action)
{
new b, m = g_Keys[a][0] * 8
@ -605,7 +630,30 @@ public client_command(id)
new arg[13]
if (read_argv(0, arg, 12) > 11) /* Longest buy command has 11 chars so if command is longer then don't care */
{
return PLUGIN_CONTINUE
}
if (equali(arg, "menuselect") && is_user_connected(id))
{
new menu, newmenu
new inMenu = player_menu_info(id, menu, newmenu)
if (!inMenu && g_InBuyMenu[id])
{
new key[12], num
read_argv(1, key, 11)
num = str_to_num(key) - 1
return checkRest(id, g_InBuyMenu[id], num)
} else if ((!menu || newmenu != -1)
|| !IsOurMenuID(menu)) {
g_InBuyMenu[id] = 0
}
return PLUGIN_CONTINUE
}
new a = 0
@ -631,7 +679,9 @@ public blockcommand(id)
public cmdMenu(id, level, cid)
{
if (cmd_access(id, level, cid, 1))
displayMenu(id, g_Position[id] = 0)
{
displayMenu(id, g_Position[id] = 0)
}
return PLUGIN_HANDLED
}
@ -641,9 +691,18 @@ checkRest(id, menu, key)
new team = get_user_team(id)
if (team != 1 && team != 2)
{
return PLUGIN_HANDLED
}
new pos = (menu * 8 + key) + (get_user_team(id) - 1) * 56
if (g_blockPos[(menu * 8 + key) + (get_user_team(id) - 1) * 56])
if (pos < 0 || pos >= 112)
{
return PLUGIN_CONTINUE
}
if (g_blockPos[pos])
{
engclient_cmd(id, "menuselect", "10")
client_print(id, print_center, "%s", g_Restricted)
@ -799,6 +858,70 @@ public fn_autobuy(id)
return PLUGIN_HANDLED
}
public HookEvent_ShowMenu(id)
{
new menustring[24]
read_data(4, menustring, 23)
/* Early breakouts */
new curidx
if (menustring[curidx++] != '#')
{
g_InBuyMenu[id] = 0
return
}
/* Strip D */
if (menustring[curidx] == 'D')
{
curidx++
}
/* Strip AS_ */
if (menustring[curidx] == 'A'
&& menustring[curidx+1] == 'S'
&& menustring[curidx+2] == '_')
{
curidx += 3
}
/* Strip any team tags */
if (menustring[curidx] == 'C'
&& menustring[curidx+1] == 'T'
&& menustring[curidx+2] == '_')
{
curidx += 3
} else if (menustring[curidx] == 'T'
&& menustring[curidx+1] == '_') {
curidx += 2
}
if (menustring[curidx] != 'B')
{
g_InBuyMenu[id] = 0
return
}
for (new i=0; i<6; i++)
{
if (equali(menustring[curidx], g_menuStrings[i]))
{
g_InBuyMenu[id] = i+1
return
}
}
g_InBuyMenu[id] = 0
}
RegisterMenuID(const menuname[])
{
new id = register_menuid(menuname, 1)
g_RegisteredMenus[++g_RegisteredMenus[0]] = id
return id
}
public plugin_init()
{
register_plugin("Restrict Weapons", AMXX_VERSION_STR, "AMXX Dev Team")
@ -811,12 +934,12 @@ public plugin_init()
register_clcmd("amx_restmenu", "cmdMenu", ADMIN_CFG, "- displays weapons restriction menu")
register_menucmd(register_menuid("#Buy", 1), 511, "menuBuy")
register_menucmd(register_menuid("Restrict Weapons"), 1023, "actionMenu")
register_menucmd(register_menuid("BuyPistol", 1), 511, "menuPistol")
register_menucmd(register_menuid("BuyShotgun", 1), 511, "menuShotgun")
register_menucmd(register_menuid("BuySub", 1), 511, "menuSub")
register_menucmd(register_menuid("BuyRifle", 1), 511, "menuRifle")
register_menucmd(register_menuid("BuyMachine", 1), 511, "menuMachine")
register_menucmd(register_menuid("BuyItem", 1), 511, "menuItem")
register_menucmd(RegisterMenuID("BuyPistol"), 511, "menuPistol")
register_menucmd(RegisterMenuID("BuyShotgun"), 511, "menuShotgun")
register_menucmd(RegisterMenuID("BuySub"), 511, "menuSub")
register_menucmd(RegisterMenuID("BuyRifle"), 511, "menuRifle")
register_menucmd(RegisterMenuID("BuyMachine"), 511, "menuMachine")
register_menucmd(RegisterMenuID("BuyItem"), 511, "menuItem")
register_menucmd(-28, 511, "menuBuy")
register_menucmd(-29, 511, "menuPistol")
register_menucmd(-30, 511, "menuShotgun")
@ -828,6 +951,8 @@ public plugin_init()
register_cvar("amx_restrweapons", "00000000000000000000000000")
register_cvar("amx_restrequipammo", "000000000")
register_event("ShowMenu", "HookEvent_ShowMenu", "b")
new configsDir[64];
get_configsdir(configsDir, 63);

View File

@ -204,7 +204,7 @@ public plugin_init()
register_clcmd("say /me", "cmdMe", 0, "- display current round stats (chat)")
register_clcmd("say /score", "cmdScore", 0, "- display last score (chat)")
register_clcmd("say /rank", "cmdRank", 0, "- display your rank (chat)")
register_clcmd("say /report", "cmdReport", 0, "- display waepon status (say_team)")
register_clcmd("say /report", "cmdReport", 0, "- display weapon status (say_team)")
register_clcmd("say /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
register_clcmd("say /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
register_clcmd("say /switch", "cmdSwitch", 0, "- switch client's stats on or off")
@ -214,7 +214,7 @@ public plugin_init()
register_clcmd("say_team /me", "cmdMe", 0, "- display current round stats (chat)")
register_clcmd("say_team /score", "cmdScore", 0, "- display last score (chat)")
register_clcmd("say_team /rank", "cmdRank", 0, "- display your rank (chat)")
register_clcmd("say_team /report", "cmdReport", 0, "- display waepon status (say_team_team)")
register_clcmd("say_team /report", "cmdReport", 0, "- display weapon status (say_team_team)")
register_clcmd("say_team /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
register_clcmd("say_team /stats", "cmdStats", 0, "- display players stats (menu/MOTD)")
register_clcmd("say_team /switch", "cmdSwitch", 0, "- switch client's stats on or off")

View File

@ -758,6 +758,8 @@ public client_death(killer,victim,wpnindex,hitplace,TK)
}
public showDoubleKill(){
if (g_KillCount < 2)
return
new pos = g_KillCount - 2
if ( pos > 2 ) pos = 2
if ( DoubleKill ) {

View File

@ -11,9 +11,9 @@
#endif
#define _amxconst_included
#define AMXX_VERSION 1.762
#define AMXX_VERSION 1.763
#define AMXX_VERSION_NUM 176
stock const AMXX_VERSION_STR[]="1.76b"
stock const AMXX_VERSION_STR[]="1.76c"
#define M_PI 3.1415926535

View File

@ -81,6 +81,7 @@ enum {
targetname
}
#if !defined _vexd_bcompat_included
/* 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 */
@ -91,5 +92,6 @@ stock find_entity(start_from_ent, category, value[]) {
}
return find_ent_by_class(start_from_ent, value)
}
#endif
#endif // _xtrafun_included

View File

@ -473,13 +473,19 @@ native get_user_flags(index,id=0);
/* Removes flags for player. */
native remove_user_flags(index,flags=-1,id=0);
/* Registers function which will be called from client console. */
/* Registers function which will be called from client console.
* Returns the command ID.
*/
native register_clcmd(const client_cmd[],const function[],flags=-1, info[]="");
/* Registers function which will be called from any console. */
/* Registers function which will be called from any console.
* Returns the command ID.
*/
native register_concmd(const cmd[],const function[],flags=-1, info[]="");
/* Registers function which will be called from server console. */
/* Registers function which will be called from server console.
* Returns the command ID.
*/
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
/* Gets info about client command. */

View File

@ -22,7 +22,7 @@
//get a two character country code (eg US, CA etc)
native geoip_code2(ip[], ccode[3]);
//get a three character country code (eg USA, cAN etc)
//get a three character country code (eg USA, CAN etc)
native geoip_code3(ip[], result[4]);
//get a full country name. max name is 45 chars

View File

@ -318,7 +318,7 @@ stock Handle:SQL_MakeStdTuple()
get_cvar_string("amx_sql_type", set_type, 11)
get_cvar_string("amx_sql_db", db, 127)
SQL_GetAffinity(get_type, 12)
SQL_GetAffinity(get_type, 11)
if (!equali(get_type, set_type))
{

View File

@ -88,8 +88,10 @@ public checkVotes()
for (new a = 0; a < g_mapVoteNum; ++a)
if (g_voteCount[b] < g_voteCount[a])
b = a
if (g_voteCount[SELECTMAPS] > g_voteCount[b])
if (g_voteCount[SELECTMAPS] > g_voteCount[b]
&& g_voteCount[SELECTMAPS] > g_voteCount[SELECTMAPS+1])
{
new mapname[32]
@ -103,8 +105,10 @@ public checkVotes()
}
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
{
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]])
}
new smap[32]
get_cvar_string("amx_nextmap", smap, 31)

View File

@ -56,7 +56,7 @@ public plugin_init()
register_dictionary("mapsmenu.txt")
register_dictionary("common.txt")
register_clcmd("amx_mapmenu", "cmdMapsMenu", ADMIN_MAP, "- displays changelevel menu")
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_MAP, "- displays votemap menu")
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_VOTE, "- displays votemap menu")
register_menucmd(register_menuid("Changelevel Menu"), 1023, "actionMapsMenu")
register_menucmd(register_menuid("Which map do you want?"), 527, "voteCount")

View File

@ -130,7 +130,7 @@ AddDefaultMenus()
AddMenuLang("SLAP_SLAY", "amx_slapmenu", ADMIN_SLAY, "Players Menu")
AddMenuLang("TEAM_PLAYER", "amx_teammenu", ADMIN_LEVEL_A, "Players Menu")
AddMenuLang("CHANGEL", "amx_mapmenu", ADMIN_MAP, "Maps Menu")
AddMenuLang("VOTE_MAPS", "amx_votemapmenu", ADMIN_MAP, "Maps Menu")
AddMenuLang("VOTE_MAPS", "amx_votemapmenu", ADMIN_VOTE, "Maps Menu")
AddMenuLang("SPECH_STUFF", "amx_speechmenu", ADMIN_MENU, "Commands Menu")
AddMenuLang("CLIENT_COM", "amx_clcmdmenu", ADMIN_LEVEL_A, "Players Menu")
AddMenuLang("SERVER_COM", "amx_cmdmenu", ADMIN_MENU, "Commands Menu")
@ -140,7 +140,7 @@ AddDefaultMenus()
AddMenuLang("STATS_SET", "amx_statscfgmenu", ADMIN_CFG, "Stats Configuration")
AddMenuLang("PAUSE_PLUG", "amx_pausecfgmenu", ADMIN_CFG, "Pause Plugins")
AddMenuLang("RES_WEAP", "amx_restmenu", ADMIN_CFG, "Restrict Weapons")
AddMenuLang("TELE_PLAYER", "amx_teleportmenu", ADMIN_LEVEL_A, "Teleport Menu")
AddMenuLang("TELE_PLAYER", "amx_teleportmenu", ADMIN_CFG, "Teleport Menu")
}
public actionMenu(id, key)

View File

@ -42,6 +42,7 @@ new g_ReadyRoomAck[12];
new g_AutoAssignAck[12];
new g_StopCommAck[12];
enum {
PLAYERCLASS_NONE = 0,
PLAYERCLASS_ALIVE_MARINE,
@ -72,6 +73,10 @@ enum {
new g_Class[33]; // stored info from the "ScoreInfo" message
new g_Team[33];
new g_ScoreInfo_Class;
new g_ScoreInfo_Team;
public plugin_init() {
register_plugin("NS Commands",AMXX_VERSION_STR,"AMXX Dev Team");
// create our semi-random acknowledgement commands
@ -103,6 +108,19 @@ public plugin_init() {
i++;
}
if (cvar_exists("sv_structurelimit"))
{
// ns 3.2 beta
g_ScoreInfo_Class=6;
g_ScoreInfo_Team=8;
}
else
{
// ns 3.1
g_ScoreInfo_Class=5;
g_ScoreInfo_Team=7;
}
// register ScoreInfo message..
register_event("ScoreInfo","msgScoreInfo","a")
}
@ -112,8 +130,8 @@ public msgScoreInfo() {
// just incase..
return;
}
g_Class[id]=read_data(5);
g_Team[id]=read_data(7);
g_Class[id]=read_data(g_ScoreInfo_Class);
g_Team[id]=read_data(g_ScoreInfo_Team);
}
public client_disconnect(id) {
g_Class[id]=0;

View File

@ -57,7 +57,7 @@ public plugin_init()
register_dictionary("common.txt")
register_dictionary("admincmd.txt")
register_concmd("amx_pausecfg", "cmdPlugin", ADMIN_CFG, "- list commands for pause/unpause managment")
register_concmd("amx_pausecfg", "cmdPlugin", ADMIN_CFG, "- list commands for pause/unpause management")
register_clcmd("amx_pausecfgmenu", "cmdMenu", ADMIN_CFG, "- pause/unpause plugins with menu")
#if defined DIRECT_ONOFF
register_concmd("amx_off", "cmdOFF", ADMIN_CFG, "- pauses some plugins")
@ -144,11 +144,6 @@ public actionMenu(id, key)
{
case 'r': pause("ac", file)
case 'p':
{
g_Modified = 1
pause("dc", file)
}
case 's':
{
g_Modified = 1
unpause("ac", file)

View File

@ -7,6 +7,7 @@ public plugin_init()
register_clcmd("menu_test1", "Test_Menu1")
register_clcmd("menu_test2", "Test_Menu2")
register_clcmd("menu_test3", "Test_Menu3")
register_clcmd("menu_test4", "Test_Menu4")
}
public Test_Menu1(id, level, cid)
@ -89,4 +90,39 @@ public Test_Menu3_Handler(id, menu, item)
menu_destroy(menu)
return PLUGIN_HANDLED
}
}
public Test_Menu4(id)
{
new mHandleID = menu_create("Test Menu 4", "Test_Menu4_Handler")
menu_setprop(mHandleID, MPROP_PERPAGE, 0)
menu_additem(mHandleID, "test1", "1", 0)
menu_additem(mHandleID, "test2", "2", 0)
menu_additem(mHandleID, "test3", "3", 0)
menu_additem(mHandleID, "test4", "4", 0)
menu_additem(mHandleID, "test5", "5", 0)
menu_additem(mHandleID, "test6", "6", 0)
menu_additem(mHandleID, "test7", "7", 0)
menu_additem(mHandleID, "test8", "8", 0)
menu_additem(mHandleID, "test9", "9", 0)
menu_additem(mHandleID, "test10", "10", 0)
menu_display(id, mHandleID, 0)
return PLUGIN_HANDLED
}
public Test_Menu4_Handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
client_print(id, print_chat, "item = %d", item)
menu_destroy(menu)
return PLUGIN_HANDLED
}