Raised This Month: $4 Target: $400
 1% 

[BB] Ammo-Pack: Shop Items


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
crnova
Senior Member
Join Date: Sep 2015
Old 02-24-2016 , 17:53   [BB] Ammo-Pack: Shop Items
Reply With Quote #1

[BB] Ammo-Pack: Shop Items



Description:

- Shop Items for my Ammo-Pack System , will be posted here.
__________________

Last edited by crnova; 02-24-2016 at 18:12.
crnova is offline
crnova
Senior Member
Join Date: Sep 2015
Old 02-24-2016 , 17:58   Re: [BB] Ammo Pack: Shop Items
Reply With Quote #2

Shop Item: Bazooka
Author: Vechta



Description:

- Bazooka (Cost: 500 Ammo-Packs)

Requirements:

- AMXMODX 1.8+
- Base Builder
- Ammo-Pack System
- Modules
Code:
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <xs>
#include <bb_ammopacks>
#include <basebuilder>
Cvars:

PHP Code:
// Delay - How long it will be taken to reload Bazooka
// default "15"
ap_bazooka_delay 15

// Damage - How many damagen taken if touching ground
// default "1000"
ap_bazooka_damage 1000

// Radius - Radius of damage if rocket touch ground
// default "250"
ap_bazooka_radius 250

// Normal shoot speed - Bazooka's rocket Speed on Normal shoot
// default "800"
ap_bazooka_speed 800

// Homing shoot speed - Bazooka's rocket Speed on Homing shoot
// default "350"
ap_bazooka_homing_speed 350

// Camera shoot speed - Bazooka's rocket Speed on Camera shoot
// default "300"
ap_bazooka_camera_speed 300 

Credits:

- Vechta for the bazooka.


Installation:

- 'bb_ap_bazooka.amxx' will go in 'addons\amxmodx\plugins' folder
- Open 'plugins.ini' that is found in 'addons\amxmodx\configs' folder, and add the line 'bb_ap_bazooka.amxx' without the '

Downloads are down below.
Attached Files
File Type: sma Get Plugin or Get Source (bb_ap_bazooka.sma - 503 views - 17.8 KB)
__________________

Last edited by crnova; 03-20-2016 at 08:57.
crnova is offline
KING Army
Member
Join Date: Mar 2016
Old 06-11-2017 , 12:47   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #3

i did this but its not working please help

PHP Code:
/*================================================================================
    
    -------------------------------------------
    -*- [ZP] Extra Item: Unlimited Clip 1.0 -*-
    -------------------------------------------
    
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    
    This item/upgrade gives players unlimited clip ammo for a single round.
    
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <bb_ammopacks>


/*================================================================================
 [Plugin Customization]
=================================================================================*/

new const g_item_name[] = { "Unlimited Clip (single round)" }
const 
g_item_cost 10

/*============================================================================*/

// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO 51
#else
const OFFSET_CLIPAMMO 65
#endif
const OFFSET_LINUX_WEAPONS 4

// Max Clip for weapons
new const MAXCLIP[] = { -113, -11017, -1303013020253035251220,
            
10301008303020273030, -150 }

new 
g_itemid_infammog_has_unlimited_clip[33]

public 
plugin_init()
{
    
register_plugin("[ZP] Extra: Unlimited Clip""1.0""MeRcyLeZZ")
    
    
g_itemid_infammo zp_register_extra_item(g_item_nameg_item_costZP_TEAM_HUMAN)    
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
    
bb_shop_item_add"UC"2002"zp_extra_item_selected")

}

// Player buys our upgrade, set the unlimited ammo flag
public zp_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid_infammo)
        
g_has_unlimited_clip[player] = true
}

// Reset flags for all players on newround
public event_round_start()
{
    for (new 
idid <= 32id++) g_has_unlimited_clip[id] = false;
}

