new const WC3NAME[] = "Warcraft 3 Frozen Throne"; new const WC3AUTHOR[] = "CSSB"; new const WC3VERSION[] = "1.5 Public"; new const WC3DATE[] = __DATE__;
// Let AMX X know that we NEED these modules (as of amx x 1.75) #pragma reqclass xstats #pragma reqlib engine #pragma reqlib fun #pragma reqlib fakemeta #pragma reqlib cstrike #pragma loadlib sqlite #pragma loadlib mysql
public client_putinserver( id ) { if ( !WC3_Check() ) { return; }
// Check for steam ID pending static szPlayerID[32]; get_user_authid( id, szPlayerID, 31 );
// Then the player doesn't have a steam id, lets make them reconnect if ( equal(szPlayerID, "STEAM_ID_PENDING") ) { client_cmd( id, "reconnect" ); }
// Get the user's ID! DB_FetchUniqueID( id );
p_data_b[id][PB_ISCONNECTED] = true;
if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO ) { // Check user's cvar if the user isn't a bot and if we're not running a 64-bit server if ( !is_user_bot( id ) && !is_amd64_server() ) { query_client_cvar( id, "cl_minmodels", "_CS_CheckMinModelsValue" ); }
if ( g_MOD == GAME_CZERO ) { // Only want to run this if: mod is CZ (zbot not supported), client is a bot, // these are CZ bots (bot_quota), and the ham has not been registed yet. if ( (pev(id, pev_flags) & FL_FAKECLIENT) && get_pcvar_num(CVAR_bot_quota) > 0 && !g_bCZBotRegisterHam ) { // Delay for private data to initialize set_task( 0.1, "CZ_BotHookHam", id ) } } }
return; }
public client_connect( id ) { if ( !WC3_Check() ) { return; }
// Reset xp assist for ( new i = 0; i < MAXPLAYERS; i++ ) { g_iDamageDealt[id][i] = 0; }
// Save the user's XP if we have XP to save if ( get_pcvar_num( CVAR_wc3_save_xp ) && !is_user_bot(id) && p_data[id][P_RACE] && p_data[id][P_XP] ) { DB_SaveXP( id, true ); }
if ( get_pcvar_num( CVAR_wc3_psychostats ) ) { static szWeapon[64];
static szTeam[16], szName[32], szAuthid[32]; new iWeap, iUserid = get_user_userid( id );
public client_PreThink( id ) { if ( !WC3_Check() ) { return; }
if ( p_data_b[id][PB_ISCONNECTED] ) { if ( is_user_alive( id ) ) {
// Counter-Strike or Condition Zero if ( g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO ) {
// This is used so we can't hear the undead's footsteps at level 3 if ( SM_GetSkillLevel( id, SKILL_UNHOLYAURA ) > 0 && !p_data_b[id][PB_STUNNED] && !p_data_b[id][PB_SLOWED] ) { new Float:vel[3]; entity_get_vector( id, EV_VEC_velocity, vel );
// When this is true, the user is walking... lets hope :P if ( vector_length( vel ) < 180.0 ) { entity_set_int( id, EV_INT_flTimeStepSound, 999 ); }
// Otherwise if we just set it on the previous tick we need to set it back else if ( entity_get_int(id, EV_INT_flTimeStepSound) > 500 ) { entity_set_int( id, EV_INT_flTimeStepSound, 200 ); } } }
// Amulet of the Cat if ( ITEM_Has( id, ITEM_AMULET ) > ITEM_NONE ) { entity_set_int( id, EV_INT_flTimeStepSound, 999 ); } }
// User is dead else {
// Check to see if spectated player has changed new iTarget = entity_get_int( id, EV_INT_iuser2 );
new Float:fTime = halflife_time();
// Then we are looking at a new player or the last hud message has disappeared if ( g_iSpectatingID[id] != iTarget || g_fLastSpecDisplay[id] <= fTime ) {
// We have a valid target!! if ( SHARED_ValidPlayer( iTarget ) && iTarget != id ) { WC3_ShowSpecInfo( id, iTarget );
//L 12/27/2006 - 16:48:08: [war3ft.amxx] [ERROR] '[CSTRIKE] Invalid player 5' '10' '1' 'Run time error 10: native error (native "cs_set_user_money")'
// We want to ignore invalid player messages that are generated by cstrike! - they're annoying + don't actually matter all that much... /*if ( error_code == AMX_ERR_NATIVE ) { if ( containi( message, "" ) ) { } }*/ }
public module_filter( const module[] ) { // We don't need to display a message, we'll display it later if we need to (when the DB is set up if XP Saving is on) if ( equal( module, "dbi" ) || equal( module, "sqlx" ) ) { return PLUGIN_HANDLED; } // Dammit plugin can't load now :/ - technically we should never get here unless the module doesn't exist in the modules folder else { WC3_Log( true, "Please enable the '%s' module in your modules.ini file", module );
return PLUGIN_CONTINUE; }
return PLUGIN_HANDLED; }
public native_filter( const name[], index, trap ) { if ( !trap ) { return PLUGIN_HANDLED; }
; Чат / сообщения adminchat.amxx ; консольные чат команды ;antiflood.amxx ; предупреждения игроков о флуде ;scrollmsg.amxx ; прокрутка сообщений ;imessage.amxx ; отображение сообщений на экране adminvote.amxx ; команды голосования
; Смена карт galileo.amxx timeleft.amxx ; показывает оставшееся время игры на карте
; Конфигурации pausecfg.amxx ; включает/выключает плагины statscfg.amxx ; позволяет управлять статистикой сервера через меню
; Counter-Strike ;restmenu.amxx ; меню ограничения оружия statsx.amxx ; статистика смертей/убийств подряд (требуется модуль CSX) ;miscstats.amxx ; события в Counter-Strike ;stats_logging.amxx ; статистика использования оружия (требуется модульCSX)