Raised This Month: $ Target: $400
 0% 

Bug Extra-Items Zombie plague 4.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ploof
Junior Member
Join Date: Aug 2011
Old 08-21-2012 , 15:32   Bug Extra-Items Zombie plague 4.3
Reply With Quote #1

Hello , Sorry for my bad english, but I am french

I would like to know if somebody knows why on my server zombie plague in version 4.3, when have buy extra-item it give ammo pack ?

Exemple :

I have 35 ammo pack on me
I buy unlimited clip who cost 30 ammo pack
And I have 75 ammo pack on me...
What a problem ?!
Normally I shall have of the credit note 5 ammo pack because that it cost 30 ammo

Please help !
__________________
194.105.152.201:27015 [Fr] -[Zombie Jet/Bank/Laser]- > Good's Projet < DediGames XtreM
ploof is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-21-2012 , 16:29   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #2

Then the plugin is causing a problem, attach .sma.
Torge is offline
ploof
Junior Member
Join Date: Aug 2011
Old 08-21-2012 , 20:04   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #3

Hello Torge, thanks for your answer but, i dont see the attach.sma in file scripting...
And i must delete attach.sma or i must download?
__________________
194.105.152.201:27015 [Fr] -[Zombie Jet/Bank/Laser]- > Good's Projet < DediGames XtreM
ploof is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-22-2012 , 01:47   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #4

Just post your unlimited clip SMA code.
Torge is offline
ploof
Junior Member
Join Date: Aug 2011
Old 08-22-2012 , 04:57   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #5

Quote:
Just post your unlimited clip SMA code.
He not it in step that this plugin his the fact with :

Sandbags,Napalm Grenade,Frost Grenade,No recoil,Infection Bomb,Anti Armor Infection and others xDD

Sma code of unlimited clip :

Quote:
/*============================================ ====================================

-------------------------------------------
-*- [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>

/*============================================ ====================================
[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[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }

new g_itemid_infammo, g_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_name, g_item_cost, ZP_TEAM_HUMAN)

register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
}

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

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

// Unlimited clip code
public message_cur_weapon(msg_id, msg_dest, msg_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 weapon, clip
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(3, get_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(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)

// Set max clip on weapon
fm_set_weapon_ammo(weapon_ent, MAXCLIP[weapon])
}
}
}

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

return entity;
}

// Set Weapon Clip Ammo
stock fm_set_weapon_ammo(entity, amount)
{
set_pdata_int(entity, OFFSET_CLIPAMMO, amount, OFFSET_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 }
*/
__________________
194.105.152.201:27015 [Fr] -[Zombie Jet/Bank/Laser]- > Good's Projet < DediGames XtreM

Last edited by ploof; 08-22-2012 at 05:01.
ploof is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-22-2012 , 13:07   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #6

I'm using this plugin too but I can't see anything wrong.. :/

EDIT: Did you edited the main zp plugin ?

Last edited by Torge; 08-22-2012 at 13:08.
Torge is offline
ploof
Junior Member
Join Date: Aug 2011
Old 08-22-2012 , 13:49   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #7

No, i just edited zp_class40.sma for add a new class
__________________
194.105.152.201:27015 [Fr] -[Zombie Jet/Bank/Laser]- > Good's Projet < DediGames XtreM
ploof is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 08-22-2012 , 13:52   Re: Bug Extra-Items Zombie plague 4.3
Reply With Quote #8

Attach SMA then and I'll check it.
Torge is offline
Reply



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 03:52.


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