1 Commits

Author SHA1 Message Date
45bccd7a7f Tagged 1.76b 2007-02-02 05:10:54 +00:00
51 changed files with 206 additions and 459 deletions

View File

@ -226,8 +226,6 @@ 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)
@ -238,8 +236,6 @@ 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)
@ -252,15 +248,13 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
cell realParams[FORWARD_MAX_PARAMS];
cell *physAddrs[FORWARD_MAX_PARAMS];
if (!m_HasFunc || m_ToDelete)
if (!m_HasFunc)
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();
@ -362,8 +356,6 @@ cell CSPForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
}
}
m_InExec = false;
return retVal;
}
@ -460,20 +452,7 @@ bool CForwardMngr::isIdValid(int id) const
cell CForwardMngr::executeForwards(int id, cell *params)
{
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);
}
int retVal = (id & 1) ? m_SPForwards[id >> 1]->execute(params, m_TmpArrays) : m_Forwards[id >> 1]->execute(params, m_TmpArrays);
m_TmpArraysNum = 0;
return retVal;
@ -545,15 +524,8 @@ void CForwardMngr::unregisterSPForward(int id)
if (!isIdValid(id) || m_SPForwards.at(id >> 1)->isFree)
return;
CSPForward *fwd = m_SPForwards.at(id >> 1);
if (fwd->m_InExec)
{
fwd->m_ToDelete = true;
} else {
fwd->isFree = true;
m_FreeSPForwards.push(id);
}
m_SPForwards.at(id >> 1)->isFree = true;
m_FreeSPForwards.push(id);
}
int registerForwardC(const char *funcName, ForwardExecType et, cell *list, size_t num, int fwd_type)

View File

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

View File

@ -87,10 +87,6 @@ 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
@ -144,13 +140,4 @@ void MenuMngr::clear()
}
}
MenuMngr::iterator MenuMngr::SetWatchIter(MenuMngr::iterator iter)
{
MenuMngr::iterator old = m_watch_iter;
m_watch_iter = iter;
return old;
}
int MenuMngr::MenuIdEle::uniqueid = 0;

View File

@ -76,8 +76,7 @@ private:
} *headcmd;
public:
MenuMngr() : m_watch_iter(end())
{ headid = NULL; headcmd = NULL; }
MenuMngr() { headid = 0; headcmd = 0; }
~MenuMngr();
// Interface
@ -90,7 +89,6 @@ public:
class iterator
{
friend class MenuMngr;
MenuCommand* a;
public:
iterator(MenuCommand*aa) : a(aa) {}
@ -103,11 +101,6 @@ 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 cmd->getId();
return 1;
}
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 cmd->getId();
return 1;
}
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 cmd->getId();
return 0;
}
static cell AMX_NATIVE_CALL get_concmd(AMX *amx, cell *params) /* 7 param */
@ -4263,19 +4263,7 @@ static cell AMX_NATIVE_CALL is_user_hacking(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params)
{
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;
}
}
memset(get_amxaddr(amx, params[1]), params[2], params[3] * sizeof(cell));
return 1;
}

View File

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

View File

@ -904,7 +904,6 @@ 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)
@ -941,12 +940,7 @@ void C_ClientCommand(edict_t *pEntity)
if (ret & 1) RETURN_META(MRES_SUPERCEDE);
}
}
if (g_menucmds.GetWatchIter() != a)
{
a = g_menucmds.GetWatchIter();
} else {
++a;
}
++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 plugin_natives. This is dangerous!");
AMXXLOG_Log("An error occurred in plugins_native. This is dangerous!");
}
}

View File

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

View File

