Raised This Month: $ Target: $400
 0% 

[CSS]Remove all waepons?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wyd3x
Senior Member
Join Date: Sep 2012
Old 09-28-2013 , 15:31   [CSS]Remove all waepons?
Reply With Quote #1

How i can Remove all weapons from map when the round start?


thanks
wyd3x is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-28-2013 , 15:40   Re: [CSS]Remove all waepons?
Reply With Quote #2

Are those weapons added on map ?
You could use MM:S plugin Stripper.
Stripper:Source (Updated 2011-04-15)
...addons/stripper/global_filters.cfg

Last edited by Bacardi; 09-28-2013 at 17:27.
Bacardi is offline
wyd3x
Senior Member
Join Date: Sep 2012
Old 09-29-2013 , 00:07   Re: [CSS]Remove all waepons?
Reply With Quote #3

thanks but i want to remove when some plugins start wo work.

like here:
when the plugins start all weapon removed from map and only knife`s
http://pastebin.com/uxw1pEcF
wyd3x is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-29-2013 , 02:25   Re: [CSS]Remove all waepons?
Reply With Quote #4

okay...
This will remove all weapons from map and players. Then give them knives.
Edit code how you like it.

PHP Code:
#include <sdktools>

public OnPluginStart()
{
    
HookEventEx("round_start"eventEventHookMode_PostNoCopy);
}

public 
event(Handle:event, const String:event_name[], bool:dontBroadcast)
{
    
CreateTimer(0.1delay_TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action:delay(Handle:timer)
{
    new 
ent MaxClients+1;
    new 
iStateowner;

    while( (
ent FindEntityByClassname(ent"weapon_*")) != -)
    {
        if( (
iState GetEntProp(entProp_Send"m_iState")) == 0// Weapons that no one carry.
        
{
            
AcceptEntityInput(ent"kill");
        }
        else if(
iState == 1// Weapons that players carry in their pockets
        
{
            
AcceptEntityInput(ent"kill");
        }
        else if(
iState == 2// Weapons that players equip in their Hands
        
{
            
owner GetEntPropEnt(entProp_Send"m_hOwner");
            
AcceptEntityInput(ent"kill");
            if(
owner <= MaxClients)
            {
                
CreateTimer(0.1givesomethingGetClientUserId(owner), TIMER_FLAG_NO_MAPCHANGE);
            }
        }
    }
}

public 
Action:givesomething(Handle:timerany:userid)
{
    new 
client GetClientOfUserId(userid);
    if(
client != && IsClientInGame(client) && GetClientTeam(client) >= && IsPlayerAlive(client))
    {
        
GivePlayerItem(client"weapon_knife");
    }

__________________
Do not Private Message @me
Bacardi 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 02:23.


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