Raised This Month: $51 Target: $400
 12% 

No recoil + unlimited clip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jievylook
Senior Member
Join Date: Sep 2018
Old 07-05-2019 , 00:32   No recoil + unlimited clip
Reply With Quote #1

Hi all,
I need a plugin that complies with the following function, not recoil + unlimited clip and are for VIP users. is for a zp server
jievylook is offline
Noam
Member
Join Date: Jun 2019
Old 07-05-2019 , 00:55   Re: No recoil + unlimited clip
Reply With Quote #2

Hey , done
Enjoy
Attached Files
File Type: sma Get Plugin or Get Source (zp_unlimitedclipVIP.sma - 333 views - 3.4 KB)
File Type: sma Get Plugin or Get Source (zp_norecoilVIP.sma - 483 views - 2.1 KB)
Noam is offline
jievylook
Senior Member
Join Date: Sep 2018
Old 07-05-2019 , 14:28   Re: No recoil + unlimited clip
Reply With Quote #3

Quote:
Originally Posted by Noam View Post
Hey , done
Enjoy
Sorry if I was not express myself well.

I need it combined to both features in a single plugin
jievylook is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-05-2019 , 15:26   Re: No recoil + unlimited clip
Reply With Quote #4

It doesn't matter if it's one or two plugins.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
jievylook
Senior Member
Join Date: Sep 2018
Old 07-07-2019 , 11:42   Re: No recoil + unlimited clip
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
It doesn't matter if it's one or two plugins.

I need it combined to improve the gameplay. The player would only have to select an item to obtain these two benefits.
jievylook is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 07-07-2019 , 12:17   Re: No recoil + unlimited clip
Reply With Quote #6

Try this one...
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>
#include <zmvip>

new g_norecoil[33]
new 
Floatcl_pushangle[33][3]
new 
g_itemid_norecoilg_maxplayers

// 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_has_unlimited_clip[33]

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

public 
plugin_init()
{
    
register_plugin("[ZP] Extra Item: No Recoil+Unlimited Clip""0.1.0""CarsonMotion")

    
g_itemid_norecoil zv_register_extra_item("No Recoil+Unlimited Clip""(Single Round)"15ZV_TEAM_HUMAN)

    new 
weapon_name[24]
    for (new 
1<= 30i++)
    {
        if (!(
WEAPONS_BITSUM << i) && get_weaponname(iweapon_name23))
        {
            
RegisterHam(Ham_Weapon_PrimaryAttackweapon_name"fw_Weapon_PrimaryAttack_Pre")
            
RegisterHam(Ham_Weapon_PrimaryAttackweapon_name"fw_Weapon_PrimaryAttack_Post"1)
        }
    }

    
register_event("HLTV""event_round_start""a""1=0""2=0")

    
g_maxplayers get_maxplayers()

        
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
}

public 
zv_extra_item_selected(playeritemid)
{
    if (
itemid == g_itemid_norecoil)
    {
        
g_norecoil[player] = true
                g_has_unlimited_clip
[player] = true
        client_print
(playerprint_chat"[ZP] You have bought No Recoil+Unlimited Clip for your weapon!")
    }
}

public 
zp_user_infected_post(id)
    
g_norecoil[id] = false

public client_connect(id)
    
g_norecoil[id] = false

public event_round_start()
{
    for (new 
id 1id <= g_maxplayersid++)
        {
        
g_norecoil[id] = false
                g_has_unlimited_clip
[id] = false
        
}
}

public 
fw_Weapon_PrimaryAttack_Pre(entity)
{
    new 
id pev(entitypev_owner)

    if (
g_norecoil[id])
    {
        
pev(idpev_punchanglecl_pushangle[id])
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;
}

public 
fw_Weapon_PrimaryAttack_Post(entity)
{
    new 
id pev(entitypev_owner)

    if (
g_norecoil[id])
    {
        new 
Floatpush[3]
        
pev(idpev_punchanglepush)
        
xs_vec_sub(pushcl_pushangle[id], push)
        
xs_vec_mul_scalar(push0.0push)
        
xs_vec_add(pushcl_pushangle[id], push)
        
set_pev(idpev_punchanglepush)
        return 
HAM_IGNORED;
    }
    return 
HAM_IGNORED;
}

// 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);

__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
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:10.


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