Raised This Month: $32 Target: $400
 8% 

Solved How to block map weapons like surf_ski_2_go


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-21-2018 , 08:28   How to block map weapons like surf_ski_2_go
Reply With Quote #1

Stripper crashes my server, not a working solution therefore, any way to block these?

If I try to block SDKHook_WeaponCanUse or SDKHook_WeaponEquip then my current weapon disappears.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 04-22-2018 at 04:51.
eyal282 is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 04-21-2018 , 08:50   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #2

Why stripper crash your server and what game?
ESK0 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-21-2018 , 14:04   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #3

Quote:
Originally Posted by ESK0 View Post
Why stripper crash your server and what game?
CSGO, no clue.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
sdz
Senior Member
Join Date: Feb 2012
Old 04-21-2018 , 14:10   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #4

nasty code - set up g_MapItems to suit what you want deleted from the map, place RemoveItems() in OnMapStart
PHP Code:
/*
 * Any items that can be placed on the map
 */
char g_MapItems[][] = 
{
    
"item_ammo_357"//0
    
"item_ammo_357_large"//1
    
"item_ammo_ar2"//2
    
"item_ammo_ar2_altfire"//3
    
"item_ammo_ar2_large"//4
    
"item_ammo_crossbow"//5
    
"item_ammo_pistol"//6
    
"item_ammo_pistol_large"//7
    
"item_ammo_smg1"//8
    
"item_ammo_smg1_large"//9
    
"item_ammo_smg1_grenade"//10
    
"item_battery"//11
    
"item_box_buckshot"//12
    
"item_healthkit"//13
    
"item_healthvial"//14
    
"item_rpg_round"//15
    
"weapon_357"//16
    
"weapon_shotgun"//17
    
"weapon_ar2"//18
    
"weapon_crossbow"//19
    
"weapon_crowbar"//20
    
"weapon_frag"//21
    
"weapon_physcannon"//22
    
"weapon_pistol"//23
    
"weapon_rpg"//24
    
"weapon_smg1"//25
    
"weapon_stunstick" //26
};

/*
 * This is going to delete all items on the map
 */
void RemoveItems()
{
    for(
int X MaxClients 12048X++)
    {
        for(
int Y 027Y++)
        {
            if(
IsValidEntity(X))
            {
                
char sClassname[32];
                
GetEntityClassname(XsClassnamesizeof(sClassname));

                if(
StrEqual(sClassnameg_MapItems[Y], false))
                {
                    
AcceptEntityInput(X"kill");
                }
            }
        }
    }


Last edited by sdz; 04-21-2018 at 14:54.
sdz is offline
pride95
Senior Member
Join Date: Aug 2015
Old 04-21-2018 , 14:42   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #5

Quote:
Originally Posted by ESK0 View Post
Why stripper crash your server and what game?
surf_ski_2_go
GO


if you want to block some weapons on surf_ski_2_go, you should search for game_player_equip entity and check if that entity spawns your desired weapon to block.
pride95 is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 04-22-2018 , 00:58   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #6

About Stripper, get it from http://www.bailopan.net/stripper/snapshots/1.2/
git127 is the build you want. It works on all of my CS:GO servers, can't see why it wouldn't on yours.

Also: mp_weapons_allow_map_placed 0
__________________
retired
shavit is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-22-2018 , 04:23   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #7

Quote:
Originally Posted by shavit View Post
About Stripper, get it from http://www.bailopan.net/stripper/snapshots/1.2/
git127 is the build you want. It works on all of my CS:GO servers, can't see why it wouldn't on yours.

Also: mp_weapons_allow_map_placed 0
About your cvar, doesn't work.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-22-2018 , 04:50   Re: How to block map weapons like surf_ski_2_go
Reply With Quote #8

SOLVED, either in global_filters.cfg or in the desired map's .cfg file in addons/stripper. The classname remover removes the pick-up of the weapon and the second removes the model from the map, without the second one the weapon will still be visible but untouchable, if you wanna hook the touch of the model or something.

Code:
remove:
{
	"classname" "game_player_equip"
}

remove:
{
	"model" "/models/weapons/.*/"
}
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 05-06-2018 at 18:13.
eyal282 is offline
Reply


Thread Tools
Display Modes

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:34.


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