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

[CS:GO] Remove Dropped Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 05-26-2015 , 16:24   Re: [CS:GO] Remove Dropped Weapons
Reply With Quote #11

ah ok
m_bNightstalker is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 05-26-2015 , 16:27   Re: [CS:GO] Remove Dropped Weapons
Reply With Quote #12

These things only partially solves my problem :/
I want something that strips all players of their guns at the round end as well.
__________________
CAOSK-ESPORTS.COM

Last edited by Schpraaankiii; 05-26-2015 at 16:27.
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 05-27-2015 , 11:03   Re: [CS:GO] Remove Dropped Weapons
Reply With Quote #13

Quote:
Originally Posted by Schpraaankiii View Post
These things only partially solves my problem :/
I want something that strips all players of their guns at the round end as well.
Try it:
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "1.0"

new Handle:h_enablebool:b_enable;

public 
Plugin:myinfo 
{
    
name "Round End Weapon Cleanup",
    
author "Grey83",
    
description "Removes all weapons at the end of round",
    
version PLUGIN_VERSION,
    
url "http://www.sourcemod.net/"
};

public 
OnPluginStart()
{
    
CreateConVar("csgo_rewc_version"PLUGIN_VERSION"The version of the plugin"FCVAR_PLUGIN|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
h_enable CreateConVar("sm_rewc_enable""1""Enables/Disables the plugin"FCVAR_PLUGIN|FCVAR_NOTIFYtrue0.0true1.0);

    
b_enable GetConVarBool(h_enable);
    
HookConVarChange(h_enableOnConVarChanged);
    
HookEvent("round_end"RoundEnd);
}

public 
OnConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[])
{
    if(
convar == h_enableb_enable bool:StringToInt(newValue);
}

public 
RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
    if(
b_enable)
    {
        new 
maxent GetMaxEntities(), String:weapon[64];
        for (new 
i=GetMaxClients();i<maxent;i++)
        {
            if( 
IsValidEdict(i) && IsValidEntity(i) )
            {
                
GetEdictClassname(iweaponsizeof(weapon));
                if(!(
StrContains(weapon"weapon_")) && (StrContains(weapon"weapon_knife") != 0) &&  (StrContains(weapon"weapon_bayonet") != 0))
                        
RemoveEdict(i);
            }
        }

        for(new 
1<= MaxClientsi++)
        {
            if (
IsClientInGame(i) && IsPlayerAlive(i))
                
FakeClientCommand(i"use weapon_knife");
        }
    }

__________________

Last edited by Grey83; 06-07-2015 at 06:09. Reason: Small fixes
Grey83 is offline
Jackol1234
Senior Member
Join Date: Apr 2015
Old 11-20-2015 , 15:55   Re: [CS:GO] Remove Dropped Weapons
Reply With Quote #14

Quote:
Originally Posted by Baws View Post
It's not a deathdrop. It's because on surf maps there's guns in the map and some people spam them so to remove the lag a plugin needs to remove them.
Did you ever get it to cleanup the guns just floating around like at the end of surf_utopia? I can't seem to get it to work.
Jackol1234 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 03:14.


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