Raised This Month: $ Target: $400
 0% 

[REQ] CS 1.6 Bonus Weapon like CS:GO ($20 Paypal)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
crnova
Senior Member
Join Date: Sep 2015
Old 03-26-2016 , 14:07   Re: [REQ] CS 1.6 Bonus Weapon like CS:GO ($20 Paypal)
Reply With Quote #8

1, fixed.
2. should be fixed now
3 & 4. can you explain more please?

Edit: Updated Again

PHP Code:
/* AMX Mod X
*   Ultimate Warcraft 3 Next Generation
*
*  by DA
*  http://www.wc3mods.net
*  http://www.fun-arena.com
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#pragma tabsize    0

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <dbi>
#include <sqlx>
#include <fun>
#include <fakemeta>
#include <engine>
#include <csx>

#define VERSION "2.35.6"

// --- Main includes ---
#include "uwc3ng/constants.inl"        // Load the constants include file
#include "uwc3ng/vars.inl"        // Load the variables include file
#include "uwc3ng/save_common.inl"    // Load the saves include file (how and where we save all things)
#include "uwc3ng/forwards.inl"         // Load the forwards file
#include "uwc3ng/cvars.inl"         // Load the cvars include file
#include "uwc3ng/mysql.inl"        // Load the mysqlx include file
#include "uwc3ng/sqlite.inl"        // Load the sqlite include file
#include "uwc3ng/XP.inl"        // Load the xp include file
#include "uwc3ng/graphics.inl"        // Load the graphics file
#include "uwc3ng/events.inl"        // Load the events file
#include "uwc3ng/handle.inl"        // Load the handle file
#include "uwc3ng/player.inl"        // Load the player file
#include "uwc3ng/admin.inl"        // Load the admin file
#include "uwc3ng/clientcommands.inl"    // Load the clientcommands file
#include "uwc3ng/uwc3ng.inl"        // Load the uwc3ng file
#include "uwc3ng/shared.inl"        // Load the SHARED file
#include "uwc3ng/util.inl"        // Load the util file
#include "uwc3ng/motd.inl"        // Load the motd file
#include "uwc3ng/menu.inl"        // Load the menus file

// --- Skill includes ---
#include "uwc3ng/skillhandle.inl"    // Load the skill handle file
#include "uwc3ng/skills1.inl"        // Load the skills1 file (first 0-7 skills)
#include "uwc3ng/skills2.inl"        // Load the skills2 file (8-15 skills)
#include "uwc3ng/skills3.inl"        // Load the skills3 file (16-24 skills)
#include "uwc3ng/skills4.inl"        // Load the skills4 file (25-33 skills)
#include "uwc3ng/skills5.inl"        // Load the skills5 file (34-42 skills)

// --- Ultimate includes ---
#include "uwc3ng/ultimates.inl"        // Load the ultimates file

// --- Items ---
#include "uwc3ng/items.inl"        // Load the items file

// --- Attributes ---
#include "uwc3ng/attribs.inl"        // Load the attribs file

// --- Resistance ---
#include "uwc3ng/resist.inl"        // Load the resist file

public plugin_init() 
{
    
register_plugin "UWC3 Next Generation"VERSION"DA" );
    
register_cvar "amx_uwc3ng"VERSIONFCVAR_SERVER );
    
    
// Event's
    
register_event "HLTV""on_NewRound""a""1=0""2=0" );
    
register_event "SendAudio""on_TerroristWin""a""2=%!MRAD_terwin" );
    
register_event "SendAudio""on_CTWin"    "a""2=%!MRAD_ctwin" );
    
register_event "WeapPickup""on_WeapPickup""b" ); 
    
register_event "CurWeapon""on_CurWeapon""be""1=1" );
    
register_event "ArmorType""on_ArmorType""be" );
    
register_event "DeathMsg""on_DeathMsg""a" );
    
register_event "SetFOV""on_Zoom""be" );
    
register_event "Battery""on_Battery"    "be" );                    
    
register_logevent "on_EndRound"2"0=World triggered""1=Round_End" );
    
register_logevent "on_PlayerAction"3"1=triggered" );
    
register_logevent "on_FreezeTimeComplete"2"0=World triggered""1=Round_Start" );
    
register_clcmd"drop""getweap")
    
    
// hmm, a sandwich!
    
RegisterHam Ham_Spawn"player""on_PlayerSpawn");
    
RegisterHam Ham_TraceAttack"player""ham_TraceAttack" );
    
    
// From wc3ft
    
gmsgStatusText get_user_msgid"StatusText" );
    
gmsgScreenFade get_user_msgid"ScreenFade" );
    
gmsgScreenShake    get_user_msgid"ScreenShake"    );
    
gmsgDeathMsg get_user_msgid"DeathMsg" );
    
gmsgScoreInfo get_user_msgid"ScoreInfo" );
    
gmsgBarTime get_user_msgid"BarTime" );
    
    
// Register forwards (from fakemeta)
    
register_forward FM_TraceLine"TRIGGER_TraceLine" );
    
register_forward FM_PlayerPreThink"fwd_playerprethink" );
    
    
// Register the menu's
    
register_menu "HandleSkill"1023"HandlePressMenu" );
    
register_menu "Shopmenu12"1023"_ITEM_HandleShopMenu" );
    
register_menu "ShopmenuReplace"1023"ITEM_HandleReplaceItem" );
    
register_menu "AttribMenu"1023"ATTRIB_HandleMenu" );
    
register_menu "ResistMenu"1023"RESIST_HandleMenu" );
    
register_menu "War3Menu"1023"MENU_HandleWar3" );
    
register_menu "Skillsmenu"1023"MENU_HandleSkills" );
    
register_menu "Itemsmenu"1023"MENU_HandleItems" );
    
register_menu "Helpmenu"1023"MENU_HandleHelp" );
    
register_menu "ResetSkillmenu"1023"MENU_HandleResetSkills" );
        
    
// Load the cvars
    
Load_Cvars();
    
    
// Set up the items
    
ITEM_Init();
    
    
// Load the cvars from the cfg
    
set_task0.4"Load_Uwc3NG_CFG" );
    
    
// Set up the XP table
    
set_task0.8"XP_SetUpTable" );
    
    
// Determine the typ where we save our data
    
set_task 1.0"DetermineType" );
    
    
// Start our connecrtions
    
set_task 1.2"Save_Init" );
    
    
// Run the ultimate delay task
    
set_task1.0"ULTIMATE_Delay"TASK_UDELAY""0"b" );
    
    
// Find the map objectives
    
SHARED_FindObjectives();
    
    
// Register all forwards
    
FWD_Register() 
}

public 
plugin_precache()
{
    
// Path for the sounds
    
copyg_szSounds[SOUND_LEVELUP], 63"uwc3ng/levelupcaster.wav" );
    
copyg_szSounds[SOUND_REINCARNATION], 63"uwc3ng/reincarnation.wav" );
    
copyg_szSounds[SOUND_IMPALE], 63"uwc3ng/impalehit.wav" );
    
copyg_szSounds[SOUND_ULTIMATEREADY], 63"uwc3ng/resurrecttarget.wav" );
    
copyg_szSounds[SOUND_HEX], 63"uwc3ng/PolymorphDone.wav" );
    
copyg_szSounds[SOUND_BANISH], 63"uwc3ng/banishcaster.wav" );
    
copyg_szSounds[SOUND_BLINK], 63"uwc3ng/blinkarrival.wav" );
    
copyg_szSounds[SOUND_CARRION], 63"uwc3ng/carrionswarmlaunch1.wav" );
    
copyg_szSounds[SOUND_SHADOWSTRIKE], 63"uwc3ng/shadowstrikebirth.wav" );
    
copyg_szSounds[SOUND_DISPELL], 63"uwc3ng/DispelMagicTarget.wav" );
    
copyg_szSounds[SOUND_VOODOO], 63"uwc3ng/divineshield.wav" );
    
copyg_szSounds[SOUND_TELEPORT], 63"uwc3ng/massteleporttarget.wav" );
    
copyg_szSounds[SOUND_LOCUSTSWARM], 63"uwc3ng/locustswarmloop.wav" );
    
copyg_szSounds[SOUND_LIGHTNING], 63"uwc3ng/lightningbolt.wav" );
    
copyg_szSounds[SOUND_ULTIMATESCAN], 63"turret/tu_ping.wav" );
    
copyg_szSounds[SOUND_ENTANGLING], 63"uwc3ng/entanglingrootstarget1.wav" );
    
copyg_szSounds[SOUND_IMMOLATE], 63"uwc3ng/ImmolationDecay1.wav" );
    
copyg_szSounds[SOUND_IMMOLATE_BURNING], 63"ambience/flameburst1.wav" );
    
copyg_szSounds[SOUND_SUICIDE], 63"ambience/particle_suck1.wav" );
    
copyg_szSounds[SOUND_PICKUPITEM], 63"uwc3ng/pickupitem.wav" );
    
copyg_szSounds[SOUND_TOME], 63"uwc3ng/Tomes.wav" );
    
copyg_szSounds[SOUND_SPELLSHIELD], 63"uwc3ng/SpellShieldImpact1.wav" );
    
copyg_szSounds[SOUND_MEND], 63"items/medshot5.wav" );
    
copyg_szSounds[SOUND_REPAIR], 63"items/suitchargeok1.wav" );
    
    
// Lets make sure we have all of the sound files!!!
    
new iszTmp[128], bool:bError false;

    for ( 
0MAX_SOUNDS; ++)
    {
        
// We only need to look for uwc3ng files (other files should be w/base HLDS installation)
        
if ( containig_szSounds[i], "uwc3ng" ) != -)
        {
            
formatexszTmpcharsmaxszTmp ), "sound/%s"g_szSounds[i] );

            if ( !
file_existsszTmp ) )
            {
                
log_amx"[ERROR] Missing sound file '%s'"szTmp );

                
bError true;
            }
        }
    }

    
// All sound files exist!! Lets continue!
    
if ( !bError )
    {
        
// Precache all files
        
for ( 0MAX_SOUNDS; ++)
        {
            
precache_soundg_szSounds[i] );
        }
    }

    
// We need to throw a runtime error :/
    
else
    {
        
set_fail_state"Sound files are missing, unable to load plugin" );
    }

    
bError false;
    
    
// Path for the sprites
    
copyg_szSprites[SPRITE_REPAIR], 63"sprites/uwc3ng/shield3.spr" );
    
copyg_szSprites[SPRITE_MEND], 63"sprites/uwc3ng/medic3.spr" );
    
copyg_szSprites[SPRITE_REPAIRMEND], 63"sprites/uwc3ng/medshield1.spr" );
    
copyg_szSprites[SPRITE_P_MEND], 63"sprites/uwc3ng/mend1.spr" );
    
copyg_szSprites[SPRITE_P_REPAIR], 63"sprites/uwc3ng/repair1.spr" );
    
copyg_szSprites[SPRITE_LIGHTNING], 63"sprites/lgtning.spr" );
    
copyg_szSprites[SPRITE_FLARE], 63"sprites/blueflare2.spr" );
    
copyg_szSprites[SPRITE_SHOCKWAVE], 63"sprites/shockwave.spr" );
    
copyg_szSprites[SPRITE_BEETLE], 63"sprites/agrunt1.spr" );
    
copyg_szSprites[SPRITE_SHADOWSTRIKE], 63"sprites/animglow01.spr" );
    
copyg_szSprites[SPRITE_TRAIL], 63"sprites/smoke.spr" );
    
copyg_szSprites[SPRITE_SNOW], 63"sprites/snow.spr" );
    
copyg_szSprites[SPRITE_BEAM], 63"sprites/zbeam4.spr" );
    
copyg_szSprites[SPRITE_BURNING], 63"sprites/xfire.spr" );
    
copyg_szSprites[SPRITE_IMMOLATE], 63"sprites/uwc3ng/fireball.spr" );
    
copyg_szSprites[SPRITE_FIREBALL], 63"sprites/zerogxplode.spr" );
    
copyg_szSprites[SPRITE_SMOKE], 63"sprites/steam1.spr" );
    
copyg_szSprites[SPRITE_FIRE], 63"sprites/explode1.spr" );
    
copyg_szSprites[SPRITE_CARRIONBEETLES], 63"sprites/uwc3ng/bm7.spr" );
    
copyg_szSprites[SPRITE_SHADOWSTRIKEDOT], 63"sprites/uwc3ng/poison1.spr" );
        
    
// Now lets make sure the sprites exist
    
for ( 0MAX_SPRITESi++ )
    {

        
// We only need to look for warcraft3 files (other files should be w/base HLDS installation)
        
if ( containig_szSprites[i], "uwc3ng" ) != -)
        {
            if ( !
file_existsg_szSprites[i] ) )
            {
                
log_amx"[ERROR] Missing sprite file '%s'"g_szSprites[i] );

                
bError true;
            }
        }
    }
    
    
// All sprite files exist!! Lets continue!
    
if ( !bError )
    {
        
// Precache all sprites
        
for ( 0MAX_SPRITES; ++)
        {
            
g_iSprites[i] = precache_modelg_szSprites[i] );
        }
    }
    
    
// We need to throw a runtime error :/
    
else
    {
        
set_fail_state"Sprite files are missing, unable to load plugin" );
    }
    
    
// Zombie model for hex
    
if ( file_exists"models/player/zombie/zombie.mdl" ) )
    {
        
precache_model"models/player/zombie/zombie.mdl" );
    }
    
    
// Player models for mole
    
precache_model"models/player/gign/gign.mdl" );
    
precache_model"models/player/sas/sas.mdl" );
    
precache_model"models/player/gsg9/gsg9.mdl" );
    
precache_model"models/player/urban/urban.mdl" );

    
precache_model"models/player/arctic/arctic.mdl" );
    
precache_model"models/player/leet/leet.mdl" );
    
precache_model"models/player/guerilla/guerilla.mdl" );
    
precache_model"models/player/terror/terror.mdl" );
}

public 
client_putinserverid )
{
    if ( !
UWC3NG_Check() )
    {
        return;
    }
    
    
// Check for steam ID pending
    
static szPlayerID[32];
    
get_user_authididszPlayerIDcharsmaxszPlayerID ) );
    
    
// Then the player doesn't have a steam id, lets make them reconnect
    
if ( equal(szPlayerID"STEAM_ID_PENDING") )
    {
        
client_cmdid"reconnect" );
    }
    
    
// Check if the player is a bot
    
new b_IsBot false
    if ( 
is_user_botid ) )
    {
        
b_IsBot true;
    }
    
    
// Check user's cvar if the user isn't a bot and if we're not running a 64-bit server
    
if ( !b_IsBot && !is_amd64_server() && get_pcvar_numCVAR_uwc3ng_minmodels ) )
    {
        
query_client_cvarid"cl_minmodels""_UTIL_CheckMinModelsValue" );
    }
    
    
// The user is connected. Reset the old data
    
if ( !get_pcvar_numCVAR_uwc3ng_save_xp ) )
    {
        
// Reset the old data
        
PLAYER_ResetDataid );
    }
    
    
// The player is a bot. We give him a startlevel if this defined
    
new iBotLevel get_pcvar_numCVAR_uwc3ng_bot_startlevel );
    if ( 
b_IsBot && iBotLevel && !get_pcvar_numCVAR_uwc3ng_ignore_bots ) )
    {
    
// An extra check
        
if ( iBotLevel <= MAX_LEVEL )
        {
            
p_data[id][PLAYER_XP] = g_XPforLevel[iBotLevel];
            
p_data[id][PLAYER_LVL] = iBotLevel;
            
p_data[id][AVAILABLE_SKILL] = iBotLevel;
            
p_data[id][AVAILABLE_ATTRIBS] = ( iBotLevel MAX_ATTRIBS_AVAILABLE MAX_ATTRIBS_AVAILABLE iBotLevel );
            
p_data[id][AVAILABLE_RESISTS] = ( iBotLevel * ( MAX_RESIST_AVAILABLE MAX_LEVEL ) );
        }
    }
    
    
// Detect the startlevel of each player
    
PLAYER_set_startlevelid );
        
    
// Get the user's ID!
    
Save_FetchUniqueIDid );
    
    
// The player is a bot, give him random skills, attributes and resistances
    
if ( b_IsBot && !get_pcvar_numCVAR_uwc3ng_ignore_bots ) )
    {
        
PLAYER_random_abilitysid );
    }
    
    
// Load the xps
    
if ( !b_IsBot )
    {
        
set_task1.0"Player_GetAllXP"id TASK_GETXP );
    }
    
    return;
}

public 
client_connectid )
{
    if ( !
UWC3NG_Check() )
    {
        return;
    }

    
client_cmdid"hud_centerid 0" );
    
    return;
}

public 
client_disconnectid )
{
    if ( !
UWC3NG_Check() )
    {
        return;
    }
    
    
// Save the data from the player 
    
Player_SaveXPidtrue );
    
    
// Reset the complete data
    
PLAYER_ResetDataid );
    
    
// Psychostats
    
if ( get_pcvar_numCVAR_uwc3ng_psychostats ) )
    {
        static 
szWeapon[64];

        static 
szTeam[16], szName[32], szAuthid[32];
        new 
iWeapiUserid get_user_useridid );

        if ( 
is_user_connected(id) )
        {
            
get_user_teamidszTeam15 );
        }
        
get_user_nameidszName31 );
        
get_user_authididszAuthid31 );

        for ( 
iWeap CSW_WAR3_MINiWeap <=CSW_WAR3_MAXiWeap++ )
        {
            
formatszWeapon63"" );

            switch( 
iWeap )
            {
                case 
CSW_LIGHTNINGcopyszWeapon63"Chain Lightning" );
                case 
CSW_SUICIDEcopyszWeapon63"Suicide Bomber" );
                case 
CSW_IMMOLATEcopyszWeapon63"Immolate" );
                case 
CSW_LOCUSTScopyszWeapon63"Locust Swarm" );
                case 
CSW_SERPENTWARDcopyszWeapon63"Serpent Ward" );
                case 
CSW_SHADOWcopyszWeapon63"Shadow Strike" );
                case 
CSW_THORNScopyszWeapon63"Thorns Aura" );
                case 
CSW_CARAPACEcopyszWeapon63"Spiked Carapace" );
                case 
CSW_CARRIONcopyszWeapon63"Carrion Beetles" );
                case 
CSW_ORBcopyszWeapon63"Orb of Annihilation" );
                case 
CSW_CONCOCTIONcopyszWeapon63"Unstable Concoction" );
            }
            
            
replaceszWeapon63" ""_" );

            new 
WEAPON iWeap CSW_WAR3_MIN;
            
            if ( 
iStatsShots[id][WEAPON] || iStatsHits[id][WEAPON] || iStatsKills[id][WEAPON] ||  iStatsHS[id][WEAPON] || iStatsTKS[id][WEAPON] || iStatsDamage[id][WEAPON] || iStatsDeaths[id][WEAPON] || iStatsHead[id][WEAPON] || iStatsChest[id][WEAPON] || iStatsStomach[id][WEAPON] || iStatsLeftArm[id][WEAPON] || iStatsRightArm[id][WEAPON] || iStatsLeftLeg[id][WEAPON] || iStatsRightLeg[id][WEAPON] )
            {

                
// Log tge messafe
                
log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")"szNameiUseridszAuthidszTeamszWeaponiStatsShots[id][WEAPON], iStatsHits[id][WEAPON], iStatsKills[id][WEAPON], iStatsHS[id][WEAPON], iStatsTKS[id][WEAPON], iStatsDamage[id][WEAPON], iStatsDeaths[id][WEAPON] );
                
log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")"szNameiUseridszAuthidszTeamszWeaponiStatsHead[id][WEAPON], iStatsChest[id][WEAPON], iStatsStomach[id][WEAPON], iStatsLeftArm[id][WEAPON], iStatsRightArm[id][WEAPON], iStatsLeftLeg[id][WEAPON], iStatsRightLeg[id][WEAPON] );
                
iStatsShots[id][WEAPON]        = 0;
                
iStatsHits[id][WEAPON]        = 0;
                
iStatsKills[id][WEAPON]        = 0;
                
iStatsHS[id][WEAPON]        = 0;
                
iStatsTKS[id][WEAPON]        = 0;
                
iStatsDamage[id][WEAPON]    = 0;
                
iStatsDeaths[id][WEAPON]    = 0;
                
iStatsHead[id][WEAPON]        = 0;
                
iStatsChest[id][WEAPON]        = 0;
                
iStatsStomach[id][WEAPON]    = 0;
                
iStatsLeftArm[id][WEAPON]    = 0;
                
iStatsRightArm[id][WEAPON]    = 0;
                
iStatsLeftLeg[id][WEAPON]    = 0;
                
iStatsRightLeg[id][WEAPON]    = 0;
            }
        }
    }
}

public 
plugin_end()
{
    if ( !
UWC3NG_Check() )
    {
        return;
    }
    
    
// Destry the forward
    
FWD_Destroy()
    
    
// Save all data from all players
    
Player_SaveAll();
    
    
// Close the connections
    
Save_Close();
}

public 
plugin_natives()
{
    
set_module_filter"module_filter" );
}

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 ( equalmodule"dbi" ) || equalmodule"sqlx" ) )
    {
        return 
PLUGIN_HANDLED;
    }
    
    
// something is wrong. We need a module but can't find it
    
else
    {
        
log_amx"[ERROR] Please enable the '%s' module in your modules.ini file"module );
        
        return 
PLUGIN_CONTINUE;
    }

    return 
PLUGIN_HANDLED;
}

public 
bool:UWC3NG_Check()
{
    if ( 
get_pcvar_numuwc3ng_enabled ) == )
    {
        return 
true;
    }
    
    return 
false;

__________________

Last edited by crnova; 04-22-2016 at 07:16.
crnova is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode