Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
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
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-23-2009 , 13:54   Re: i want to force survivor to buy this extra item..
Reply With Quote #2

use the php /php tags so its color coded
Doc-Holiday is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-23-2009 , 13:58   Re: i want to force survivor to buy this extra item..
Reply With Quote #3

Quote:
Originally Posted by NcB_Sav View Post
use the php /php tags so its color coded
That isn't necessary.
As long as code is posted in php/code/small/pawn tags and it isn't too long to stretch the page in small/pawn tags then it's fine.
The only situation in which code should be posted differently is if it is posted straight into the post or if it is in quote tags without and code-style tags.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 12-23-2009, 14:07
L|c0000000ol-
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post. Also, don't reply just asking for help.
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-24-2009 , 00:45   Re: i want to force survivor to buy this extra item..
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
That isn't necessary.
As long as code is posted in php/code/small/pawn tags and it isn't too long to stretch the page in small/pawn tags then it's fine.
The only situation in which code should be posted differently is if it is posted straight into the post or if it is in quote tags without and code-style tags.

posting using small or php is easier to read which makes people more likly to help
Doc-Holiday 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 04:16.


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