// Unlimited clip code
public message_cur_weapon(msg_idmsg_destmsg_entity)
{
    
// Player doesn't have the unlimited clip upgrade
    
if (!g_has_unlimited_clip[msg_entity])
        return;
    
    
// Player not alive or not an active weapon
    
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
    
    static 
weaponclip
    weapon 
get_msg_arg_int(2// get weapon ID
    
clip get_msg_arg_int(3// get weapon clip
    
    // Unlimited Clip Ammo
    
if (MAXCLIP[weapon] > 2// skip grenades
    
{
        
set_msg_arg_int(3get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
        
        
if (clip 2// refill when clip is nearly empty
        
{
            
// Get the weapon entity
            
static wname[32], weapon_ent
            get_weaponname
(weaponwnamesizeof wname 1)
            
weapon_ent fm_find_ent_by_owner(-1wnamemsg_entity)
            
            
// Set max clip on weapon
            
fm_set_weapon_ammo(weapon_entMAXCLIP[weapon])
        }
    }
}

// Find entity by its owner (from fakemeta_util)
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) {}
    
    return 
entity;
}

// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entityamount)
{
    
set_pdata_int(entityOFFSET_CLIPAMMOamountOFFSET_LINUX_WEAPONS);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/ 
it says

Code:
L 06/11/2017 - 15:41:06: [AMXX] Plugin "zp_extra_unlimited_clip.amxx" failed to load: Plugin uses an unknown function (name "zp_register_extra_item") - check your modules.ini.
__________________
KING Army is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-12-2017 , 12:51   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #4

Quote:
Originally Posted by KING Army View Post
i did this but its not working please help

PHP Code:
/*================================================================================
    
    -------------------------------------------
    -*- [ZP] Extra Item: Unlimited Clip 1.0 -*-
    -------------------------------------------
    
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    
    This item/upgrade gives players unlimited clip ammo for a single round.
    
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <bb_ammopacks>


/*================================================================================
 [Plugin Customization]
=================================================================================*/

new const g_item_name[] = { "Unlimited Clip (single round)" }
const 
g_item_cost 10

/*============================================================================*/

// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO 51
#else
const OFFSET_CLIPAMMO 65
#endif
const OFFSET_LINUX_WEAPONS 4

// Max Clip for weapons
new const MAXCLIP[] = { -113, -11017, -1303013020253035251220,
            
10301008303020273030, -150 }

new 
g_itemid_infammog_has_unlimited_clip[33]

public 
plugin_init()
{
    
register_plugin("[ZP] Extra: Unlimited Clip""1.0""MeRcyLeZZ")
    
    
g_itemid_infammo zp_register_extra_item(g_item_nameg_item_costZP_TEAM_HUMAN)    
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
    
bb_shop_item_add"UC"2002"zp_extra_item_selected")

}

// Player buys our upgrade, set the unlimited ammo flag
public zp_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid_infammo)
        
g_has_unlimited_clip[player] = true
}

// Reset flags for all players on newround
public event_round_start()
{
    for (new 
idid <= 32id++) g_has_unlimited_clip[id] = false;
}

// Unlimited clip code
public message_cur_weapon(msg_idmsg_destmsg_entity)
{
    
// Player doesn't have the unlimited clip upgrade
    
if (!g_has_unlimited_clip[msg_entity])
        return;
    
    
// Player not alive or not an active weapon
    
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
        return;
    
    static 
weaponclip
    weapon 
get_msg_arg_int(2// get weapon ID
    
clip get_msg_arg_int(3// get weapon clip
    
    // Unlimited Clip Ammo
    
if (MAXCLIP[weapon] > 2// skip grenades
    
{
        
set_msg_arg_int(3get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
        
        
if (clip 2// refill when clip is nearly empty
        
{
            
// Get the weapon entity
            
static wname[32], weapon_ent
            get_weaponname
(weaponwnamesizeof wname 1)
            
weapon_ent fm_find_ent_by_owner(-1wnamemsg_entity)
            
            
// Set max clip on weapon
            
fm_set_weapon_ammo(weapon_entMAXCLIP[weapon])
        }
    }
}

// Find entity by its owner (from fakemeta_util)
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
    while ((
entity engfunc(EngFunc_FindEntityByStringentity"classname"classname)) && pev(entitypev_owner) != owner) {}
    
    return 
entity;
}

// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entityamount)
{
    
set_pdata_int(entityOFFSET_CLIPAMMOamountOFFSET_LINUX_WEAPONS);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/ 
it says

Code:
L 06/11/2017 - 15:41:06: [AMXX] Plugin "zp_extra_unlimited_clip.amxx" failed to load: Plugin uses an unknown function (name "zp_register_extra_item") - check your modules.ini.
why were you trying to do this in the first place? this is a sepparate ammo-pack(currency) system for basebuilder mod. why would you use it for zombie plague, when it has it`s own
btw. you`re missing a zombie plague files.
__________________
I accept private plugin requests.

Last edited by DjSoftero; 06-12-2017 at 12:52. Reason: btw
DjSoftero is offline
KING Army
Member
Join Date: Mar 2016
Old 06-15-2017 , 18:12   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #5

lol no you dont get it i'm trying to use it for basbuilder
__________________
KING Army is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-16-2017 , 16:11   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #6

Quote:
Originally Posted by KING Army View Post
lol no you dont get it i'm trying to use it for basbuilder
then why would you include zombieplague include file? btw, your error is caused, because you don`t have zomie plague installed
__________________
I accept private plugin requests.

Last edited by DjSoftero; 06-16-2017 at 16:13.
DjSoftero is offline
KING Army
Member
Join Date: Mar 2016
Old 06-24-2017 , 02:37   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #7

so can i just remove #include <zombieplague> and its gonna work ?

EDIT : i removed zombieplague include still not working :p
__________________

Last edited by KING Army; 06-24-2017 at 02:39.
KING Army is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 06-24-2017 , 13:37   Re: [BB] Ammo-Pack: Shop Items
Reply With Quote #8

Quote:
Originally Posted by KING Army View Post
so can i just remove #include <zombieplague> and its gonna work ?

EDIT : i removed zombieplague include still not working :p
jeez, this whole plugin has to be remade
__________________
I accept private plugin requests.
DjSoftero is offline
Reply


Thread Tools
Display Modes

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 05:33.


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