alliedmodders / amxmodx Goto Github PK
View Code? Open in Web Editor NEWAMX Mod X - Half-Life 1 Scripting and Administration
Home Page: http://www.amxmodx.org/
AMX Mod X - Half-Life 1 Scripting and Administration
Home Page: http://www.amxmodx.org/
Since I put the latest version on amxmodx, I get these bugs on every plugin with reasons "Plugin called menu_display when item=MENU_EXIT".
L 10/20/2018 - 01:16:29: [mapmanager.amxx] StartVote: timeleft 111
L 10/20/2018 - 01:16:34: Plugin called menu_display when item=MENU_EXIT
L 10/20/2018 - 01:16:34: [AMXX] Displaying debug trace (plugin "mapmanager.amxx", version "2.5.61")
L 10/20/2018 - 01:16:34: [AMXX] Run time error 10: native error (native "show_menu")
L 10/20/2018 - 01:16:34: [AMXX] [0] mapmanager.sma::VoteMenu (line 1664)
L 10/20/2018 - 01:16:34: [AMXX] [1] mapmanager.sma::ShowVoteMenu (line 1579)
L 10/20/2018 - 01:16:34: [AMXX] [2] mapmanager.sma::ShowTimer (line 1544)
L 10/20/2018 - 01:16:49: Plugin called menu_display when item=MENU_EXIT
L 10/20/2018 - 01:16:49: [AMXX] Displaying debug trace (plugin "mapmanager.amxx", version "2.5.61")
L 10/20/2018 - 01:16:49: [AMXX] Run time error 10: native error (native "show_menu")
L 10/20/2018 - 01:16:49: [AMXX] [0] mapmanager.sma::Task_Timer (line 1590)
The following variables in data/lang/admincmd.txt
is not showing up in the cstrike game chat;
ADMIN_MAP_1 = ADMIN: changelevel %s
ADMIN_MAP_2 = ADMIN %s: changelevel %s
I have also tried changing the text to my own in the newest and previous versions of AMX MOD X but the variable value just stays the same as the default one. Maybe I missed something or something is wrong with my server files.
I'm currently running ReHLDS;
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 10:46:45 Sep 19 2018 (1621)
An option to remove specific weapons from a player is highly needed, as well as to remove all weapons from a slot. The closest we have right now is using strip_user_weapons
which removes all weapons. This native can either be upgraded to hold a weapon slot or a enitrely new one can be added. Making a plugin that needs to remove specific weapons is really a problem nowadays because the only known way to do it in regular AMXX is by using the stripweapons.inc library which for some reason fails to work when the server is using ReAPI/ReGameDLL.
amxx version
AMX Mod X 1.9.0.5216 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Sep 10 2018 16:28:34
Built from: https://github.com/alliedmodders/amxmodx/commit/91f36f23
Build ID: 5216:91f36f23
Core mode: JIT+ASM32
meta version
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
I have a suggestion for creating static menus.
We may use the 3rd argument of an native menu_create. And when we use .ml = true
- menu should use title names as ML Keys. Simple code example below.
#include <amxmodx>
new g_hMenu;
new g_hMenuCB;
public plugin_init()
{
register_plugin("Static menu ML tests", "0.0.1", "wopox1337");
register_dictionary("static_menu_test.txt");
Build_StaticMenu();
register_clcmd("radio1", "CMD_MenuTest");
// register_clcmd("say /MenuTest", "CMD_MenuTest");
}
Build_StaticMenu()
{
g_hMenu = menu_create("MENU_NAME", "MenuHandler_1", .ml = true); // ml parameter not used now.
g_hMenuCB = menu_makecallback("MenuCallback");
/*
* This is way how i want to create items & menus. And ML at this moment don't works.
*/
menu_additem(g_hMenu, "ITEM_0", .callback = g_hMenuCB);
menu_additem(g_hMenu, "ITEM_1", .callback = g_hMenuCB);
menu_additem(g_hMenu, "ITEM_2", .callback = g_hMenuCB);
menu_additem(g_hMenu, "ITEM_3", .callback = g_hMenuCB);
menu_additem(g_hMenu, "ITEM_4", .callback = g_hMenuCB);
}
public MenuCallback(id, menu, item)
{
new name[32], _dummy[1];
menu_item_getinfo(menu, item, _dummy[0], _dummy, charsmax(_dummy), name, charsmax(name), _dummy[0]);
/** This is wrong way to dinamicly set item name cuz name
* will be re-setted each time & ML Key willn't found.
*/
// menu_item_setname(menu, item, fmt("%l", name));
}
public MenuHandler_1(id, menu, item)
{
// server_print("-> MenuHandler_1(%i, %i, %i)", id, menu, item);
}
public CMD_MenuTest(id)
{
menu_display(id, g_hMenu);
return PLUGIN_HANDLED;
}
Not needed now.
Inside json.inc, the description of the function below contains parameters that can't be found on the function signature itself:
amxmodx/plugins/include/json.inc
Line 603 in 8d1f924
/**
* Gets a value at the specified position from the object.
*
* @note Needs to be freed using json_free() native.
*
* @param object Object handle
* @param index Position from which get key name
* @param buffer Buffer to copy string to
* @param maxlen Maximum size of the buffer
*
* @return The number of cells written to the buffer
* @error If passed handle is not a valid object
*/
native JSON:json_object_get_value_at(const JSON:object, index);
(Sorry, for google translator.)
The plugin does not connect to the database with the module MySQL 1.9.0.5229 AMX Mod X Dev Team. Server MySQL database: 5.5.52-0+deb7u1.
[acp_core.amxx] SQL ошибка: не удалось подключиться - 'Can't connect to MySQL server on '83.220.173.151' (4)'.
Plugin works in case:
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: dreamstalker/rehlds@89be216
ReGameDLL version: 5.7.0.313-dev
Build date: 08:39:22 Sep 9 2018
Build from: s1lentq/ReGameDLL_CS@e924a26
AMX Mod X 1.9.0.5229 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Sep 28 2018 08:24:09
Built from: a0ea98d
meta version
Metamod-r v1.3.0.127, API (5:13)
Metamod-r build: 10:49:17 Jun 15 2018
Metamod-r from: theAsmodai/metamod-r@0fff979
Currently loaded plugins:
name version author file status
[ 1] ScreenMaker 1.1 neygomon screen_maker.am running
[ 2] ACP Core 0.4 Evo acp_core.amxx running
[ 3] Winter Environment 1.0 Alka summer.amxx running
[ 4] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 5] CSGO DEATH CAM 1.0 Sugisaki csgo_death_cam. running
[ 6] ColorChat 0.1.0 ConnorMcLeod colorchat.amxx running
[ 7] Admin Chat 1.9.0.5229 AMXX Dev Team adminchat.amxx running
[ 8] Admin Commands 1.9.0.5229 AMXX Dev Team admincmd.amxx running
[ 9] Commands Menu 1.9.0.5229 AMXX Dev Team cmdmenu.amxx running
[ 10] Reconnect Features 0.3.1 ConnorMcLeod reconnect_featu running
[ 11] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 12] [ReAPI] C4 Drop 0.9 a2 & F@nt0M c4_drop_0_7.amx running
[ 13] informer 1.0 UFPS.Team informer.amxx running
[ 14] Menus Front-End 1.9.0.5229 AMXX Dev Team menufront.amxx running
[ 15] Grenade Mine 0.0.2 Vaqtincha grenade_mine.am running
[ 16] Maps Menu 1.9.0.5229 AMXX Dev Team mapsmenu.amxx running
[ 17] NextMap 1.9.0.5229 AMXX Dev Team nextmap.amxx running
[ 18] Nextmap Chooser 1.9.0.5229 AMXX Dev Team mapchooser.amxx running
[ 19] Players Menu 1.9.0.5229 AMXX Dev Team plmenu.amxx running
[ 20] Plugin Menu 1.9.0.5229 AMXX Dev Team pluginmenu.amxx running
[ 21] Restrict Weapons 1.9.0.5219 AMXX Dev Team restmenu.amxx running
[ 22] TimeLeft 1.9.0.5229 AMXX Dev Team timeleft.amxx running
[ 23] Scrolling Message 1.9.0.5229 AMXX Dev Team scrollmsg.amxx running
[ 24] Admin Votes 1.9.0.5229 AMXX Dev Team adminvote.amxx running
[ 25] CS Misc. Stats 1.9.0.5219 AMXX Dev Team miscstats.amxx running
[ 26] CS Stats Logging 1.9.0.5219 AMXX Dev Team stats_logging.a running
[ 27] Stats Configuration 1.9.0.5229 AMXX Dev Team statscfg.amxx running
[ 28] Warnings 0.0.3 beta Subb98 warnings_ban_co running
[ 29] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 30] Weapon Restrict 2.1 s1lent & neugomo weaponrest.amxx running
[ 31] [ReAPI] Random Weapons 2.4.6 neugomon random_weapons_ running
[ 32] Team Custom Skin 0.0.1 Vaqtincha team_custom_ski running
[ 33] Team Custom Skin 0.0.1 Vaqtincha team_custom_ski running
[ 34] Team Custom Skin 0.0.1 Vaqtincha team_custom_ski running
[ 35] UFPS VoteBan 1.7 UFPS.Team voteban.amxx running
[ 36] Pause Plugins 1.9.0.5229 AMXX Dev Team pausecfg.amxx running
[ 37] [ReAPI] Flasher Punish 0.0.2b Vaqtincha reapi_flasher_p running
[ 38] Descriptive 'Fire in t 1.2 VEN/UFPS.Team[ML descriptive.amx running
[ 39] UFPS Advert Chat 1.2 UFPS.Team adv_chat.amxx running
[ 40] C4 Timer 1.5 cheap_suit c4timer.amxx running
[ 41] Reset Score 1.5 UFPS.Team rs.amxx running
[ 42] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 43] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 44] Connect IP Client 1.2 hunter connect_ip_clie running
[ 45] Informer DHUD 2.0 UFPS.Team DHUD.amxx running
[ 46] Steam Bonus 1.1 ill+F@nToM steam_bonus_my_ paused
[ 47] Noob Bonus System 0.1a Subb98 noob_bonus_syst running
[ 48] Parachute [ReAPI] 2.0 Leo_[BH] parachute_re.am running
[ 49] Best Player 2.2.9 DUKKHAZ0R | Jack best_player.amx running
[ 50] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off_14.amxx paused
[ 51] Private Chat 0.3 QooQa & Denzer pm.amxx running
[ 52] SF Bets 0.1.5 serfreeman1337 sf_bets.amxx running
[ 53] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 54] Smoke: HealthNade 0.0.4 wopox1337 Smoke_HealthNad running
[ 55] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 56] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 57] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 58] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 59] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 60] AES: Bonus CSTRIKE 0.5.9 [REA serfreeman1337/s aes_bonus_cstri running
[ 61] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
61 plugins, 59 running
Currently loaded modules:
name version author status
[ 1] ReAimDetector 0.2.2 ReHLDS Team running
[ 2] FakeMeta 1.9.0.5229 AMX Mod X Dev Team running
[ 3] MySQL 1.9.0.5229 AMX Mod X Dev Team running
[ 4] Engine 1.9.0.5229 AMX Mod X Dev Team running
[ 5] Ham Sandwich 1.9.0.5229 AMX Mod X Dev Team running
[ 6] ReAPI 5.6.0.160- Asmodai & s1lent running
[ 7] CSX 1.9.0.5219 AMX Mod X Dev Team running
[ 8] CStrike 1.9.0.5219 AMX Mod X Dev Team running
[ 9] nVault 1.9.0.5229 AMX Mod X Dev Team running
[10] Fun 1.9.0.5229 AMX Mod X Dev Team running
[11] GeoIP 1.9.0.5229 AMX Mod X Dev Team running
[12] RegEx 1.9.0.5229 AMX Mod X Dev Team running
12 modules, 12 correct
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx.so v1.9.0.5229 ini ANY
[ 2] LocalizeBug Fix RUN - localizebugfix.so v2.4 ini Start Never
[ 3] VoiceTranscoder RUN - vtc.so v2017RC3 ini ANY
[ 4] Reunion RUN - reunion.so v0.1.0.133 ini Start Never
[ 5] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[ 6] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5229 pl1 ANY
[ 7] MySQL RUN - mysql_amxx_i386.so v1.9.0.5229 pl1 ANY
[ 8] Engine RUN - engine_amxx_i386.so v1.9.0.5229 pl1 ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5229 pl1 ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.6.0.160-dev pl1 ANY Never
[11] CSX RUN - csx_amxx_i386.so v1.9.0.5219 pl1 ANY
[12] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5219 pl1 ANY
[13] Fun RUN - fun_amxx_i386.so v1.9.0.5229 pl1 ANY
[14] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5229 pl1 ANY
14 plugins, 14 running
Plugin:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < regex >
#include < sqlx >
#define SQL_QUERY_DELAYED
#define column(%1) SQL_FieldNameToNum(query, %1)
#define EncodeText(%1) engfunc( EngFunc_AllocString, %1 )
#define DecodeText(%1,%2,%3) global_get( glb_pStringBase, %1, %2, %3 )
#define REGEX_IP_PATTERN "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"
#define REGEX_STEAMID_PATTERN_LEGAL "^^STEAM_0:(0|1):\d{4,8}$"
#define REGEX_STEAMID_PATTERN_ALL "^^(STEAM|VALVE)_(0|1|2|3|4|5|6|7|8|9):(0|1|2|3|4|5|6|7|8|9):\d+$"
new Regex:g_IP_pattern
new Regex:g_rgxRes, g_regex_return
new Regex:g_SteamID_pattern
#define IsValidIP(%1) ( regex_match_c( %1, g_IP_pattern, g_regex_return ) > 0 )
#define IsValidAuthid(%1) ( regex_match_c( %1, g_SteamID_pattern, g_regex_return ) > 0 )
new const blocked_action_list[ 2 ][ ] =
{
"whitelist",
"renamelist"
}
new const g_name[ ] = "name"
enum _:AuthType
{
AUTH_NAME = 1,
AUTH_IP,
AUTH_STEAM
}
enum _:PlayersList
{
UID,
Upoints,
Uapproved[ 4 ],
Uaccess[ 128 ],
Uname[ 44 ],
Usteam[ 35 ],
Uip[ 33 ],
Upass[ 33 ]
}
enum PlayerData
{
PL_id,
PL_auth,
PL_points,
PL_name[ 44 ],
PL_steam[ 35 ],
PL_ip[ 33 ],
PL_key
}
new g_name_change[ ] = "#Cstrike_Name_Change"
new g_Player_Data[ 33 ][ PlayerData ]
new g_serverID, g_accounts_load = true;
new g_cmdNickReserv[ 16 ]
new g_cmdNickInactive[ 16 ]
new g_serverip[ 22 ]
new g_Cache[ 555 ]
new error[ 128 ]
new Sql_Initialized
new End_Plugin_Forward
new g_sqlLoadPatterns
new g_msgid_saytext
new bool:g_bSqlInitialized
new Handle:info
new Handle:sql
new Array:g_apData
new Trie:g_tpType[ AuthType ]
new Trie:g_tbAction
new Trie:allNames
// Some Vars
new amx_mode, amx_password_field, amx_default_access
new pcvar_steam_validated, pcvar_sensivity, pcvar_reserv
new pcvar_announce, pcvar_savelogs, pcvar_changenick, pcvar_user_immunity, pcvar_default_nick
new pcvar_serverip, pcvar_sql_host, pcvar_sql_user, pcvar_sql_pass, pcvar_sql_db
public plugin_natives( )
{
register_library( "acp" ) // register module
register_native( "acp_player_auth", "native_player_auth", 1 )
register_native( "acp_player_dbid", "native_player_dbid", 1 )
register_native( "acp_player_points", "native_player_points", 1 )
register_native( "acp_server_id", "native_server_id", 1 )
register_native( "acp_take_points", "native_take_points", 1 )
register_native( "acp_give_points", "native_give_points", 1 )
}
public plugin_init( )
{
register_plugin( "ACP Core", "0.4", "Evo" )
register_dictionary( "common.txt" )
register_dictionary( "acp_core.txt" )
register_cvar( "amx_vote_ratio", "0.02" )
register_cvar( "amx_vote_time", "10" )
register_cvar( "amx_vote_answers", "1" )
register_cvar( "amx_vote_delay", "60" )
register_cvar( "amx_last_voting", "0" )
register_cvar( "amx_show_activity", "2", FCVAR_PROTECTED )
register_cvar( "amx_votekick_ratio", "0.40" )
register_cvar( "amx_voteban_ratio", "0.40" )
register_cvar( "amx_votemap_ratio", "0.40" )
set_cvar_float( "amx_last_voting", 0.0 )
amx_mode = register_cvar( "amx_mode", "1", FCVAR_PROTECTED )
amx_password_field = register_cvar( "amx_password_field", "_pw", FCVAR_PROTECTED )
amx_default_access = register_cvar( "amx_default_access", "", FCVAR_PROTECTED )
pcvar_steam_validated = register_cvar( "amx_steam_validated", "0" )
pcvar_user_immunity = register_cvar( "amx_user_immunity", "a" )
pcvar_announce = register_cvar( "amx_announce", "1" )
pcvar_savelogs = register_cvar( "amx_savelogs", "1" )
pcvar_sensivity = register_cvar( "amx_case_sensivity", "0" )
pcvar_reserv = register_cvar( "amx_nick_reserv", "0" )
pcvar_changenick = register_cvar( "amx_changenick", "1" )
pcvar_default_nick = register_cvar( "amx_default_nick", "CHANGE NICKNAME", FCVAR_PROTECTED )
pcvar_serverip = register_cvar( "amx_serverip", "", FCVAR_PROTECTED )
pcvar_sql_host = register_cvar( "acp_sql_host", "127.0.0.1", FCVAR_PROTECTED )
pcvar_sql_user = register_cvar( "acp_sql_user", "acp", FCVAR_PROTECTED )
pcvar_sql_pass = register_cvar( "acp_sql_pass", "acp", FCVAR_PROTECTED )
pcvar_sql_db = register_cvar( "acp_sql_db", "acp", FCVAR_PROTECTED )
register_concmd( "amx_reloadadmins", "cmdReload", ADMIN_IMMUNITY, "- reload account and pattern list." )
format( g_cmdNickReserv, 15, "amxauth%c%c%c%c", random_num( 'A', 'Z' ), random_num( 'A', 'Z' ), random_num( 'A', 'Z' ), random_num( 'A', 'Z' ) )
format( g_cmdNickInactive, 15, "amxauth%c%c%c%c", random_num( 'A', 'Z' ), random_num( 'A', 'Z' ), random_num( 'A', 'Z' ), random_num( 'A', 'Z' ) )
register_clcmd( g_cmdNickReserv, "ackSignalReserv" )
register_clcmd( g_cmdNickInactive, "ackSignalInactive" )
register_forward( FM_ClientUserInfoChanged, "forward_client_userinfochanged" )
g_msgid_saytext = get_user_msgid( "SayText" )
remove_user_flags( 0, read_flags( "z" ) )
}
public plugin_cfg( )
{
new configsDir[ 64 ]
get_configsdir( configsDir, 63 )
server_cmd( "exec %s/acp/sql.cfg", configsDir )
server_cmd( "exec %s/acp/general.cfg", configsDir )
for( new ib = 1; ib < AuthType; ib++ )
{
g_tpType[ ib ] = TrieCreate( )
g_tbAction = TrieCreate( )
}
g_apData = ArrayCreate( PlayersList )
allNames = TrieCreate( )
new regerror[ 2 ]
g_IP_pattern = regex_compile( REGEX_IP_PATTERN, g_regex_return, regerror, sizeof( regerror ) - 1 )
if( get_pcvar_num( pcvar_steam_validated ) )
{
g_SteamID_pattern = regex_compile( REGEX_STEAMID_PATTERN_LEGAL, g_regex_return, regerror, sizeof( regerror ) - 1 )
}
else
{
g_SteamID_pattern = regex_compile( REGEX_STEAMID_PATTERN_ALL, g_regex_return, regerror, sizeof( regerror ) - 1 )
}
Sql_Initialized = CreateMultiForward( "acp_sql_initialized", ET_IGNORE, FP_CELL )
End_Plugin_Forward = CreateMultiForward( "acp_endmap_func", ET_IGNORE )
set_task( 0.1, "sql_init" )
}
public plugin_end( )
{
for( new ib = 1; ib < AuthType; ib++ )
{
TrieDestroy( g_tpType[ ib ] )
TrieDestroy( g_tbAction )
}
ArrayDestroy( g_apData )
new ret
ExecuteForward( End_Plugin_Forward, ret )
if( info != Empty_Handle ) // fix bug in connect
{
set_task( 0.5, "plugin_sql_handle" )
}
}
public plugin_sql_handle( )
{
SQL_FreeHandle( info )
}
public sql_init( )
{
new host[ 64 ], user[ 64 ], pass[ 64 ], dbname[ 64 ]
get_pcvar_string( pcvar_sql_host, host, 31 )
get_pcvar_string( pcvar_sql_user, user, 31 )
get_pcvar_string( pcvar_sql_pass, pass, 31 )
get_pcvar_string( pcvar_sql_db, dbname, 31 )
info = SQL_MakeDbTuple( host, user, pass, dbname )
GetServerID( )
ServerInitialized( )
}
public ServerInitialized( )
{
get_pcvar_string( pcvar_serverip, g_serverip, 21 )
if( !strlen( g_serverip ) )
{
get_user_ip( 0, g_serverip, 21 )
}
new errno, query[ 512 ]
if( info )
{
sql = SQL_Connect( info, errno, error, 127 )
}
if( sql == Empty_Handle )
{
g_sqlLoadPatterns = true;
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_CON", error )
}
else
{
formatex( query, 511, "SELECT `id` FROM `acp_servers` WHERE ( address = '%s' ) LIMIT 1", g_serverip )
SQL_FreeHandle( sql )
SQL_ThreadQuery( info, "ServerInitialized_Post", query )
}
}
public ServerInitialized_Post( FailState, Handle:query, error[ ], errcode, Data[ ], DataSize )
{
if( FailState != TQUERY_SUCCESS )
{
g_sqlLoadPatterns = true;
log_amx( "SQL Error #%d - %s", errcode, error )
}
else if( !SQL_NumResults( query ) )
{
new servername[ 100 ], query_insert[ 512 ]
get_cvar_string( "hostname", servername, 99 )
formatex( query_insert, 511, "INSERT INTO `acp_servers` ( `address`, `hostname` ) VALUES ( '%s','%s' )", g_serverip, servername )
SQL_ThreadQuery( info, "QueryHandle", query_insert )
}
else
{
LoadPatterns( )
}
}
public GetServerID( )
{
for( new ib = 1; ib < AuthType; ib++ )
{
TrieClear( g_tpType[ ib ] )
}
new errno
ArrayClear( g_apData )
if( info )
{
sql = SQL_Connect( info, errno, error, 127 )
}
if( sql == Empty_Handle )
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_CON", error )
}
else
{
new temp_srvip[ 32 ]
get_pcvar_string( pcvar_serverip, temp_srvip, 31 )
if( !strlen( temp_srvip ) )
{
get_user_ip( 0, temp_srvip, 31 )
}
formatex( g_Cache, 554, "SELECT `id`, `opt_accounts` FROM `acp_servers` WHERE ( address = '%s' ) LIMIT 1", temp_srvip )
#if !defined SQL_QUERY_DELAYED
new Handle:query = SQL_PrepareQuery( sql, g_Cache )
if( !SQL_Execute( query ) )
{
#else
SQL_FreeHandle( sql )
SQL_ThreadQuery( info, "GetServerID_Post", g_Cache )
}
}
public GetServerID_Post( FailState, Handle:query, error[ ], errcode, Data[ ], DataSize )
{
if( FailState != TQUERY_SUCCESS )
{
#endif
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_LOAD_SERVERS", error )
}
else if( !SQL_NumResults( query ) )
{
log_amx( "%L", LANG_SERVER, "ADMIN_NO_SERVERINFO" )
}
else
{
g_serverID = SQL_ReadResult( query, 0 )
if( SQL_ReadResult( query, 1 ) != 1 )
{
g_accounts_load = false;
}
log_amx( "LOAD SERVER INFO - ID: %i | ACCOUNTS: %s", g_serverID, ( g_accounts_load ) ? "YES" : "NO" )
}
#if !defined SQL_QUERY_DELAYED
SQL_FreeHandle( query )
#endif
LoadPlayersList( )
#if !defined SQL_QUERY_DELAYED
SQL_FreeHandle( sql )
}
#endif
}
public LoadPlayersList( )
{
if( g_serverID )
{
if( !g_accounts_load )
{
log_amx( "%L", LANG_SERVER, "ADMIN_AUTH_DISABLED" )
}
else
{
if( g_bSqlInitialized )
{
new errno
if( info )
{
sql = SQL_Connect( info, errno, error, 127 )
}
if( sql == Empty_Handle )
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_CON", error )
return PLUGIN_HANDLED;
}
#if defined SQL_QUERY_DELAYED
SQL_FreeHandle( sql )
#endif
}
new len, timestamp = get_systime( 0 )
len = format( g_Cache, charsmax( g_Cache ), "SELECT pl.userid, pl.player_nick, pl.password, \
pl.points, pl.player_ip, pl.steamid, pl.flag," )
len += format( g_Cache[ len ], charsmax( g_Cache ) - len, " GROUP_CONCAT(m.access_flags SEPARATOR '') AS access, pl.approved FROM `acp_players` pl \
LEFT JOIN `acp_access_mask_players` m_pl ON m_pl.userid = pl.userid" )
len += format( g_Cache[ len ], charsmax( g_Cache ) - len, " LEFT JOIN `acp_access_mask` m ON m.mask_id = m_pl.mask_id \
LEFT JOIN `acp_access_mask_servers` m_srv ON m_srv.mask_id = m_pl.mask_id" )
len += format( g_Cache[ len ], charsmax( g_Cache ) - len, " WHERE (m_srv.server_id = %d OR m_srv.server_id = 0) AND (m_pl.access_expired > %d OR m_pl.access_expired = 0) \
GROUP BY pl.userid", g_serverID, timestamp )
#if !defined SQL_QUERY_DELAYED
new Handle:query = SQL_PrepareQuery( sql, g_Cache )
if( !SQL_Execute( query ) )
{
#else
SQL_ThreadQuery( info, "LoadPlayersList_Post", g_Cache )
}
}
else
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_LOAD_SERVERS", error )
}
return PLUGIN_CONTINUE;
}
public LoadPlayersList_Post( FailState, Handle:query, error[ ], errcode, Data[ ], DataSize )
{
if( FailState != TQUERY_SUCCESS )
{
#endif
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_LOAD_PLAYERS", error )
}
else if( !SQL_NumResults( query ) )
{
log_amx( "%L", LANG_SERVER, "ADMIN_NO_PLAYERS" )
}
else
{
new playersCount
new qcolUID = column( "userid" )
new qcolUname = column( "player_nick" )
new qcolUpass = column( "password" )
new qcolUaccess = column( "access" )
new qcolUflag = column( "flag" )
new qcolUsteam = column( "steamid" )
new qcolUip = column( "player_ip" )
new qcolUpoints = column( "points" )
new qcolUapproved = column( "approved" )
new data[ PlayersList ], Uflag, iPos
while( SQL_MoreResults( query ) )
{
data[ UID ] = SQL_ReadResult( query, qcolUID )
data[ Upoints ] = SQL_ReadResult( query, qcolUpoints )
SQL_ReadResult( query, qcolUapproved, data[ Uapproved ], sizeof( data[ Uapproved ] ) - 1 )
SQL_ReadResult( query, qcolUname, data[ Uname ], sizeof( data[ Uname ] ) - 1 )
SQL_ReadResult( query, qcolUpass, data[ Upass ], sizeof( data[ Upass ] ) - 1 )
SQL_ReadResult( query, qcolUaccess, data[ Uaccess ], sizeof( data[ Uaccess ] ) - 1 )
delete_duplicate(data[ Uaccess], sizeof( data[ Uaccess ] ) - 1 )
SQL_ReadResult( query, qcolUsteam, data[ Usteam], sizeof( data[ Usteam ] ) - 1 )
SQL_ReadResult( query, qcolUip, data[ Uip ], sizeof( data[ Uip ] ) - 1 )
Uflag = SQL_ReadResult( query, qcolUflag )
if( !get_pcvar_num( pcvar_sensivity ) )
{
strtolower( data[ Uname ] )
}
if( get_pcvar_num( pcvar_reserv ) )
{
if( data[ Uname ][ 0 ] )
{
TrieSetCell( allNames, data[ Uname ], iPos )
}
}
switch( Uflag )
{
case AUTH_NAME:
{
if( !data[ Uname ][ 0 ] || !data[ Upass ][ 0 ] )
{
SQL_NextRow( query )
continue;
}
TrieSetCell( g_tpType[ Uflag ], data[ Uname ], iPos )
}
case AUTH_IP:
{
if( !IsValidIP( data[ Uip ] ) )
{
SQL_NextRow( query )
continue;
}
TrieSetCell( g_tpType[ Uflag ], data[ Uip ], iPos )
}
case AUTH_STEAM:
{
if( !IsValidAuthid( data[ Usteam ] ) )
{
SQL_NextRow( query )
continue;
}
TrieSetCell( g_tpType[ Uflag ], data[ Usteam ], iPos )
}
}
log_amx( "Loading data from database - iPos: %i | UID: %i | Flag: %i | Access: %s", iPos, data[ UID ], Uflag, data[ Uaccess ] )
ArrayPushArray( g_apData, data )
++iPos;
++playersCount;
SQL_NextRow( query )
}
if( playersCount == 1 )
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_LOADED_PLAYER" )
}
else
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_LOADED_PLAYERS", playersCount )
}
}
if( !g_bSqlInitialized )
{
new ret
ExecuteForward( Sql_Initialized, ret, info )
g_bSqlInitialized = true;
}
else
{
#if defined SQL_QUERY_DELAYED
new players[ MAX_PLAYERS ], num
get_players( players, num )
for( new i = 0; i < num; i++ )
{
new param[ 2 ], name[ 44 ]
param[ 0 ] = players[ i ]
get_user_name( param[ 0 ], name, 43 )
param[ 1 ] = EncodeText( name )
accessUser( param )
}
}
#else
SQL_FreeHandle( sql )
}
}
}
else
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_LOAD_SERVERS", error )
}
return PLUGIN_CONTINUE;
#endif
}
public LoadPatterns( )
{
new query[ 512 ]
formatex( query, 511, "SELECT `pattern`,`action` FROM `acp_nick_patterns`" )
SQL_ThreadQuery( info, "LoadPatterns_Post", query )
return PLUGIN_HANDLED;
}
public LoadPatterns_Post( FailState, Handle:query,error[ ], errcode, Data[ ], DataSize )
{
if( FailState != TQUERY_SUCCESS )
{
g_sqlLoadPatterns = true;
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_CANT_LOAD_PATTERNS", error )
}
else if( !SQL_NumResults( query ) )
{
g_sqlLoadPatterns = true;
log_amx( "%L", LANG_SERVER, "ADMIN_NAME_NOT_FOUND" )
}
else
{
new nameData[ 64 ], blockedCount, g_BlockedAction
while( SQL_MoreResults( query ) )
{
SQL_ReadResult( query, 0, nameData, sizeof( nameData ) - 1 )
g_BlockedAction = SQL_ReadResult( query, 1 )
new Array:nicksData
if( !TrieGetCell( g_tbAction, blocked_action_list[ g_BlockedAction ], nicksData ) )
{
nicksData = ArrayCreate( 64 )
}
ArrayPushArray( nicksData,nameData )
TrieSetCell( g_tbAction, blocked_action_list[ g_BlockedAction ], nicksData )
++blockedCount;
SQL_NextRow( query )
}
if( blockedCount == 1 )
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_LOADED_PATTERN" )
}
else
{
log_amx( "%L", LANG_SERVER, "ADMIN_SQL_LOADED_PATTERNS", blockedCount )
}
g_sqlLoadPatterns = true;
}
}
public cmdReload( id, level, cid )
{
if( !cmd_access( id, level, cid, 1 ) )
{
return PLUGIN_HANDLED;
}
remove_user_flags( 0, read_flags( "z" ) )
for( new ib = 1; ib < AuthType; ib++ )
{
TrieClear( g_tpType[ ib ] )
}
ArrayClear( g_apData )
LoadPlayersList( )
LoadPatterns( )
#if !defined SQL_QUERY_DELAYED
new players[ MAX_PLAYERS ], num
get_players( players, num )
for( new i = 0; i < num; i++ )
{
new param[ 2 ], name[ 44 ]
param[ 0 ] = players[ i ]
get_user_name(param[ 0 ], name, 43 )
param[ 1 ] = EncodeText( name )
accessUser( param )
}
#endif
return PLUGIN_HANDLED;
}
getAccess( id, name[ ], authid[ ], ip[ ], password[ ] )
{
new index = -1, result = 0, iPos, data[ PlayersList ], tname[ 44 ]
copy( tname, sizeof( tname ) - 1, name )
if( !get_pcvar_num( pcvar_sensivity ) )
{
strtolower( tname )
}
log_amx( "Player Authorized - Name: %s | IP: %s | STEAM: %s", name, ip, authid )
for( new i = 1; i < AuthType; i++ )
{
switch( i )
{
case AUTH_NAME:
{
if( TrieGetCell( g_tpType[ i ], tname, iPos ) )
{
ArrayGetArray( g_apData, iPos, data )
if( equal( password, data[ Upass ] ) )
{
result |= 12
if( !equal( data[ Uapproved ], "yes" ) )
{
result |= 16
break;
}
index = i
break;
}
else
{
result |= 3
break;
}
}
}
case AUTH_IP:
{
if( TrieGetCell( g_tpType[ i ], ip, iPos ) )
{
ArrayGetArray( g_apData, iPos, data )
result |= 8
if( !equal( data[ Uapproved ], "yes" ) )
{
result |= 16
break;
}
index = i
break;
}
}
case AUTH_STEAM:
{
if( TrieGetCell( g_tpType[ i ], authid, iPos ) )
{
ArrayGetArray( g_apData, iPos, data )
result |= 8
if( !equal( data[ Uapproved ], "yes" ) )
{
result |= 16
break;
}
index = i
}
}
}
}
if( index != -1 )
{
set_user_flags( id, read_flags( data[ Uaccess] ) )
g_Player_Data[ id ][ PL_id ] = data[ UID ]
g_Player_Data[ id ][ PL_auth ] = index
g_Player_Data[ id ][ PL_points ] = data[ Upoints ]
g_Player_Data[ id ][ PL_key ] = iPos
copy( g_Player_Data[ id ][ PL_name ], 43, name )
copy( g_Player_Data[ id ][ PL_ip ], 32, ip )
copy( g_Player_Data[ id ][ PL_steam ], 34, authid )
}
else if( get_pcvar_float( amx_mode ) == 2.0 )
{
result |= 2
}
else
{
if( get_pcvar_num( pcvar_reserv ) && TrieKeyExists( allNames, tname ) )
{
result |= 2
}
else
{
new defaccess[ 32 ]
get_pcvar_string( amx_default_access, defaccess, 31 )
if( !strlen( defaccess ) )
{
copy( defaccess, 32, "z" )
}
new idefaccess = read_flags( defaccess )
if( idefaccess )
{
result |= 8
set_user_flags( id, idefaccess )
}
}
}
return result;
}
public accessUser( param[ ] )
{
new id = param[ 0 ], name[ 44 ]
DecodeText( param[ 1 ], name, sizeof( name ) - 1 )
if( !g_bSqlInitialized && g_accounts_load )
{
new tmp[ 2 ]
tmp[ 0 ] = id
tmp[ 1 ] = EncodeText( name )
set_task( 0.1, "accessUser", id, tmp, sizeof( tmp ) )
return PLUGIN_CONTINUE;
}
remove_user_flags( id )
ClearPlayerData( id )
new userip[ 33 ], usersteam[ 35 ], password[ 33 ], md5password[ 34 ], passfield[ 32 ], username[ 44 ]
get_user_ip( id, userip, 32, 1 )
get_user_authid( id, usersteam, 34 )
if( name[ 0 ] )
{
copy( username, 43, name )
}
else
{
get_user_name( id, username, 43 )
}
get_pcvar_string( amx_password_field, passfield, 31 )
get_user_info( id, passfield, password, 32 )
md5( password, md5password )
new result = getAccess( id, username, usersteam, userip, md5password )
if( result & 1 )
{
engclient_print( id, engprint_console, "* %L", id, "ADMIN_INV_PAS" )
}
if( result & 2 )
{
client_cmd( id, "%s", g_cmdNickReserv )
return PLUGIN_HANDLED;
}
if( result & 4 )
{
engclient_print( id, engprint_console, "* %L", id, "ADMIN_PAS_ACC" )
}
if( result & 8 )
{
engclient_print( id, engprint_console, "* %L", id, "ADMIN_PRIV_SET" )
}
if( result & 16 )
{
client_cmd( id, "%s", g_cmdNickInactive )
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public ClearPlayerData( id )
{
g_Player_Data[ id ][ PL_id ] = 0
g_Player_Data[ id ][ PL_auth ] = 0
g_Player_Data[ id ][ PL_points ] = 0
g_Player_Data[ id ][ PL_name ][ 0 ] = 0
g_Player_Data[ id ][ PL_ip ][ 0 ] = 0
g_Player_Data[ id ][ PL_steam ][ 0 ] = 0
}
public client_infochanged( id )
{
if( !is_user_connected( id ) || !get_pcvar_num( amx_mode ) )
{
return PLUGIN_CONTINUE;
}
new newname[ MAX_NAME_LENGTH ], oldname[ MAX_NAME_LENGTH ]
get_user_name( id, oldname, 31 )
get_user_info( id, "name", newname, 31 )
if( !equali( newname, oldname ) )
{
updateDatabasePlayerAccount( id )
new param[ 2 ]
param[ 0 ] = id
param[ 1 ] = EncodeText( newname )
accessUser( param )
}
return PLUGIN_CONTINUE;
}
public client_authorized( id )
{
new param[ 2 ]
param[ 0 ] = id
param[ 1 ] = EncodeText( "" )
return get_pcvar_num( amx_mode ) ? accessUser( param ) : PLUGIN_CONTINUE
}
public checkPlayerConnected( param[ ] )
{
new id = param[ 0 ]
if( !is_user_connected( id ) )
{
return PLUGIN_HANDLED;
}
if( !g_sqlLoadPatterns )
{
new tmp[ 1 ]
tmp[ 0 ] = id
set_task( 0.1, "checkPlayerConnected", id, tmp, sizeof( tmp ) )
}
else
{
static iflags, szflags[ 28 ]
get_pcvar_string( pcvar_user_immunity, szflags, sizeof szflags - 1 )
iflags = read_flags( szflags )
if( get_user_flags( id ) & iflags )
{
return PLUGIN_CONTINUE;
}
new username[ 44 ]
get_user_name( id, username, 43 )
if( check_name( id, username, 1 ) == 1 )
{
new default_nick[ MAX_NAME_LENGTH ]
get_pcvar_string( pcvar_default_nick, default_nick, charsmax( default_nick ) )
set_user_info( id, "name", default_nick )
}
}
return PLUGIN_CONTINUE;
}
public client_putinserver( id )
{
new param[ 1 ]
param[ 0 ] = id
return checkPlayerConnected( param )
}
public client_disconnected( id )
{
updateDatabasePlayerAccount( id )
ClearPlayerData( id )
return PLUGIN_HANDLED;
}
public forward_client_userinfochanged( id, buffer )
{
if( !is_user_connected( id ) )
{
return FMRES_IGNORED;
}
static oldname[ MAX_NAME_LENGTH ], newname[ MAX_NAME_LENGTH ]
get_user_name( id, oldname, sizeof oldname - 1 )
engfunc( EngFunc_InfoKeyValue, buffer, g_name, newname, sizeof newname - 1 )
if( equal( newname, oldname ) )
{
return FMRES_IGNORED;
}
static iflags, szflags[ 28 ]
get_pcvar_string( pcvar_user_immunity, szflags, sizeof szflags - 1 )
iflags = read_flags( szflags )
if( !( get_user_flags( id ) & iflags ) )
{
new bool:notchange = false;
if( get_pcvar_num( pcvar_changenick ) )
{
if( check_name( id, newname, 2 ) == 1 )
{
client_print_color( id, print_team_default, "^x04[ACP]^x01 %L", LANG_PLAYER, "ADMIN_NAME_MESSAGE" )
notchange = true;
}
}
else
{
client_print_color( id, print_team_default, "^x04[ACP]^x01 %L", LANG_PLAYER, "ADMIN_NAME_CHANGE" )
notchange = true;
}
if( notchange )
{
engfunc( EngFunc_SetClientKeyValue, id, buffer, g_name, oldname )
client_cmd( id, "name ^"%s^"; setinfo name ^"%s^"", oldname, oldname )
return FMRES_SUPERCEDE;
}
}
if( get_pcvar_num( pcvar_announce ) )
{
msg_name_change( id, oldname, newname )
}
return FMRES_SUPERCEDE;
}
msg_name_change( id, oldname[ ], newname[ ] )
{
message_begin( MSG_BROADCAST, g_msgid_saytext )
write_byte( id )
write_string( g_name_change )
write_string( oldname )
write_string( newname )
message_end( )
}
public updateDatabasePlayerAccount( id )
{
if( !g_Player_Data[ id ][ PL_auth ] )
{
return PLUGIN_HANDLED;
}
new user_online, timestamp, remove_points, data[ PlayersList ]
timestamp = get_systime( 0 )
user_online = get_user_time( id, 1 )
ArrayGetArray( g_apData, g_Player_Data[ id ][ PL_key ], data )
remove_points = g_Player_Data[ id][ PL_points ] - data[ Upoints ]
if( remove_points != 0 )
{
data[ Upoints ] = g_Player_Data[ id ][ PL_points ]
ArraySetArray( g_apData, g_Player_Data[ id ][ PL_key ], data)
}
if( g_Player_Data[ id ][ PL_auth ] == 3 )
{
new player_name[ 44 ]
copy( player_name, 43, g_Player_Data[ id ][ PL_name ] )
replace_all( player_name, 43, "\", "\\" )
replace_all( player_name, 43, "'", "\'" )
formatex( g_Cache, 554, "UPDATE `acp_players` SET last_time = '%i', online = online+%i, points = points+%i, player_nick = '%s', player_ip = '%s' WHERE userid = '%i'", timestamp, user_online, remove_points, player_name, g_Player_Data[ id ][ PL_ip ], g_Player_Data[ id ][ PL_id ] )
}
else if( g_Player_Data[ id ][ PL_auth ] == 2 )
{
new player_name[ 44 ]
copy( player_name, 43, g_Player_Data[ id ][ PL_name ] )
replace_all( player_name, 43, "\", "\\" )
replace_all( player_name, 43, "'", "\'" )
formatex( g_Cache, 554, "UPDATE `acp_players` SET last_time = '%i', online = online+%i, points = points+%i, player_nick = '%s', steamid = '%s' WHERE userid = '%i'", timestamp, user_online, remove_points, player_name, g_Player_Data[ id ][ PL_steam ], g_Player_Data[ id ][ PL_id ] )
}
else
{
formatex(g_Cache, 554, "UPDATE `acp_players` SET last_time = '%i', online = online+%i, points = points+%i, player_ip = '%s', steamid = '%s' WHERE userid = '%i'", timestamp, user_online, remove_points, g_Player_Data[ id ][ PL_ip ], g_Player_Data[ id ][ PL_steam ], g_Player_Data[ id ][ PL_id ] )
}
SQL_ThreadQuery( info, "QueryHandle", g_Cache )
return PLUGIN_HANDLED;
}
public check_name( id, name[ ], action )
{
new username[ 44 ]
copy( username, sizeof( username ) - 1, name )
strtolower( username )
for( new ib = 0; ib < sizeof( blocked_action_list ); ib++ )
{
new Array:nicksData
if( TrieGetCell( g_tbAction, blocked_action_list[ ib ], nicksData ) )
{
for( new y = 0; y < ArraySize( nicksData ); y++ )
{
new buff[ 64 ]
ArrayGetString( nicksData, y, buff, sizeof( buff ) - 1 )
g_rgxRes = regex_match( username, buff, g_regex_return, error, 127 )
if( g_rgxRes >= REGEX_OK )
{
regex_free( g_rgxRes )
name_logs( id, name, ib, action )
return ib;
}
}
}
}
return 0;
}
public name_logs( id, name[ ], pattern, action )
{
if( is_user_bot( id ) || !is_user_connected( id ) || !get_pcvar_num( pcvar_savelogs ) )
{
return PLUGIN_HANDLED;
}
new authid[ 32 ], ip[ 16 ], username[ 44 ], timestamp = get_systime( 0 )
get_user_authid( id, authid, sizeof( authid ) - 1 )
get_user_ip( id, ip, sizeof( ip ) - 1, 1 )
copy( username, sizeof( username ) - 1, name )
replace_all( username, sizeof( username ) - 1, "'", "\'" )
new query[ 1001 ]
format( query, 1000, "INSERT into `acp_nick_logs` ( serverip, name, authid, ip, timestamp, pattern, action ) values ( '%s', '%s', '%s', '%s', '%i', '%d', '%d' )", g_serverip, username, authid, ip, timestamp, pattern, action )
SQL_ThreadQuery( info, "QueryHandle", query )
return PLUGIN_CONTINUE;
}
public QueryHandle( FailState, Handle:hQuery, Error[ ], Errcode, Data[ ], DataSize )
{
log_amx( "SQL Error #%d - %s", Errcode, Error )
}
public ackSignalReserv( id )
{
server_cmd( "kick #%d ^"%L^"", get_user_userid( id ), id, "ADMIN_NICK_ENTRY" )
return PLUGIN_HANDLED;
}
public ackSignalInactive( id )
{
server_cmd( "kick #%d ^"%L^"", get_user_userid( id ), id, "ADMIN_NICK_INACTIVE" )
return PLUGIN_HANDLED;
}
public native_take_points( id, cnt )
{
if( g_Player_Data[ id ][ PL_auth ] )
{
if( ( g_Player_Data[ id ][ PL_points ] - cnt ) < 0 )
{
g_Player_Data[ id ][ PL_points ] = 0
}
else
{
g_Player_Data[ id ][ PL_points ] -= cnt
}
return g_Player_Data[ id ][ PL_points ]
}
return false;
}
public native_give_points( id, cnt )
{
if( g_Player_Data[ id ][ PL_auth ] )
{
g_Player_Data[ id ][ PL_points ] += cnt
return 1;
}
return 0;
}
public native_player_auth( id )
{
return g_Player_Data[ id ][ PL_auth ]
}
public native_player_dbid( id )
{
return g_Player_Data[ id ][ PL_id ]
}
public native_player_points( id )
{
return g_Player_Data[ id ][ PL_points ]
}
public native_server_id( )
{
return g_serverID
}
stock delete_duplicate( string[ ], len )
{
new symbol[ 2 ]
for( new i = 0; i < strlen( string ) - 1; i++ )
{
copy( symbol, 1, string[ i ] )
replace_all( string[ i + 1 ], len - i - 1, symbol, "" )
}
}
In cstrike server console it prints;
AMX Mod X version 1.9.0.5221 Copyright (c) 2004-2015 AMX Mod X Development Team
Should it be 2018 or something?
The handle passed to the callbacks in SMC_SetReaders, SMC_SetParseStart, SMC_SetParseEnd...ect is always -1
Code to reproduce the issue :
#include <amxmodx>
public plugin_init()
{
new const configFile[] = "addons/amxmodx/scripting/testsuite/textparse_test.cfg";
new SMCParser:parser = SMC_CreateParser();
// Works : Prints valid value
server_print("SMC_CreateParser() : %d", parser);
SMC_SetParseStart(parser, "ReadCore_ParseStart");
new line, col;
new SMCError:err = SMC_ParseFile(parser, configFile, line, col);
if (err != SMCError_Okay)
{
new buffer[64];
server_print("%s", SMC_GetErrorString(err, buffer, charsmax(buffer)) ? buffer : "Fatal parse error");
}
SMC_DestroyParser(parser);
}
public ReadCore_ParseStart(SMCParser:handle)
{
// Bug : Prints -1
server_print("ReadCore_ParseStart : %d", handle);
}
CRASH: Fri Sep 21 16:18:20 MSK 2018
Start Line: ./hlds_linux -pingboost 3 +sys_ticrate 1200 -debug -game cstrike +ip x.x.x.x +port 27016 +maxplayers 32 +map de_dust2 -bots -pidfile hlds.24176.pid
[New LWP 24183]
[New LWP 24186]
[New LWP 24188]
[New LWP 24192]
[New LWP 24193]
[New LWP 24194]
[New LWP 24200]
[New LWP 24201]
[New LWP 24202]
[New LWP 1515]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
Core was generated by `./hlds_linux -pingboost 3 +sys_ticrate 1200 -debug -game cstrike +ip x.x.x.x.x'.
Program terminated with signal 11, Segmentation fault.
#0 0xb2d02cc1 in menu_display(tagAMX*, int*) () from /home/trias/games/csdm/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#0 0xb2d02cc1 in menu_display(tagAMX*, int*) () from /home/trias/games/csdm/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#1 0xb2e7b234 in get_amxbuffer(int)::buffer () from /home/trias/games/csdm/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
#2 0x00000000 in ?? ()
No symbol table info available.
From To Syms Read Shared Object Library
0xb777fa60 0xb77809a8 Yes (*) /lib/i386-linux-gnu/i686/cmov/libdl.so.2
0xb775c4b0 0xb7777188 Yes (*) /lib/i386-linux-gnu/i686/cmov/libm.so.6
0xb7606c90 0xb7719ccc Yes (*) /lib/i386-linux-gnu/i686/cmov/libc.so.6
0xb778f830 0xb77a641f Yes (*) /lib/ld-linux.so.2
0xb6f3dd40 0xb6fe0471 Yes (*) /home/trias/games/csdm/engine_i486.so
0xb6f2f8c0 0xb6f33638 Yes (*) /lib/i386-linux-gnu/i686/cmov/librt.so.1
0xb6f1d5c0 0xb6f27d74 Yes (*) ./libsteam_api.so
0xb6f06610 0xb6f12708 Yes (*) /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
0xb6e75914 0xb6ebbc78 Yes ./libstdc++.so.6
0xb6e1be04 0xb6e2b490 Yes ./libgcc_s.so.1
0xb6e01f40 0xb6e133f8 Yes (*) /home/trias/games/csdm/filesystem_stdio.so
0xb5b521c0 0xb68cbb04 Yes (*) /home/trias/.steam/sdk32/steamclient.so
0xb32376a0 0xb3279f70 Yes (*) /home/trias/games/csdm/./cstrike/addons/metamod/metamod_i386.so
0xb300a650 0xb3184530 Yes (*) /home/trias/games/csdm/cstrike/dlls/cs.so
0xb2ed2180 0xb2eef740 Yes (*) /home/trias/games/csdm/cstrike/addons/reunion/reunion_mm_i386.so
0xb2ea6d20 0xb2eb03f0 Yes (*) /home/trias/games/csdm/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so
0xb2cd08e0 0xb2d33927 Yes (*) /home/trias/games/csdm/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
0xb77858b0 0xb77861d8 Yes (*) cstrike/addons/amxmodx/modules/dummy_csx_amxx_i386.so
0xb2caa130 0xb2cb0810 Yes (*) cstrike/addons/amxmodx/modules/reaimdetector_amxx_i386.so
0xb2c90b40 0xb2c95998 Yes (*) cstrike/addons/amxmodx/modules/hackdetector_amxx_i386.so
0xb2bcddb0 0xb2be9e60 Yes (*) /home/trias/games/csdm/cstrike/addons/whblocker/whblocker_mm_i386.so
0xb2bb7780 0xb2bbeab0 Yes (*) /home/trias/games/csdm/cstrike/addons/gameguard/1_4_gameguard_16.so
0xb2a71f80 0xb2b75fd0 Yes (*) /home/trias/games/csdm/cstrike/addons/revoice/revoice_mm_i386.so
0xb272c790 0xb27c4fc5 Yes (*) cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xb249b9e0 0xb24c7dbc Yes (*) cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xb26f79b0 0xb26fba08 Yes (*) cstrike/addons/amxmodx/modules/nvault_amxx_i386.so
0xb26aa730 0xb26d97d0 Yes (*) cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xb2431b60 0xb2479624 Yes (*) cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xb2389d50 0xb2399460 Yes (*) cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xb21fb660 0xb21fff94 Yes (*) cstrike/addons/amxmodx/modules/fun_amxx_i386.so
0xb21d3290 0xb21df80c Yes (*) cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xb20401d0 0xb2052ff0 Yes (*) cstrike/addons/amxmodx/modules/csdm_amxx_i386.so
0xaf5771c0 0xb02f0b04 Yes (*) ./steamclient.so
0xb2188a50 0xb218f908 Yes (*) /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2
0xaef51670 0xaefc7020 Yes (*) ./crashhandler.so
0xb2280c00 0xb2283d08 Yes (*) /lib/i386-linux-gnu/i686/cmov/libnss_dns.so.2
0xb226e650 0xb227a738 Yes (*) /lib/i386-linux-gnu/i686/cmov/libresolv.so.2
0xb25135d0 0xb255c548 Yes (*) cstrike/addons/amxmodx/modules/regex_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbfa86514:
eip = 0xb2d02cc1 in menu_display(tagAMX*, int*); saved eip 0xb2e7b234
called by frame at 0xbfa86518
Arglist at 0xbfa8650c, args:
Locals at 0xbfa8650c, Previous frame's sp is 0xbfa86514
Saved registers:
ebx at 0xbfa86508, ebp at 0xbfa8650c, esi at 0xbfa86500, edi at 0xbfa86504, eip at 0xbfa86510
End of crash report
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 06:03:17 Aug 8 2018 (1579)
Build from: https://github.com/s1lentq/rehlds/commit/b23f658
ReGameDLL version: 5.7.0.312-dev
Build date: 07:53:34 May 31 2018
Build from: s1lentq/ReGameDLL_CS@26db32e
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.75 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.7 ini Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0-dev+5215 ini Start ANY
[ 4] WHBlocker RUN - whblocker_mm_i386.so v1.5.695 ini Chlvl ANY
[ 5] GameGuard RUN - 1_4_gameguard_16.so v1.4 ini Start Never
[ 6] Revoice RUN - revoice_mm_i386.so v0.1.0.32 ini Start Never
[ 7] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl3 ANY Never
[ 8] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl3 ANY ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0-dev+5215 pl3 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0-dev+5215 pl3 ANY ANY
[11] ReAPI RUN - reapi_amxx_i386.so v5.6.0.157-dev pl3 ANY Never
[12] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0-dev+5215 pl3 ANY ANY
[13] CStrike RUN - cstrike_amxx_i386.so v1.9.0-dev+5215 pl3 ANY ANY
AMX Mod X 1.9.0-dev+5215 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Sep 9 2018 04:42:06
Built from: https://github.com/alliedmodders/amxmodx/commit/8a720a7
Build ID: 5215:8a720a7
Core mode: JIT+ASM32
Список загруженных модулей:
Наименовани Верси Автор Состо
dummy_csx 1.0 AGHL.RU Dev Team running
ReAimDetector 0.2.2 ReHLDS Team running
hackdetector 0.15.328.l AGHL.RU Dev Team running
MySQL 1.9.0-dev+ AMX Mod X Dev Team running
FakeMeta 1.9.0-dev+ AMX Mod X Dev Team running
nVault 1.9.0-dev+ AMX Mod X Dev Team running
ReAPI 5.6.0.157- Asmodai & s1lent running
Ham Sandwich 1.9.0-dev+ AMX Mod X Dev Team running
CStrike 1.9.0-dev+ AMX Mod X Dev Team running
Fun 1.9.0-dev+ AMX Mod X Dev Team running
Engine 1.9.0-dev+ AMX Mod X Dev Team running
ReCSDM 3.6 Adidasman & s1lent running
RegEx 1.9.0-dev+ AMX Mod X Dev Team running
Всего 13 модулей
Currently loaded plugins:
name version author file status
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 3] Admin Load 3.9.3 Dev F@nt0M adminload_3_9_3 running
[ 4] FreshBan 1.3.1 kanagava fresh_bans_131- running
[ 5] Server Menu 1.5.0 F@nt0M server_menu_fan running
[ 6] ReAPI Anti DD Scroll 1.0 ReHLDS Team anti_dd_scroll. running
[ 7] DeathMatch Mod's Vote 1.62 Neeeeeeeeeel.- / dm_mode_vote3.a debug
[ 8] Simple Admin Chat 1.1 ill simple_admin_ch running
[ 9] Change Game Name 1.2 GoldSrc Team ChangeGameName. running
[ 10] New Kick Menu 1.2.8 Radius newkickmenu.amx running
[ 11] Admin Commands 1.9.0-dev+ AMXX Dev Team admincmd.amxx running
[ 12] Menus Front-End 1.9.0-dev+ AMXX Dev Team menufront.amxx running
[ 13] Commands Menu 1.9.0-dev+ AMXX Dev Team cmdmenu.amxx running
[ 14] Players Menu 1.9.0-dev+ AMXX Dev Team plmenu.amxx running
[ 15] Maps Menu 1.9.0-dev+ AMXX Dev Team mapsmenu.amxx running
[ 16] Admin Chat 1.9.0-dev+ AMXX Dev Team adminchat.amxx running
[ 17] Admin Votes 1.9.0-dev+ AMXX Dev Team adminvote.amxx running
[ 18] Restrict Weapons 1.9.0-dev+ AMXX Dev Team restmenu.amxx running
[ 19] Anti Flood 1.9.0-dev+ AMXX Dev Team antiflood.amxx running
[ 20] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 21] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 22] Stats Configuration 1.9.0-dev+ AMXX Dev Team statscfg.amxx running
[ 23] nice Demo 1.0 sector nice_demo.amxx running
[ 24] Advert Messages 1.3.3 neygomon | Radiu advert_messages running
[ 25] Resetscore 1.0 ill+Radius_fix resetscore.amxx running
[ 26] Gag Me 1.7.2 Radius gag_me.amxx running
[ 27] AMX Vampire 0.1 F@tn0M amx_vampire.amx running
[ 28] Killer ScreenFade 0.0.6 Vaqtincha reapi_killer_sc running
[ 29] [ReAPI] Parachute 1.0 ReHLDS Team parachute.amxx running
[ 30] Refill Weapon On Kill 0.0.1 Vaqtincha refill_weapon_o running
[ 31] Money as Frag Counter 0.1 Safety1st money_frag_coun running
[ 32] Die Motion Rate 0.0.2 Vaqtincha reapi_die_motio running
[ 33] FitoNyashka v.1337 gyxoBka a2_style.amxx running
[ 34] Fake Ping 1.0 MeRcyLeZZ/gyxoBk FakePing.amxx running
[ 35] Team Replace 1.0 Ish Chhabra task4.amxx debug
[ 36] AMXX God 0.1 F@tn0M amx_god.amxx running
[ 37] Damager Advanced 1.1.2 Radius (based on damager_advance running
[ 38] Chat Manager 1.0.0 Mistrick chatmanager.amx running
[ 39] ReCSDM Main 3.6 ReCSDM Team csdm_main.amxx debug
[ 40] ReCSDM Equip 3.6 ReCSDM Team csdm_equip.amxx debug
[ 41] ReCSDM Spawns 3.6 ReCSDM Team csdm_spawn_pres debug
[ 42] ReCSDM Misc 3.6 ReCSDM Team csdm_misc.amxx debug
[ 43] ReCSDM Stripper 3.6 KWo csdm_stripper.a running
[ 44] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 45] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 46] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 47] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 48] UFPS Map Manager 3.0.3(z) UFPS.Team umm.amxx running
[ 49] UFPS Map Config 1.2 UFPS.Team umm_mapconfig.a running
49 plugins, 49 running
L 09/21/2018 - 16:17:58: [umm.amxx] Настало время выбора следующей карты
L 09/21/2018 - 16:17:58: [umm.amxx] Голосование за следующую карту началось
L 09/21/2018 - 16:17:59: [umm.amxx] someone Выбрал карту "fy_iceworld"
CsFree Info - Clean Version : 1
L 09/21/2018 - 16:18:02: "CsFree Info - Clean Version<7963><STEAM_1:0:2006154046><CT>" say "1"
L 09/21/2018 - 16:18:02: [umm.amxx] CsFree Info - Clean Version Выбрал карту "cs_pf_dust"
L 09/21/2018 - 16:18:08: Server cvar "amx_nextmap" = "cs_pf_dust"
L 09/21/2018 - 16:18:08: [umm.amxx] Голосование завершено. Следующая карта "cs_pf_dust"
L 09/21/2018 - 16:18:11: Server cvar "mp_timelimit" = "0.010000"
L 09/21/2018 - 16:18:11: Team "CT" scored "0" with "2" players
L 09/21/2018 - 16:18:11: Team "TERRORIST" scored "0" with "1" players
L 09/21/2018 - 16:18:15: Server cvar "mp_timelimit" = "30.000000"
L 09/21/2018 - 16:18:15: Server cvar "sv_maxspeed" = "320"
L 09/21/2018 - 16:18:15: [META] ini: Begin re-reading plugins list: /home/trias/games/csdm/cstrike/addons/metamod/plugins.ini
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: Reunion
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: ReAuthCheck
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: AMX Mod X
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: WHBlocker
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: GameGuard
L 09/21/2018 - 16:18:15: [META] ini: Read plugin config for: Revoice
L 09/21/2018 - 16:18:15: [META] ini: Finished reading plugins list: /home/trias/games/csdm/cstrike/addons/metamod/plugins.ini; Found 6 plugins
L 09/21/2018 - 16:18:15: [META] dll: Updating plugins...
L 09/21/2018 - 16:18:15: [META] dll: Finished updating 16 plugins; kept 6, loaded 0, unloaded 0, reloaded 0, delayed 0
L 09/21/2018 - 16:18:15: [META] dll: Rebuilding callbacks...
L 09/21/2018 - 16:18:15: [META] dll: Callbacks rebuilded.
L 09/21/2018 - 16:18:15: Log file closed
Server logging data to file logs/L0921104.log
L 09/21/2018 - 16:18:15: Log file started (file "logs/L0921104.log") (game "cstrike") (version "48/1.1.2.7/Stdio/1579")
L 09/21/2018 - 16:18:15: Loading map "cs_pf_dust"
L 09/21/2018 - 16:18:15: Server cvars start
L 09/21/2018 - 16:18:15: Server cvar "a2_style" = "v.1337"
L 09/21/2018 - 16:18:15: Server cvar "adminload_version" = "3.9.3 Dev"
L 09/21/2018 - 16:18:15: Server cvar "aes" = "0.5.9 [REAPI]"
L 09/21/2018 - 16:18:15: Server cvar "aes_track_pause" = "0"
L 09/21/2018 - 16:18:15: Server cvar "allow_spectators" = "2"
L 09/21/2018 - 16:18:15: Server cvar "amx_client_languages" = "0"
L 09/21/2018 - 16:18:15: Server cvar "amx_language" = "ru"
L 09/21/2018 - 16:18:15: Server cvar "amx_nextmap" = "cs_pf_dust"
L 09/21/2018 - 16:18:15: Server cvar "amx_timeleft" = "00:00"
L 09/21/2018 - 16:18:15: Server cvar "amxmodx_version" = "1.9.0-dev+5215"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_grenades" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_machine_guns" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_pistols" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_rifles" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_rogues" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_shield" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_shotguns" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_snipers" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_allow_sub_machine_guns" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_auto_vacate" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_chatter" = "normal"
L 09/21/2018 - 16:18:15: Server cvar "bot_deathmatch" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_debug" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_defer_to_human" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_difficulty" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_join_after_player" = "1"
L 09/21/2018 - 16:18:15: Server cvar "bot_join_team" = "any"
L 09/21/2018 - 16:18:15: Server cvar "bot_nav_edit" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_nav_zdraw" = "4"
L 09/21/2018 - 16:18:15: Server cvar "bot_prefix" = ""
L 09/21/2018 - 16:18:15: Server cvar "bot_profile_db" = "BotProfile.db"
L 09/21/2018 - 16:18:15: Server cvar "bot_quicksave" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_quota" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_quota_match" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_quota_mode" = "normal"
L 09/21/2018 - 16:18:15: Server cvar "bot_show_danger" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_show_nav" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_stop" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_traceview" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_walk" = "0"
L 09/21/2018 - 16:18:15: Server cvar "bot_zombie" = "0"
L 09/21/2018 - 16:18:15: Server cvar "coop" = "0"
L 09/21/2018 - 16:18:15: Server cvar "csdm_active" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_block_drop_weapon" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_block_endround_force" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_remove_weapon_dead" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_spec_menu_always" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_unlimited_team_changes" = "1"
L 09/21/2018 - 16:18:15: Server cvar "csdm_version" = "3.6"
L 09/21/2018 - 16:18:15: Server cvar "csstatsx_sql" = "0.7.4"
L 09/21/2018 - 16:18:15: Server cvar "damager_advanced_version" = "1.1.2"
L 09/21/2018 - 16:18:15: Server cvar "deathmatch" = "1"
L 09/21/2018 - 16:18:15: Server cvar "decalfrequency" = "60"
L 09/21/2018 - 16:18:15: Server cvar "edgefriction" = "2"
L 09/21/2018 - 16:18:15: Server cvar "game_version" = "5.7.0.312-dev"
L 09/21/2018 - 16:18:15: Server cvar "hackdetector_version" = "0.15.328.lite"
L 09/21/2018 - 16:18:15: Server cvar "humans_join_team" = "any"
L 09/21/2018 - 16:18:15: Server cvar "max_queries_sec" = "3.0"
L 09/21/2018 - 16:18:15: Server cvar "max_queries_sec_global" = "30"
L 09/21/2018 - 16:18:15: Server cvar "max_queries_window" = "60"
L 09/21/2018 - 16:18:15: Server cvar "metamod_version" = "1.3.0.128"
L 09/21/2018 - 16:18:15: Server cvar "mp_autokick" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_autokick_timeout" = "-1"
L 09/21/2018 - 16:18:15: Server cvar "mp_autoteambalance" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_buytime" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_c4timer" = "45"
L 09/21/2018 - 16:18:15: Server cvar "mp_chattime" = "5"
L 09/21/2018 - 16:18:15: Server cvar "mp_consistency" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_fadetoblack" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_flashlight" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_footsteps" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_forcecamera" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_forcechasecam" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_forcerespawn" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_fraglimit" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_fragsleft" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_freeforall" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_freezetime" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_friendlyfire" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_hostage_hurtable" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_hostagepenalty" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_item_staytime" = "300"
L 09/21/2018 - 16:18:15: Server cvar "mp_kickpercent" = "99"
L 09/21/2018 - 16:18:15: Server cvar "mp_legacy_bombtarget_touch" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_limitteams" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_logdetail" = "3"
L 09/21/2018 - 16:18:15: Server cvar "mp_logfile" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_logmessages" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_mapvoteratio" = "0.66"
L 09/21/2018 - 16:18:15: Server cvar "mp_maxmoney" = "16000"
L 09/21/2018 - 16:18:15: Server cvar "mp_maxrounds" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_mirrordamage" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_old_bomb_defused_sound" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_playerid" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_respawn_immunitytime" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_round_infinite" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_round_restart_delay" = "5"
L 09/21/2018 - 16:18:15: Server cvar "mp_roundover" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_roundtime" = "5"
L 09/21/2018 - 16:18:15: Server cvar "mp_show_radioicon" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_startmoney" = "800"
L 09/21/2018 - 16:18:15: Server cvar "mp_timeleft" = "12:01"
L 09/21/2018 - 16:18:15: Server cvar "mp_timelimit" = "30.000000"
L 09/21/2018 - 16:18:15: Server cvar "mp_tkpunish" = "0"
L 09/21/2018 - 16:18:15: Server cvar "mp_windifference" = "1"
L 09/21/2018 - 16:18:15: Server cvar "mp_winlimit" = "0"
L 09/21/2018 - 16:18:15: Server cvar "pausable" = "0"
L 09/21/2018 - 16:18:15: Server cvar "reaimdetector_version" = "0.2.2"
L 09/21/2018 - 16:18:15: Server cvar "reauthcheck_version" = "0.1.7"
L 09/21/2018 - 16:18:15: Server cvar "reu_version" = "0.1.75"
L 09/21/2018 - 16:18:15: Server cvar "revoice_version" = "0.1.0.32"
L 09/21/2018 - 16:18:15: Server cvar "sv_accelerate" = "5"
L 09/21/2018 - 16:18:15: Server cvar "sv_aim" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_airaccelerate" = "10"
L 09/21/2018 - 16:18:15: Server cvar "sv_allowupload" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_alltalk" = "1"
L 09/21/2018 - 16:18:15: Server cvar "sv_bounce" = "1"
L 09/21/2018 - 16:18:15: Server cvar "sv_cheats" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_clienttrace" = "1"
L 09/21/2018 - 16:18:15: Server cvar "sv_contact" = "vk.com/adva88"
L 09/21/2018 - 16:18:15: Server cvar "sv_friction" = "4"
L 09/21/2018 - 16:18:15: Server cvar "sv_gravity" = "800"
L 09/21/2018 - 16:18:15: Server cvar "sv_logblocks" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_maxrate" = "100000"
L 09/21/2018 - 16:18:15: Server cvar "sv_maxspeed" = "320"
L 09/21/2018 - 16:18:15: Server cvar "sv_minrate" = "25000"
L 09/21/2018 - 16:18:15: Server cvar "sv_password" = ""
L 09/21/2018 - 16:18:15: Server cvar "sv_proxies" = "1"
L 09/21/2018 - 16:18:15: Server cvar "sv_restart" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_restartround" = "0"
L 09/21/2018 - 16:18:15: Server cvar "sv_stepsize" = "18"
L 09/21/2018 - 16:18:15: Server cvar "sv_stopspeed" = "75"
L 09/21/2018 - 16:18:15: Server cvar "sv_uploadmax" = "0.5"
L 09/21/2018 - 16:18:15: Server cvar "sv_version" = "1.1.2.7/Stdio,48,1579"
L 09/21/2018 - 16:18:15: Server cvar "sv_voiceenable" = "1"
L 09/21/2018 - 16:18:15: Server cvar "sv_wateraccelerate" = "10"
L 09/21/2018 - 16:18:15: Server cvar "sv_waterfriction" = "1"
L 09/21/2018 - 16:18:15: Server cvar "umm_version" = "3.0.3(z)"
L 09/21/2018 - 16:18:15: Server cvar "whb_version" = "1.5.695"
L 09/21/2018 - 16:18:15: Server cvars end
L 09/21/2018 - 16:18:15: -------- Mapchange to cs_pf_dust --------
L 09/21/2018 - 16:18:15: Server cvar "sv_maxspeed" = "900"
Executing ReGameDLL Configuration File
L 09/21/2018 - 16:18:15: Server cvar "mp_timelimit" = "30"
L 09/21/2018 - 16:18:15: Server cvar "sv_alltalk" = "0"
L 09/21/2018 - 16:18:16: [csdm_spawn_preset.amxx] Loaded 30 spawn points for map cs_pf_dust.
L 09/21/2018 - 16:18:16: [csdm_main.amxx] CSDM spawn mode set to preset
Navigation map loaded.
[ReAuthCheck] Success: Configuration executed.
Executing AMX Mod X Configuration File
Advanced Experience System Copyright (c) 2016 serfreeman1337/sonyx
Version 0.5.9 [REAPI] build on 12, March (03), 2018
L 09/21/2018 - 16:18:16: [server_menu_fantom.amxx] Load 8 items from config. Menu enable
*Executing UFPS Map Manager Configuration File
L 09/21/2018 - 16:18:16: Log file closed
Server logging data to file logs/L0921105.log
L 09/21/2018 - 16:18:16: Log file started (file "logs/L0921105.log") (game "cstrike") (version "48/1.1.2.7/Stdio/1579")
L 09/21/2018 - 16:18:16: Server cvar "mp_friendlyfire" = "1"
L 09/21/2018 - 16:18:16: Server cvar "sv_maxspeed" = "320"
L 09/21/2018 - 16:18:16: Server cvar "sv_alltalk" = "1"
L 09/21/2018 - 16:18:16: Server cvar "sv_restart" = "1.000000"
L 09/21/2018 - 16:18:16: [csstatsx_sql.amxx] deleted 2 inactive entries
L 09/21/2018 - 16:18:16: World triggered "Restart_Round_(1_second)"
L 09/21/2018 - 16:18:16: Team "CT" scored "0" with "0" players
L 09/21/2018 - 16:18:16: Team "TERRORIST" scored "0" with "0" players
L 09/21/2018 - 16:18:16: Server cvar "sv_restart" = "0"
[GameGuard] Success Activation.
L 09/21/2018 - 16:18:17: Started map "cs_pf_dust" (CRC "-969403466")
L 09/21/2018 - 16:18:17: Server cvar "sv_restart" = "1"
L 09/21/2018 - 16:18:17: Log file closed
Server logging data to file logs/L0921106.log
L 09/21/2018 - 16:18:17: Log file started (file "logs/L0921106.log") (game "cstrike") (version "48/1.1.2.7/Stdio/1579")
Segmentation fault (core dumped)
warning: Can't read pathname for load map: Input/output error.
email debug.log to [email protected]
Fri Sep 21 16:18:21 MSK 2018: Server restart in 10 seconds
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Console initialized.
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 06:03:17 Aug 8 2018 (1579)
STEAM Auth Server
Server IP address 188.35.185.185:27016
Metamod-r version 1.3.0.128 Copyright (c) 2016-2018 ReHLDS Team (rebuild of original Metamod by Will Day and Jussi Kivilinna)
Metamod-r comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `meta gpl' for details.
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:48 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
[ReAuthCheck] Version: 0.1.7 Linux 'Counter-Strike 1.6'
[ReAuthCheck] Success: Configuration executed.
[ReAuthCheck] Success: Build ReHLDS version defined Linux '1579'
AMX Mod X version 1.9.0-dev+5215 Copyright (c) 2004-2015 AMX Mod X Development Team
AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
This is free software and you are welcome to redistribute it under
certain conditions; type 'amxx gpl' for details.
[ReAimDetector] Version: 0.2.2 Linux 'Counter-Strike 1.6'
[ReAimDetector] Success: Build ReHLDS version defined Linux '1579'.
[HACKD] Found compatible ReHLDS engine.
[WHB] Version: 1.5.695 Linux (Usage SSE 4.1)
[WHB] Success: Build ReHLDS version defined Linux '1579'
[WHB] Success: Configuration executed.
[GameGuard] Success Initialization.
ReGameDLL version: 5.7.0.312-dev
L 09/21/2018 - 16:18:31: -------- Mapchange to de_dust2 --------
Executing ReGameDLL Configuration File
L 09/21/2018 - 16:18:32: [csdm_spawn_preset.amxx] Loaded 41 spawn points for map de_dust2.
L 09/21/2018 - 16:18:32: [csdm_main.amxx] CSDM spawn mode set to preset
Navigation map loaded.
Executing AMX Mod X Configuration File
Executing AMX Mod X Configuration File
This part of the plugin had several improvements without that much checks and need a rewrite.
Firstable: teams are not handled the same way in HL and CS 1.6.
That means it should be better to have a specific plmenu.sma for CS 1.6 like we did for some other plugins. But that also means a decent teammenu is inexistant for HL and need either to be coded or removed from the main amxmodmenu or available commands.
Secondable: silent transfer option (CS 1.6 case)
This was merged too quickly in the plugin.
We can create a spectator bug : #175
We can silent transfer the bomb to the ct team.
Not tested but I'm sure we can silent transfer the VIP.
I'm sure this option is used so IMO, we should not remove it but rather prevent all cases.
Why this is hardcoded?
g_hudset.r2 = 255;
g_hudset.g2 = 255;
g_hudset.b2 = 250;
And this not?
g_hudset.r1 = static_cast<byte>(params[1]);
g_hudset.g1 = static_cast<byte>(params[2]);
g_hudset.b1 = static_cast<byte>(params[3]);`
Code from here
This is specially useful when you set a hud message with effect 2 (Scan Out), the definition is from here
Color2
The scanning color for the letter being scanned if the Text Effect keyvalue is set to Scan Out - usually a different shade of Color1.
Hey, guys.
There'll be some time I'm experiencing this situation, and, to be honest, I'm not sure if that's intended to be like that.
Seems like get_weaponname() and get_weaponid() return null values on plugin_precache forward right when server starts up. However, it works as expected after map changing or manual restarting.
#include < amxmodx >
new g_WeaponNames[ CSW_P90 + 1 ][ 32 ];
public plugin_precache()
{
for ( new i = CSW_P228; i <= CSW_P90; i++ )
{
// at this point, no names will be returned from get_weaponname(),
// also no id would be returned from get_weaponid().
get_weaponname( i, g_WeaponNames[ i ], charsmax( g_WeaponNames[] ) );
}
}
public plugin_init()
{
register_plugin( "GetWeaponId", "0.1", "test" );
for ( new i = CSW_P228; i <= CSW_P90; i++ )
{
// displays blank outputs for weapon names
log_amx( "%i. %s", i, g_WeaponNames[ i ] );
}
}
Outputs :
L 10/08/2018 - 19:11:12: [GetWeaponId.amxx] 1.
L 10/08/2018 - 19:11:12: [GetWeaponId.amxx] 2.
L 10/08/2018 - 19:11:12: [GetWeaponId.amxx] 3.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 4.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 5.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 6.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 7.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 8.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 9.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 10.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 11.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 12.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 13.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 14.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 15.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 16.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 17.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 18.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 19.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 20.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 21.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 22.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 23.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 24.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 25.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 26.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 27.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 28.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 29.
L 10/08/2018 - 19:11:13: [GetWeaponId.amxx] 30.
I think we can remove has_min
and has_max
params and replace min_val
/max_val
default values with -Infinity
and +Infinity
respectively.
L 09/22/2018 - 17:05:44: [admincmd.amxx] Cmd: "Server Name <0><><>" ban "" (minutes "���") (reason "������")
Executed the amx_addban command with no parameters, this happen
This bug is happening on 1.8.2, i'm pretty sure this isn't fixed on 1.9
And executed the command on the server console
About the Amx_language_display_msg and amx_help_display_msg features, if set to 0, have a role on the Hlds remote server, but are not useful when used locally
Now that we have the new AutoExecConfig() native, should we use it in the default AMXX plugins in order to separate all the cvars that we currently have in amxx.cfg? This will be very convenient as it will be easier to locate the cvars we want to change plus updating our AMXX version won't require to manually update amxx.cfg each time a cvar is added/modified. What are your thoughts?
Wrong german translation, I'll try to fix this with a PR
VICTIMS = Sieger
correct: Opfer
KILLED_YOU_DIST = %s hat dich getoetet ^naus einer Entfernung von %0.2f Metern.
correct: %s hat dich mit einer %s ^naus %0.2f Metern Entfernung getoetet. (Name of Weapon is missing in the wrong version!!!)
YOU_DID_DMG = Du hast %d Schaden bei ihm angerichtet mit %d Treffern.
correct: Du hast bei ihm %d Schaden angerichtet mit %d Treffern.
HITS_YOU_IN = %s Treffer bei ihm
correct: %ss Treffer bei dir
SHE_MSG_2 = %s untersuchte die Auswirkungen ^neiner Granate an sich selbst...
correct: %s untersuchte die Auswirkungen einer Granate an sich selbst...
KILLED_ROW = Du hast bis jetzt %d in einer Runde gekillt.
correct: Du hast bis jetzt %d Gegner hintereinander gekillt, ohne zu sterben!
DIED_ROUNDS = Du bist bis jetzt %d Runden hintereinander gestorben...
correct: Du bist bis jetzt %d Runden hintereinander gestorben, ohne jemanden zu toeten...
BLEW_RADIO = Irgendjemand sprenge das Radio!!!
correct: Irgendjemand sprengte das Radio!!!
CHO_FIN_NEXT = Auswahl beendet. Naechste Map ist %s
correct: Auswahl beendet. Naechste Map ist: %s
CHOSE_EXT = %s waehlten Map-Verlaengerung
correct: %s waehlte: Map-Verlaengerung
X_CHOSE_X = %s waehlten %s
correct: %s waehlte: %s
CHOOSE_NEXTM = AMXX waehlt naechste Map
correct: [AMXX] Waehlt die naechste Map
EXTED_MAP = Verlangere Map %s
correct: Verlaengere Map %s
PAUSE = Pause
correct: pausiert den
UNPAUSE = Pause beendet
correct: beendet die Pause auf dem
###Common
CLIENT_IMM = Spieler "%s" hat Immnuitaet
correct: Spieler "%s" hat Immunitaet
###Multilingual
LANG_NOT_EXISTS = Diese Sprache exsistiert nicht.
correct: Diese Sprache existiert nicht.
###Scrollmsg
MSG_FREQ = Scrollnachricht Anzeigefrequenz: %d:%02d Minuten
correct: Anzeigefrequenz der Scrollnachricht : %d:%02d Minuten
###StatsCFG
STATS_ENABLED = Stats enabled
correct: Stats aktiviert
STATS_DISABLED = Stats disabled
correct: Stats deaktiviert
ST_BOMB_CD_DEF = Bomben Countdown (entschaerfer)
correct: Bomben Countdown (Entschaerfer)
about the scrollmsg and imessage plugins, can not add option, in Amxx.cfg settings can not display to the live player, only to the dead player display.
Hi,
I have just reading the API Changes description of the new version of AmxModX and I can not agree with these new chaotic function names.
The best part to give an example is the "Existing core APIs additions":
client_connectex (why not just client_connected?)
client_disconnected (may this one is correct, because the client_disconnect is deprecated, but this is also an extended function)
below are these ones:
find_player_ex
get_players_ex
get_playersnum_ex
In this case why they got an "_" mark before the extended mark (or client_connectex why not?)?
It would be nice if would be a rule for these new names. If a function has an extended version much easier to find it if the new function names follow a rule.
Hi, according to this topic:
https://forums.alliedmods.net/showthread.php?t=90735&page=1
And also logic - what do you think to introduce packed strings instead array's strings?
Whether the new Pluginmenu plugin can be modified into a multi-language version,Only English version, not very convenient
Admin plugin to increase the validity of the membership, in Users.ini set the validity period so that the member management more convenient.
I have someone else modified plug-ins, can learn from the next, so that can be modified faster! Plugins: http://dl.lonzi.cn/cstrike/admin.sma, configuration files: http://dl.lonzi.cn/cstrike/users.ini
I was wondering, what about storing custom data for entitiy instead creating Trie?
If we want to keep data simple for some entity, already we are using
EV_INT_iuser1, EV_INT_iuser2
etc. because creating variable
new entities[4096]
is bad idea
What about storing DataPacks for entity and auto-releasing it when entity is removing by remove_entity?
some natives like:
native entity_set_data(entityId, DataPack: data);
and entity_get_data
It would be pretty good if there's an extra option to give a reason for the ban on amx_banmenu (some ppl do it with messagemode)
Basicly my request is to add a cooldown on how much you can use the thetime/timeleft/ff (Friendlyfire) commands, as it is right know you can flood them non stop.
When can I download the collection to the latest pull requests? I want to test it, when will the official version of Amxmodx be released? is the version number 1.9.0 or 1.10.1?
i get a tag mismatch with this code :
#include <amxmodx>
enum {
x,
y,
z
}
enum _:ORIGIN_DATA{
Float:Origin[3],
OriginTeam
}
public plugin_init()
{
new TestOrigin[ORIGIN_DATA]
TestOrigin[Origin][x] = 1.0
server_print("TestOrigin[x] = %f", TestOrigin[Origin][x])
}
Log output :
AMX Mod X Compiler 1.8.3-dev+5181
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
g:\2018\amx\Array_Tag.sma(18 -- 20) : warning 213: tag mismatch
Header size: 172 bytes
Code size: 132 bytes
Data size: 96 bytes
Stack/heap size: 16384 bytes
Total requirements: 16784 bytes
1 Warning.
Done.
set_user_rendering will not work ive tried alot of different ways. Engine, Fakemeta, Fun
Code im using right now.
#include <amxmodx>
#include <fakemeta>
#include <fun>
#define PLUGIN "Stealth"
#define VERSION "1.0"
#define AUTHOR "Mark"
#define STEALTH 16.0
new g_szName[32]
new const sound_stealth[] =
{
"zombie_escape/blinkarrival.wav"
}
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_clcmd("give_stealth", "give_stealth")
}
public plugin_precache()
{
precache_sound(sound_stealth)
}
public give_stealth(id)
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0)
set_user_footsteps(id, 1)
get_user_name(id, g_szName, 31)
set_task( STEALTH , "remove_stealth", id)
}
public remove_stealth(id)
{
get_user_name(id, g_szName, 31)
set_user_rendering(id)
set_user_footsteps(id, 0)
}
build 5200 fun.inc
3 instances of HITZONE_STOMATCH should be HITZONE_STOMACH (lines 31 & 36)
Is it possible to make the text that the compiler outputs selectable? Right now when someone needs to post the errors they got when compiling a plugin, they must post a screenshot or try to write the error manually which is very incovenient. I'm talking about the compile.exe window.
I'm trying to show an empty message in case some condition becomes false, the best think that came to my mind to improve readability is to use the ternary operator, but it shows me a runtime error...
Put this code in plugin_init, compile and test it
server_print(id, "%s", true ? fmt("Hello") : "");
[AMXX] Run time error 8: heap low
I got a report by a user that runs a Half-Life server that when he updated to AMXX 1.9 this happened with all the menus:
If I'm not mistaken, colored menus are not supported in Half-Life. It's probably a mistake made in PR #143. He has been using 1.8.2 before that and the menus worked fine without displaying the color symbols.
I tested as well to make sure - the color symbols appear in menus when using 1.9.0, downgrading to 1.8.2 removes them.
I also noticed another bug while testing the menus. If you leave a menu open and you leave the server, when you come back the menu stays open but you're not able to select anything from it. It happens even if you restart the server.
The current random number generators are not that random.
I have no data to back that claim but I'm not the only person to notice a pattern. A forum search shows many posts making the same claim.
In 2005, "Twilight Suzuka" released a better random number generator for AMXMODX, Module: RandomX using the Mersenne Twister PRNG.
RandomX uses a random number generator called the "Mersenne Twister", which is one of the fastest random number generators availible, and is light years ahead of the current ones implimented in AMXx. This means high quality and inexpensive randomized variables.
In 2009 "altex" reported a bug in the random number generator used in Sourcemod (Bug #3831). Mersenne Twister PRNG based random number generators GetURandomInt and GetURandomFloat were then added to SourceMod. Commit: Added better random number generator.
Possible Solutions:
I like Amxmodx, some questions feedback, please fix Miscstats plugin: enemyremaining team name display error, when the enemy was killed one person, the remaining enemy team name wrong display set up their own team name, the remaining number and team name is not synchronized.
The old Miscstats plugin, after the death of the teammate, does not show the enemyremaining function, in the 1.9.0 also shows but does not correspond, I think this is a new feature, it should be, after the death of teammates show how many people and their team name, the enemy after the death shows how many people and the enemy team name, I come from China, English is not very good. If you don't understand me, please let me know.
So I was browsing the functions on the API site when I faced this, regex_match claims this:
If you intend on using the same regular expression pattern
multiple times, consider using regex_compile and regex_match_ex
instead of making this function reparse the expression each time.
There comes the "but" part, when I realized that regex_match_ex does not exist, not even in the module.cpp.
It is also mentioned at the description of regex_match_all.
Futhermore take a look at this: regex_split
Code :
#include <amxmodx>
#include <fun>
#include <cstrike>
public plugin_init()
{
register_clcmd("say /test", "cmd_test")
}
public cmd_test(id)
{
give_item(id, "weapon_hegrenade")
cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
}
Error :
L 10/02/2018 - 11:05:22: [CSTRIKE] Invalid weapon id 4
L 10/02/2018 - 11:05:22: [AMXX] Displaying debug trace (plugin "ammo_test.amxx", version "unknown")
L 10/02/2018 - 11:05:22: [AMXX] Run time error 10: native error (native "cs_set_user_bpammo")
L 10/02/2018 - 11:05:22: [AMXX] [0] ammo_test.sma::cmd_test (line 13)
Versions :
meta version
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
amxx version
AMX Mod X 1.10.0.5233 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Sep 28 2018 09:32:57
Built from: https://github.com/alliedmodders/amxmodx/commit/0b5584a
Build ID: 5233:0b5584a
Core mode: JIT+ASM32
ReGameDLL version: 5.7.0.313-dev
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
this happens randomly, i m not using any other plugin.
Hi. My plugin is using nvault_util
from here: https://forums.alliedmods.net/showthread.php?t=139584
Author is providing for us new nvault_amxx module
Is this module compatibile with 1.9?
Hello. I'd like to request, just as you can find offsets for Half-Life, Opposing Force, Team Fortress Classic, Counter-Strike and Day of Defeat, can offsets for Ricochet and Deathmatch Classic be added as well? This could be very useful for people that are not very familiar with IDA. Also, there aren't really any tutorials explaining how to get offsets with IDA. I know that code has to be decompiled and look for 'this' to get the value, but, for decompilation, I guess, an extra IDA plug-in is required. This will make it very easy for anyone to write plug-ins with multimod support that are relying on offsets. For example, let's say you want to get where the player was hit on Ham_Killed post. For m_LastHitGroup, you would need the offset corresponding to the game. Thanks for reading and hoping for an update that will include DMC and Ricochet :-)
amxmodx/compiler/libpc300/sc2.c
Line 603 in 0b5584a
amxmodx/compiler/libpc300/sc2.c
Line 685 in 0b5584a
Hi,
It would be glad to see a cvar for infinity round or something like that.
I think it can be very userful.
We can achieve it using orpheu, can we do it from amxmodx side?
Reported by @the-swank
https://github.com/alliedmodders/amxmodx/blob/master/modules/hamsandwich/DataHandler.cpp#L439
Looks like the AMXX buffer is set directly and this can lead to a buffer issue. Actually, Ammo1
and Ammo2
should be concerned as well.
Potential fix is to use ALLOC_STRING
.
Before we go wild on plugins, we should discuss what changes/new features/new plugins would be welcomed for each plugin. It will be easier to manage people's ideas and we will get a better overview of the work to do. We can also sort them by priority and whether they are unwanted/out-of-scope/impossible/etc. Some changes may require modifications in core, therefore it's important to discuss everything beforehand.
I will try to update below based on the proposed changes.
waiting for feedbacks
Admin | - Temporary admins |
Admin Chat | - Add Gag/UnGag commands (voice, say, say_team) |
Admin Cmds | - Ability to kick spectator and/or AFK after a predefined time (not sure if the right plugin here, default could be the most recent player) - API: kick/ban players - A player's command to reset stats - `amx_slay` with ` @` (e.g. for CS: @ALL/@CT/@t) - Enforces sanity checks on command arguments |
Admin Help | - |
Admin Votes | - Add a `amx_votecvar` command. |
Commands Menu | - |
Maps Menu | - |
Menus Front-End | - The position of core menus should be modifiable in a config file. - Hide menu instead of being visually disabled for player who doesn't have the access level |
Multi-Lingual System | - |
Nextmap Chooser | - |
NextMaps | - Allow the last round to be finished even if the timelimit has expired |
Pause Plugins | - |
Players Menu | - Ability to choose in what position Slay/Slap items should be (first/last) - Ability to choose a reason before a Kick/Ban - A command `amx_team ` to open a menu with found players - An option if the player doesn't have access to `amx_slap` or `amx_slay` to make sure the player can't use that through the Slap/Slay Menu. - Don't harcode data (such ban time, etc.) |
Plugin Menu | - |
Slots Reservation |
- API: forward before any action to check a player and change conditions - If all slots are used, ability to search a player to kick based on certain criteria (spectator, defined afk time, etc) |
Scrolling Message | -Ability to target specific players |
Stats Configuration | - |
Teleport Menu | - |
TimeLeft | - |
Vote | - If the Gag/Mute gets implemented a new `amx_votemute ` command. |
CS Misc. Stats | - Knife Kills and HE Grande Kills |
CS Stats Logging | - |
CS StatsX | - |
CS Restrict Weapons | - Restriction per player - Restriction on touch - Ability to limit the amount of a weapon that can be bought/in the world - Ability to make specific weapons accessible only to people with a specific flags |
Potential new plugins:
Team Balance | Ability to balance teams with various options |
AFK Manager | Ability to handle AFK, disabled by default |
I don't have much idea about pwn.
But I believe this thread, will clarify you more.
https://forums.alliedmods.net/showthread.php?t=278438
And I believe this feature should be enhanced/fixed in AMXX 1.90
Code to reproduce the issue :
#include <amxmodx>
enum _:ORIGIN_DATA{
Float:Origin[3],
OriginTeam
}
public plugin_init()
{
new TestOrigin[ORIGIN_DATA]
TestOrigin[Origin][0] = 1.0
SpawnEnt(TestOrigin[Origin])
}
SpawnEnt( Float:EntOrigin[3] )
{
server_print("EntOrigin[0]=%f", EntOrigin[0])
}
Error Output :
AMX Mod X Compiler 1.8.3-dev+5181
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team
g:\2018\amx\Array_Tag.sma(14) : error 047: array sizes do not match, or destination array is too small
1 Error.
wget https://raw.githubusercontent.com/alliedmodders/amxmodx/master/support/checkout-deps.sh
bash checkout-deps.sh
cd amxmodx
mkdir build
cd build
python ../configure.py --enable-debug
Checking CC compiler (vendor test gcc)... ['cc', 'test.c', '-o', 'test']
found gcc version 8.2
Checking CXX compiler (vendor test gcc)... ['c++', 'test.cpp', '-o', 'testp']
found gcc version 8.2
env LANG=C ~/.local/bin/ambuild
...
[27117] c++ -pipe -fno-strict-aliasing -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -Wno-format -Wno-format-security -m32 -fvisibility=hidden -Wno-narrowing -Wno-unused-result -Wno-error=sign-compare -Wno-parentheses -g3 -ggdb3 -Wno-invalid-offsetof -std=c++11 -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -fno-exceptions -fno-rtti -DDEBUG -D_DEBUG -D_LINUX -DPOSIX -DLINUX -DAMX_NOPROPLIST -DPAWN_CELL_SIZE=32 -DAMXMODX_BUILD -DAMXX_USE_VERSIONLIB -DAMXX_GENERATED_BUILD -I /home/swank/hlds/q/amxmodx/build/includes -I /home/swank/hlds/q/amxmodx/support/versionlib -I /home/swank/hlds/q/amxmodx/public -I /home/swank/hlds/q/amxmodx/public/sdk -I /home/swank/hlds/q/amxmodx/public/amtl -I /home/swank/hlds/q/amxmodx/public/amtl/amtl -I /home/swank/hlds/q/amxmodx/public/memtools -I /home/swank/hlds/q/amxmodx/third_party -I /home/swank/hlds/q/amxmodx/third_party/hashing -I /home/swank/hlds/q/amxmodx/third_party/zlib -I /home/swank/hlds/q/amxmodx/third_party/utf8rewind -I /home/swank/hlds/q/amxmodx/modules/tfcx -I /home/swank/hlds/q/amxmodx/modules/tfcx/sdk -I /home/swank/hlds/q/metamod-am/metamod -I /home/swank/hlds/q/hlsdk/common -I /home/swank/hlds/q/hlsdk/dlls -I /home/swank/hlds/q/hlsdk/engine -I /home/swank/hlds/q/hlsdk/game_shared -I /home/swank/hlds/q/hlsdk/public -I /home/swank/hlds/q/hlsdk/pm_shared -H -c /home/swank/hlds/q/amxmodx/modules/tfcx/CMisc.cpp -o CMisc.o
/home/swank/hlds/q/amxmodx/modules/tfcx/CMisc.cpp: In member function 'void CPlayer::restartStats(bool)':
/home/swank/hlds/q/amxmodx/modules/tfcx/CMisc.cpp:133:29: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct Stats'; use assignment or value-initialization instead [-Werror=class-memaccess]
memset(&life,0,sizeof(life));
^
In file included from /home/swank/hlds/q/amxmodx/modules/tfcx/CMisc.h:19,
from /home/swank/hlds/q/amxmodx/modules/tfcx/CMisc.cpp:16:
/home/swank/hlds/q/amxmodx/modules/tfcx/CRank.h:25:8: note: 'struct Stats' declared here
struct Stats {
^~~~~
cc1plus: all warnings being treated as errors
Build failed.
uname -a
Linux home 4.18.9-arch1-1-ARCH #1 SMP PREEMPT Wed Sep 19 21:19:17 UTC 2018 x86_64 GNU/Linux
env LANG=C gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 8.2.1 20180831 (GCC)
Fix the oldest plmenu plug-in bug, when using Slap slay menu function, give the player multiple 5 damage, when the player's blood is not enough 5 o'clock, should be executed directly the player! It's more reasonable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.