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

REQUEST: Dual Elites for CT.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Preyas3
Member
Join Date: Aug 2011
Location: Sydney, Australia
Old 08-25-2011 , 03:02   REQUEST: Dual Elites for CT.
Reply With Quote #1

Title says all.
Preyas3 is offline
Stressful
Senior Member
Join Date: Feb 2011
Old 08-25-2011 , 03:52   Re: REQUEST: Dual Elites for CT.
Reply With Quote #2

You need more description . During round start , CT get it or ?
__________________
Stressful is offline
Preyas3
Member
Join Date: Aug 2011
Location: Sydney, Australia
Old 08-25-2011 , 08:11   Re: REQUEST: Dual Elites for CT.
Reply With Quote #3

CT can buy it.
Preyas3 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-25-2011 , 08:28   Re: REQUEST: Dual Elites for CT.
Reply With Quote #4

Gonna do that, give me some time.

Here you go:

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>

#define PLUGIN "Buy Elite for CT's"
#define VERSION "1.0"
#define AUTHOR "AMXX Community"

new cvar_costcvar_ammo

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /elite""buy_elite")
    
    
cvar_cost register_cvar("amx_elite_cost""1000")
    
cvar_ammo register_cvar("amx_elite_ammo""120")
}

public 
buy_elite(id)
{
    if(!
is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT || user_has_weapon(idCSW_ELITE))
    {
        
client_print(idprint_center"#Cstrike_TitlesTXT_Cannot_Buy_This")
        return 
PLUGIN_HANDLED
    
}
    
    new 
money cs_get_user_money(id)
    new 
cost get_pcvar_num(cvar_cost)
    
    if(
money >= cost)
    {
        
cs_set_user_money(idmoney cost)
        
        
give_item(id"weapon_elite")
        
cs_set_user_bpammo(idCSW_ELITEget_pcvar_num(cvar_ammo))
    }
    else
    {
        
client_print(idprint_center"#Cstrike_TitlesTXT_Not_Enough_Money")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.

Last edited by bibu; 08-25-2011 at 09:25.
bibu is offline
Preyas3
Member
Join Date: Aug 2011
Location: Sydney, Australia
Old 08-26-2011 , 01:41   Re: REQUEST: Dual Elites for CT.
Reply With Quote #5

Thanks!
Preyas3 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-26-2011 , 02:20   Re: REQUEST: Dual Elites for CT.
Reply With Quote #6

cs_set_user_bpammo(id, CSW_ELITE, get_pcvar_num(cvar_ammo))

You shouldn't add it like this, you should first retrieve the amount of bpammo the player have to make sure you don't lowering that ammo, may be add ammo and set a max limit (Ham_AddAmmo).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
dimaspaf14
New Member
Join Date: Oct 2020
Old 10-12-2020 , 08:04   Re: REQUEST: Dual Elites for CT.
Reply With Quote #7

When i play the game with this plugins there a bug that i find on this plugins.
the bug is when i have a secondary weapon, then i buy elites, i have 2 pistols.
when i dropped one of them, the player is'nt pickup 2 pistol anymore...
dimaspaf14 is offline
Reply


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 06:48.


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