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

[REQ] AWP Only for VIP players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bonqe
Junior Member
Join Date: Jan 2011
Old 01-23-2011 , 04:14   [REQ] AWP Only for VIP players
Reply With Quote #1

Could somebody be so kind & code simple plugin or if its already coded drop me the link, that only players with ADMIN_LEVEL_H flag could buy, take from floor & use AWP Sniper?

I'd like that in awp_ type maps all players could use AWP sniper, but that not really nessesery to put in the plugin, i can just make in CFG to turn off this plugin when awp_ map is choosed.
Bonqe is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-23-2011 , 05:59   Re: [REQ] AWP Only for VIP players
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "1.0.0"

#define MAX_PLAYERS 32

#define XO_WEAPONBOX    4
#define m_rgpPlayerItems_wpnbx_slot1 35

new g_iLastTouchedBox[MAX_PLAYERS+1]

public 
plugin_init()
{
    
register_plugin("Awp VIP"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Spawn"player""Player_Spawn_Post"1)
    
RegisterHam(Ham_Touch"weaponbox""WeaponBox_Touch")

    
register_menucmd(register_menuid("T_BuyRifle"1), MENU_KEY_5"BuyAwp")
    
register_menucmd(register_menuid("CT_BuyRifle"1), MENU_KEY_6"BuyAwp")
}

public 
client_putinserver(id)
{
    
g_iLastTouchedBox[id] = 0
}

public 
Player_Spawn_Postid )
{
    
g_iLastTouchedBox[id] = 0
}

public 
WeaponBox_Touch(iWpnBxid)
{
    if( 
is_user_alive(id) && pev(iWpnBxpev_flags) & FL_ONGROUND )
    {
        new 
iWeapon get_pdata_cbase(iWpnBxm_rgpPlayerItems_wpnbx_slot1XO_WEAPONBOX)
        if( 
iWeapon && cs_get_weapon_id(iWeapon) == CSW_AWP && !CanHaveAwpid ) )
        {
            if( 
g_iLastTouchedBox[id] != iWpnBx )
            {
                if( !
user_has_weapon(idCSW_SCOUT) )
                {
                    
client_print(idprint_center"#Cstrike_TitlesTXT_Cannot_Buy_This")
                }
                
g_iLastTouchedBox[id] = iWpnBx
            
}
            return 
HAM_SUPERCEDE
        
}
    }
    return 
HAM_IGNORED
}

public 
BuyAwp(id)
{
    if( !
CanHaveAwpid ) )
    {
        
client_print(idprint_center"#Cstrike_TitlesTXT_Cannot_Buy_This")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
client_command(id)
{
    static 
szCommand[8]

    if( 
read_argv(0szCommandcharsmax(szCommand)) < )
    {
        return 
CheckArgAwp(idszCommand)
    }
    return 
PLUGIN_CONTINUE
}

public 
CS_InternalCommand(id, const szCommand[])
{
    return 
CheckArgAwp(idszCommand)
}

CheckArgAwp(id, const szCommand[])
{
    static const 
awp[] = "awp"
    
static const magnum[] = "magnum"

    
if(    !CanHaveAwpid )
    &&    ( 
equali(szCommandawp) || equali(szCommandmagnum) )    )
    {
        
client_print(idprint_center"#Cstrike_TitlesTXT_Cannot_Buy_This")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

bool:CanHaveAwpid )
{
    return !!(
get_user_flags(id) & ADMIN_LEVEL_H)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Niksa
Junior Member
Join Date: Apr 2012
Old 04-12-2012 , 17:46   Re: [REQ] AWP Only for VIP players
Reply With Quote #3

Can you help me bcs i didn't find it i have an only fy snow server and i want a plugin where only admins with flag t can pick awp on fy_snow and normal players can not they drop it and a text appear "awp is only for vip use" sorry for bad english please help me ty
Niksa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:55   Re: [REQ] AWP Only for VIP players
Reply With Quote #4

That's what that plugin does, for VIP's with ADMIN_LEVEL_H (flag 't') access.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Niksa
Junior Member
Join Date: Apr 2012
Old 04-13-2012 , 03:57   Re: [REQ] AWP Only for VIP players
Reply With Quote #5

I tried 2 time the plugin doesn't work i complied it put in plugins and wrote in plugins.ini and i restart my server i play only fy_snow on my server and everybody can pick the awp normal players and admins with flag t can you make me another that admins with flag t can use it only and normal players drop it and a text appear "awp is only for vip use" sorry for bad english ty

Last edited by Niksa; 04-13-2012 at 07:00.
Niksa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-13-2012 , 09:39   Re: [REQ] AWP Only for VIP players
Reply With Quote #6

Are you sure the plugin is running?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Niksa
Junior Member
Join Date: Apr 2012
Old 04-13-2012 , 09:50   Re: [REQ] AWP Only for VIP players
Reply With Quote #7

Yes i tried 2 times doesn't work everybody can pick it
Niksa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-13-2012 , 10:21   Re: [REQ] AWP Only for VIP players
Reply With Quote #8

Run it again and post the output of these commands while it is running:
rcon meta list
rcon amxx plugins
rcon meta version
rcon version
status
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 04-14-2012, 12:22
sadboy
This message has been deleted by Exolent[jNr]. Reason: Don't hijack threads.
Old 04-14-2012, 12:25
wickedd
This message has been deleted by Exolent[jNr]. Reason: Don't hijack threads.
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:09.


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