Raised This Month: $ Target: $400
 0% 

Remove Weapons on new round.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 07-18-2008 , 19:11   Remove Weapons on new round.
Reply With Quote #1

Hi i need something that can remove weapons every few rounds definable by a cvar or something. but let ppl still have there knife. Its for a KA Server and it can get very annoying when they get a gun and use it for 10-15 rounds. Thank you to anyone who can help me with this.
EvolDay is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-18-2008 , 19:27   Re: Remove Weapons on new round.
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fun> // i'm too lazy right now to add fakemeta conversion :p

new g_rounds;

new 
strip_rounds;

new 
g_max_players;

public 
plugin_init()
{
    
register_plugin("Strip Weapons""0.1""Exolent");
    
    
register_event("HLTV""EventNewRound""a""1=0""2=0");
    
register_event("TextMsg""EventRestartRound""a""2&#Game_C""2&#Game_w");
    
    
strip_rounds register_cvar("strip_rounds""5"00.0);
    
    
g_max_players get_maxplayers();
    
    return 
PLUGIN_CONTINUE;
}

public 
EventNewRound()
{
    if( ++
g_rounds >= get_pcvar_num(strip_rounds) )
    {
        
set_task(1.0"TaskStripWeapons"0""0""0);
        
        
g_rounds 0;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
TaskStripWeapons()
{
    for( new 
plr 1plr <= g_max_playersplr++ )
    {
        if( 
is_user_connected(plr) )
        {
            
strip_user_weapons(plr);
            
give_item(plr"weapon_knife");
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
EventRestartRound()
{
    
g_rounds 0;
    
    return 
PLUGIN_CONTINUE;

There is a way around this though.
However, I got rather bored and decided to let another coder pick it up if they feel like it.
All you have to do is drop it at the beginning of each round.
Just register FM_SetModel and detect weapon drop, and remove the entity.
You could just get the "No Weapon Drop" made by VEN.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
EvolDay
Senior Member
Join Date: Apr 2008
Location: Canada
Old 07-18-2008 , 23:00   Re: Remove Weapons on new round.
Reply With Quote #3

Thank you man +K
EvolDay is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-20-2008 , 05:44   Re: Remove Weapons on new round.
Reply With Quote #4

exolent u can do it for scotzknivez server? becouse the plugin dont work in this map
Alucard^ is offline
Send a message via Skype™ to Alucard^
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 06:01.


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