Raised This Month: $ Target: $400
 0% 

Help Edit with Limiting Weapon Giving Per Round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kitami
Senior Member
Join Date: Jun 2006
Location: Toronto
Old 07-31-2009 , 21:41   Help Edit with Limiting Weapon Giving Per Round
Reply With Quote #1

This script is to give admins an awp with full bullets and take away any primary weapons, I was wondering if someone could edit this to make it so you can only use this command once per round? Also I have this same script for the M4 & AK I was wondering if its better to use 3 different scripts or merge them all together?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta>
 
#define PLUGIN    "Test"
#define AUTHOR    "Jim"
#define VERSION    "1.0"
 
#define ACCESS_FLAG ADMIN_VOTE
 
new const pri[18] =
{
    
CSW_AK47,
    
CSW_AUG,
    
CSW_AWP,
    
CSW_FAMAS,
    
CSW_G3SG1,
    
CSW_GALI,
    
CSW_M249,
    
CSW_M3,
    
CSW_M4A1,
    
CSW_MAC10,
    
CSW_MP5NAVY,
    
CSW_P90,
    
CSW_SCOUT,
    
CSW_SG550,
    
CSW_SG552,
    
CSW_TMP,
    
CSW_UMP45,
    
CSW_XM1014
}
 
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("amx_awpme""give_awp"ACCESS_FLAG"give an awp")
}
 
public 
give_awp(idlvlcid)
{
    if(!
cmd_access(idlvlcid1))
        return 
PLUGIN_HANDLED
    
    
if(is_user_alive(id))
    {
        new 
weapons pev(idpev_weapons) & ~(1<<31)
        for(new 
i18; ++i)
        {
            if(
weapons & (1<<pri[i]))
            {
                new 
wpname[20]
                
get_weaponname(pri[i], wpname19)
                
engclient_cmd(id"drop"wpname)
                break
            }
        }
        
        
give_item(id"weapon_awp")
        
cs_set_user_bpammo(idCSW_AWP30
    }
    return 
PLUGIN_HANDLED

__________________
You know what I'd like to be? I mean if I had my goddamn choice, I'd just be the catcher in the rye and all.
Kitami is offline
 



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 18:21.


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