Raised This Month: $ Target: $400
 0% 

How to fix the bug with the weapon with ammunition


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MenJoJo
New Member
Join Date: Dec 2012
Old 12-27-2012 , 15:08   How to fix the bug with the weapon with ammunition
Reply With Quote #1

Hi, I have a problem with the class to call of duty mod, I want to add to it 7 rounds to round of the weapons that he has, but buguje to me gives me 7 only 10 and like shooting it right away I have 3 and I shoot all the time.

*** Google translation


sma my class

Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <engine> 
#include <hamsandwich>
#include <fakemeta_util>
#include <codmod>


new const nazwa[]   = "tesyyt";
new const opis[]        = "test";
new const bronie        = (1<<CSW_AWP) | (1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie   = 5;
new const kondycja  = 5;
new const inteligencja = 0;
new const wytrzymalosc = 5;

new  ma_klase[33];


public plugin_init()
{
	register_plugin(nazwa, "1.0", "ee");
	
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	
	register_event("CurWeapon", "CurWeapon", "be", "1!0")
	
}

public cod_class_enabled(id)
{
	ma_klase[id] = true;
	
}

public cod_class_disabled(id)
{
	ma_klase[id] = false;
}

public CurWeapon(id)
{
new weapon_id = find_ent_by_owner(-1, "weapon_awp", id)
if(weapon_id)
{
        cs_set_weapon_ammo(weapon_id, 7);
        cs_set_user_bpammo( id , CSW_AWP , 0);
}
}
MenJoJo 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 13:24.


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