Raised This Month: $ Target: $400
 0% 

i want to force survivor to buy this extra item..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
L|c0000000ol-
Junior Member
Join Date: Dec 2009
Old 12-23-2009 , 11:10   i want to force survivor to buy this extra item..
Reply With Quote #1

HTML Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

new g_norecoil[33]
new Float: cl_pushangle[33][3]
new g_maxplayers

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", "0.1.0", "fezh")
    new weapon_name[24]
    for (new i = 1; i <= 30; i++)
    {
        if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
        {
            RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
            RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
        }
    }
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
         zp_get_user_survivor(i++)
    g_maxplayers = get_maxplayers()
}

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 = 1; id <= g_maxplayers; id++)
        g_norecoil[id] = false

public fw_Weapon_PrimaryAttack_Pre(entity)
{
    new id = pev(entity, pev_owner)

    if (g_norecoil[id])
    {
        pev(id, pev_punchangle, cl_pushangle[id])
        return HAM_IGNORED;
    }
    return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
    new id = pev(entity, pev_owner)

    if (g_norecoil[id])
    {
        new Float: push[3]
        pev(id, pev_punchangle, push)
        xs_vec_sub(push, cl_pushangle[id], push)
        xs_vec_mul_scalar(push, 0.0, push)
        xs_vec_add(push, cl_pushangle[id], push)
        set_pev(id, pev_punchangle, push)
        return HAM_IGNORED;
    }
    return HAM_IGNORED;
}

public zp_force_buy_extra_item(id, g_norecoil, 1)
ima failure.. pls someone help me.. i want to force the survivor to buy this item
L|c0000000ol- is offline
 


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 04:16.


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