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: 89
Joined: 13 Aug 2018, 20: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.
RoyalServer 2
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 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
  • Who is online

    Users browsing this forum: No registered users and 28 guests