@ -343,16 +343,13 @@ 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)
{
@ -375,33 +372,23 @@ 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_display, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "\\r%d.\\w %s\n", ++option, pItem->name.c_str());
} else {
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", option_display, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "%d. %s\n", ++option, pItem->name.c_str());
}
} else {
if (m_AutoColors)
{
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", option_display, pItem->name.c_str());
_snprintf(buffer, sizeof(buffer)-1, "\\d%d. %s\n\\w", ++option, pItem->name.c_str());
} else {
_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
FN_META_DETACH();
return 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(void *pfile, char *szFmt, ...);
void FN_EngineFprintf(FILE *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
uint32 FN_FunctionFromName(const char *pName);
unsigned long FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(uint32);
const char *FN_NameForFunction(unsigned long function);
#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
int32 FN_RandomLong(int32 lLow, int32 lHigh);
long FN_RandomLong(long lLow, long 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(void *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
#endif // FN_PvAllocEntPrivateData_Post
#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
uint32 FN_FunctionFromName_Post(const char *pName);
unsigned long FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(uint32);
const char *FN_NameForFunction_Post(unsigned long function);
#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
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
long FN_RandomLong_Post(long lLow, long 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,3187
PRODUCTVERSION 1,7,6,3187
FILEVERSION 1,7,6,2
PRODUCTVERSION 1,7,6,2
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.76c"
VALUE "FileVersion", "1.76b"
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.76c"
VALUE "ProductVersion", "1.76b"
END
END
BLOCK "VarFileInfo"

View File

@ -244,14 +244,9 @@ void CPlayer::saveBDefused(){
// *****************************************************
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)))
{
bool ignoreBots (edict_t *pEnt, edict_t *pOther){
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","0"};
cvar_t init_csstats_rankbots ={"csstats_rankbots","1"};
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.76c"
#define MODULE_VERSION "1.76a"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "CSX"

View File

@ -1,5 +1,4 @@
#include <stdio.h>
#include <stdarg.h>
#if defined __linux__
#include <unistd.h>
#endif
@ -25,8 +24,8 @@ int Journal::Replay(VaultMap *pMap)
BinaryReader br(m_fp);
uint8_t len8;
uint16_t len16;
int8_t len8;
int16_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.76c"
#define MODULE_VERSION "1.76"
#define MODULE_AUTHOR "AMX Mod X Dev Team"
#define MODULE_URL "http://www.amxmodx.org/"
#define MODULE_LOGTAG "nVault"

View File

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

View File

@ -32,8 +32,8 @@
-M
-$M16384,1048576
-K$00400000
-LE"c:\program files\borland\delphi7\Projects\Bpl"
-LN"c:\program files\borland\delphi7\Projects\Bpl"
-LE"c:\programme\borland\delphi7\Projects\Bpl"
-LN"c:\programme\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=3
Build=1
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.3
FileVersion=1.4.3.1
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; Document: TDocument): String;
function AddExtension(eFilename, eHighlighter: String): String;
function ShowColorDialog(var Color: TColor; ePaintImage: TImage): Boolean;
@ -468,15 +468,11 @@ begin
Collection.Close(eDocument.Index, RemoveTab);
end;
function AddExtension(eFilename, eHighlighter: String; Document: TDocument): String;
function AddExtension(eFilename, eHighlighter: String): String;
begin
if ExtractFileExt(eFilename) = '' then begin
if eHighlighter = 'Pawn' then begin
if (ExtractFileExt(Document.Title) = '.inc') then
Result := eFilename + '.inc'
else
Result := eFilename + '.sma';
end;
if eHighlighter = 'Pawn' then
Result := eFilename + '.sma';
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'
TabOrder = 4
ModalResult = 1
TabOrder = 4
end
object cmdCancel: TFlatButton
Left = 334
@ -7388,8 +7388,8 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
ColorHighLight = 8623776
ColorShadow = 8623776
Caption = 'Cancel'
TabOrder = 5
ModalResult = 2
TabOrder = 5
end
object pnlText: TPanel
Left = 6
@ -7430,7 +7430,7 @@ object frmHudMsgGenerator: TfrmHudMsgGenerator
ColorFlat = clWhite
TabOrder = 1
Text = '12,0'
OnExit = txtTimeToShowExit
OnChange = txtTimeToShowChange
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 := FloatToStrF(lblHudMsg.Left / pnlHudmessage.Width, ffFixed, -2, 2);
txtXPos.Text := FloatToStr(RoundTo(lblHudMsg.Left / pnlHudmessage.Width, -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 := FloatToStrF(lblHudMsg.Top / pnlHudmessage.Height, ffFixed, -2, 2);
txtYPos.Text := FloatToStr(RoundTo(lblHudMsg.Top / pnlHudmessage.Height, -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,6 +210,20 @@ 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
@ -262,16 +276,4 @@ 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,6 +4544,7 @@ object frmMain: TfrmMain
TabOrder = 1
OnClick = cmdCancelClick
CaptionGlowColor = clBtnFace
DropDownArrow = True
LinkFont.Charset = DEFAULT_CHARSET
LinkFont.Color = clBlue
LinkFont.Height = -11
@ -6568,7 +6569,6 @@ 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);
ActiveDoc.FileName := AddExtension(sdSave.FileName, ActiveDoc.Highlighter);
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]));
TDocument(Collection.Items[b]).FileName := AddExtension(sdSave.FileName, TDocument(Collection.Items[b]).Highlighter);
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);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
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);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
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);
eItem.FileName := AddExtension(frmMain.sdSave.FileName, eItem.Highlighter);
eItem.Save;
end
else begin
@ -1706,7 +1706,6 @@ 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;
@ -2232,7 +2231,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, 29, 99, buf, 13)');
sciEditor.Lines.Add(#9 + #9 + 'count = ExplodeString(lines, 50, 119, buf, 13)');
sciEditor.Lines.Add(#9 + #9 + 'for(new i=0;i<count;i++) {');
sciEditor.Lines.Add(#9 + #9 + #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.76c
release = amxmodx-1.76

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.76c
release = amxmodx-1.76b

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.76c"
!define PRODUCT_VERSION "1.76b"
!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,27 +149,38 @@ 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"
@ -318,8 +329,10 @@ 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"
@ -572,8 +585,10 @@ 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"
@ -714,26 +729,37 @@ 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, Dialogs, JclFileUtils;
TlHelp32, IdFTPCommon, ComCtrls, JclFileUtils, Dialogs;
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,13 +614,11 @@ begin
ePath := '/';
CurNode := frmMain.trvDirectories.Selected;
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
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 = 230
Top = 254
Width = 244
Height = 13
Caption = '4. Connect to server and select the mod directory:'
end
object lblStep4: TLabel
Left = 44
Top = 188
Top = 214
Width = 117
Height = 13
Caption = '3. Select a game addon:'
@ -6122,7 +6122,7 @@ object frmMain: TfrmMain
end
object lblStep5: TLabel
Left = 44
Top = 334
Top = 358
Width = 64
Height = 13
Caption = '5. Click Next.'
@ -6312,7 +6312,7 @@ object frmMain: TfrmMain
end
object cmdConnect: TFlatButton
Left = 416
Top = 247
Top = 269
Width = 71
Height = 20
ColorFocused = 16245198
@ -6326,34 +6326,30 @@ object frmMain: TfrmMain
end
object pnlDirectory: TPanel
Left = 44
Top = 246
Top = 270
Width = 367
Height = 83
BevelOuter = bvLowered
TabOrder = 2
DesignSize = (
367
83)
object trvDirectories: TTreeView
Left = 1
Top = 1
Width = 365
Height = 81
Anchors = [akLeft, akTop, akRight, akBottom]
Align = alClient
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 = 204
Top = 230
Width = 443
Height = 21
Style = csDropDownList
@ -6376,9 +6372,27 @@ object frmMain: TfrmMain
Left = 44
Top = 158
Width = 441
Height = 25
Height = 50
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
@ -6403,7 +6417,6 @@ object frmMain: TfrmMain
Width = 82
Height = 14
Caption = 'Linux (64-bit)'
Enabled = False
TabOrder = 2
end
end
@ -6756,7 +6769,6 @@ object frmMain: TfrmMain
object IdFTP: TIdFTP
Intercept = IdLogFile
MaxLineAction = maException
ReadTimeout = 0
RecvBufferSize = 1024
SendBufferSize = 1024
OnWork = IdFTPWork

View File

@ -108,9 +108,10 @@ 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);
@ -122,6 +123,7 @@ 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);
@ -135,8 +137,6 @@ 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.76c';
const VERSION = '1.76b';
implementation
@ -214,13 +214,11 @@ begin
eStr := TStringList.Create;
ePath := '/';
CurNode := trvDirectories.Selected;
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
try
IdFTP.ChangeDir(ePath);
except
@ -238,7 +236,6 @@ 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
@ -249,7 +246,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');
@ -280,10 +277,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;
@ -579,7 +576,7 @@ begin
end;
end
else if frbFTP.Checked then begin // FTP
frmMain.Height := 421;
frmMain.Height := 445;
jspFTP.Show;
end;
end;
@ -642,7 +639,6 @@ begin
cmdConnect.Enabled := True;
cmdConnect.Caption := 'Disconnect';
cmdCancel.Caption := '&Close';
cmdNext.Enabled := True;
CurNode := nil;
if eStr.Count <> 0 then begin
@ -820,12 +816,10 @@ begin
// get complete path
ePath := '/';
CurNode := Node;
if (Assigned(CurNode)) then begin
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
end;
repeat
ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent;
until (not Assigned(CurNode));
// change dir and add directories in it
try
Repaint;
@ -844,6 +838,11 @@ 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;
@ -937,15 +936,4 @@ 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 ((g_aNum < MAX_ADMINS) && (SQL_MoreResults(query)))
while (SQL_MoreResults(query))
{
SQL_ReadResult(query, qcolAuth, g_aName[g_aNum], 31)
SQL_ReadResult(query, qcolPass, g_aPassword[g_aNum], 31)

View File

@ -45,20 +45,8 @@ new g_Modified
new g_blockPos[112]
new g_saveFile[64]
new g_Restricted[] = "* This item is restricted *"
new g_szWeapRestr[27] = "00000000000000000000000000"
new g_szWeapRestr[27] = "0000000000000000000000000"
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][] =
{
@ -307,19 +295,6 @@ 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
@ -630,30 +605,7 @@ 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
@ -679,9 +631,7 @@ 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
}
@ -691,18 +641,9 @@ 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 (pos < 0 || pos >= 112)
{
return PLUGIN_CONTINUE
}
if (g_blockPos[pos])
if (g_blockPos[(menu * 8 + key) + (get_user_team(id) - 1) * 56])
{
engclient_cmd(id, "menuselect", "10")
client_print(id, print_center, "%s", g_Restricted)
@ -858,70 +799,6 @@ 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")
@ -934,12 +811,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(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(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(-28, 511, "menuBuy")
register_menucmd(-29, 511, "menuPistol")
register_menucmd(-30, 511, "menuShotgun")
@ -951,8 +828,6 @@ 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 weapon status (say_team)")
register_clcmd("say /report", "cmdReport", 0, "- display waepon status (say_team)")
register_clcmd("say /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
register_clcmd("say /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 weapon status (say_team_team)")
register_clcmd("say_team /report", "cmdReport", 0, "- display waepon status (say_team_team)")
register_clcmd("say_team /top15", "cmdTop15", 0, "- display top 15 players (MOTD)")
register_clcmd("say_team /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,8 +758,6 @@ 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.763
#define AMXX_VERSION 1.762
#define AMXX_VERSION_NUM 176
stock const AMXX_VERSION_STR[]="1.76c"
stock const AMXX_VERSION_STR[]="1.76b"
#define M_PI 3.1415926535

View File

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

View File

@ -473,19 +473,13 @@ 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.
* Returns the command ID.
*/
/* Registers function which will be called from client console. */
native register_clcmd(const client_cmd[],const function[],flags=-1, info[]="");
/* Registers function which will be called from any console.
* Returns the command ID.
*/
/* Registers function which will be called from any console. */
native register_concmd(const cmd[],const function[],flags=-1, info[]="");
/* Registers function which will be called from server console.
* Returns the command ID.
*/
/* Registers function which will be called from server console. */
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, 11)
SQL_GetAffinity(get_type, 12)
if (!equali(get_type, set_type))
{

View File

@ -88,10 +88,8 @@ 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]
&& g_voteCount[SELECTMAPS] > g_voteCount[SELECTMAPS+1])
if (g_voteCount[SELECTMAPS] > g_voteCount[b])
{
new mapname[32]
@ -105,10 +103,8 @@ 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_VOTE, "- displays votemap menu")
register_clcmd("amx_votemapmenu", "cmdVoteMapMenu", ADMIN_MAP, "- displays votemap menu")
register_menucmd(register_menuid("Changelevel Menu"), 1023, "actionMapsMenu")
register_menucmd(register_menuid("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_VOTE, "Maps Menu")
AddMenuLang("VOTE_MAPS", "amx_votemapmenu", ADMIN_MAP, "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_CFG, "Teleport Menu")
AddMenuLang("TELE_PLAYER", "amx_teleportmenu", ADMIN_LEVEL_A, "Teleport Menu")
}
public actionMenu(id, key)

View File

@ -42,7 +42,6 @@ new g_ReadyRoomAck[12];
new g_AutoAssignAck[12];
new g_StopCommAck[12];
enum {
PLAYERCLASS_NONE = 0,
PLAYERCLASS_ALIVE_MARINE,
@ -73,10 +72,6 @@ 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
@ -108,19 +103,6 @@ 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")
}
@ -130,8 +112,8 @@ public msgScoreInfo() {
// just incase..
return;
}
g_Class[id]=read_data(g_ScoreInfo_Class);
g_Team[id]=read_data(g_ScoreInfo_Team);
g_Class[id]=read_data(5);
g_Team[id]=read_data(7);
}
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 management")
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")
#if defined DIRECT_ONOFF
register_concmd("amx_off", "cmdOFF", ADMIN_CFG, "- pauses some plugins")
@ -144,6 +144,11 @@ 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,7 +7,6 @@ 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)
@ -90,39 +89,4 @@ 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
}
}