Cerere Plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
X-D3$[T]Ro!
Membru, skill 0
Membru, skill 0
Posts: 83
Joined: 13 Aug 2018, 19:19
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: NU
Fond eXtream: 0
Has thanked: 5 times
Been thanked: 1 time
Contact:

23 Feb 2021, 01:58

Salut etreamcs, doresc si eu un plugin de gloante infinite cu nativa.
TransferGo
User avatar
N3v3rM1nd
Membru, skill +1
Membru, skill +1
Posts: 310
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
Fond eXtream: 0
Location: La mine in casa :D
Has thanked: 67 times
Been thanked: 10 times

23 Feb 2021, 10:35

X-D3$[T]Ro! wrote:
23 Feb 2021, 01:58
Salut etreamcs, doresc si eu un plugin de gloante infinite cu nativa.

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new CSW_MAXAMMO[33]= {-2, 52, 0, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120, 30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, 0, 100, -1, -1}

public plugin_init()
{
	register_event("CurWeapon", "gloante_inf", "be", "1=1")

}
public plugin_natives()	register_native("give_gloante_inf", "event_curweapon")

public event_curweapon(id)
{
	if(!get_pcvar_num(cvar_enable) || !is_user_alive(id))
		return PLUGIN_CONTINUE;
	
	//Get and check weapon ID
	new weaponID= read_data(2)
	if(weaponID==CSW_C4 || weaponID==CSW_KNIFE || weaponID==CSW_HEGRENADE || weaponID==CSW_SMOKEGRENADE || weaponID==CSW_FLASHBANG)
		return PLUGIN_CONTINUE;
	
	if(cs_get_user_bpammo(id, weaponID)!=CSW_MAXAMMO[weaponID])
		cs_set_user_bpammo(id, weaponID, CSW_MAXAMMO[weaponID])
	
	return PLUGIN_CONTINUE;
}

Code: Select all

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Unlimited Clip Ammo"
#define VERSION "1.0"
#define AUTHOR "-Acid-"

// weapons offsets
#define OFFSET_CLIPAMMO        51
#define OFFSET_LINUX_WEAPONS    4
#define fm_cs_set_weapon_ammo(%1,%2)    set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)

// players offsets
#define m_pActiveItem 373

const NOCLIP_WPN_BS    = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))

new const g_MaxClipAmmo[] = 
{
    0,
    13, //CSW_P228
    0,
    10, //CSW_SCOUT
    0,  //CSW_HEGRENADE
    7,  //CSW_XM1014
    0,  //CSW_C4
    30,//CSW_MAC10
    30, //CSW_AUG
    0,  //CSW_SMOKEGRENADE
    15,//CSW_ELITE
    20,//CSW_FIVESEVEN
    25,//CSW_UMP45
    30, //CSW_SG550
    35, //CSW_GALIL
    25, //CSW_FAMAS
    12,//CSW_USP
    20,//CSW_GLOCK18
    10, //CSW_AWP
    30,//CSW_MP5NAVY
    100,//CSW_M249
    8,  //CSW_M3
    30, //CSW_M4A1
    30,//CSW_TMP
    20, //CSW_G3SG1
    0,  //CSW_FLASHBANG
    7,  //CSW_DEAGLE
    30, //CSW_SG552
    30, //CSW_AK47
    0,  //CSW_KNIFE
    50//CSW_P90
}

public plugin_init() 
{
    register_plugin( PLUGIN , VERSION , AUTHOR );
    register_event("CurWeapon" , "Event_CurWeapon" , "be" , "1=1" );
}
public plugin_natives()	register_native("give_gloante_inf", "Event_CurWeapon")

public Event_CurWeapon( id )
{
    new iWeapon = read_data(2)
    if( !( NOCLIP_WPN_BS & (1<<iWeapon) ) )
    {
        fm_cs_set_weapon_ammo( get_pdata_cbase(id, m_pActiveItem) , g_MaxClipAmmo[ iWeapon ] )
    }
}
Post Reply

Return to “Cereri”

  • Information