Raised This Month: $202 Target: $400
 50% 

[CS:GO] Weapon goes through solid wall


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-09-2021 , 15:04   [CS:GO] Weapon goes through solid wall
Reply With Quote #1

PHP Code:

            int entity 
CreateEntityByName("func_wall_toggle");
            if (
entity != -1)
            {
                
DispatchKeyValueVector(entity"origin"zoneInfo.vecOrigin);
                
                
DispatchSpawn(entity);
                
ActivateEntity(entity);    
                
                
SetEntityModel(entity"models/error.mdl");
                
                
SetEntProp(entityProp_Send"m_nSolidType"2);
                
SetEntProp(entityProp_Send"m_fEffects"GetEntProp(entityProp_Send"m_fEffects") | EF_NODRAW); 
                
                
SetEntPropVector(entityProp_Data"m_vecMins"zoneInfo.vecMins);
                
SetEntPropVector(entityProp_Data"m_vecMaxs"zoneInfo.vecMaxs);
                
                
SDKHook(entitySDKHook_StartTouchPostSDK_RestrictedZoneTouch);
                
                
renderZones true;
            } 
Im creating solid walls like this. Players cannot go through these walls, but you can drop weapons through them. How can I make them solid to weapons as well? (I'm making a bombsite restrictor plugin, players must not drop C4 through them).

If I change func_wall_toggle to func_brush, its the same thing ...
__________________

Last edited by Ilusion9; 01-09-2021 at 15:06.
Ilusion9 is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 01-14-2021 , 06:00   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #2

PHP Code:
enum SolidType_t
{
    
SOLID_NONE            0,    // no solid model
    
SOLID_BSP            1,    // a BSP tree
    
SOLID_BBOX            2,    // an AABB
    
SOLID_OBB            3,    // an OBB (not implemented yet)
    
SOLID_OBB_YAW        4,    // an OBB, constrained so that it can only yaw
    
SOLID_CUSTOM        5,    // Always call into the entity for tests
    
SOLID_VPHYSICS        6,    // solid vphysics object, get vcollide from the model and collide with that
    
SOLID_LAST,
}; 
Try each of these. If it's not working, try with SetEntProp(client, Prop_Data, "m_CollisionGroup", NUMBER);

PHP Code:
enum COLISIONS_GROPUS
{
    
COLLISION_GROUP_NONE 0,
    
COLLISION_GROUP_DEBRIS,                // Collides with nothing but world and static stuff
    
COLLISION_GROUP_DEBRIS_TRIGGER,        // Same as debris, but hits triggers
    
COLLISION_GROUP_INTERACTIVE_DEBRIS// Collides with everything except other interactive debris or debris
    
COLLISION_GROUP_INTERACTIVE,        // Collides with everything except interactive debris or debris
    
COLLISION_GROUP_PLAYER,
    
COLLISION_GROUP_BREAKABLE_GLASS,
    
COLLISION_GROUP_VEHICLE,
    
COLLISION_GROUP_PLAYER_MOVEMENT,    // For HL2, same as Collision_Group_Player  
    
COLLISION_GROUP_NPC,                // Generic NPC group
    
COLLISION_GROUP_IN_VEHICLE,            // for any entity inside a vehicle
    
COLLISION_GROUP_WEAPON,                // for any weapons that need collision detection
    
COLLISION_GROUP_VEHICLE_CLIP,        // vehicle clip brush to restrict vehicle movement
    
COLLISION_GROUP_PROJECTILE,            // Projectiles!
    
COLLISION_GROUP_DOOR_BLOCKER,        // Blocks entities not permitted to get near moving doors
    
COLLISION_GROUP_PASSABLE_DOOR,        // Doors that the player shouldn't collide with
    
COLLISION_GROUP_DISSOLVING,            // Things that are dissolving are in this group
    
COLLISION_GROUP_PUSHAWAY,            // Nonsolid on client and server, pushaway in player code
    
COLLISION_GROUP_NPC_ACTOR,            // Used so NPCs in scripts ignore the player.
}

...

SetEntProp(clientProp_Data"m_CollisionGroup"flag); 
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545
cristian20042 is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-16-2021 , 08:05   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #3

Already tried these settings, maybe it's something wrong with the model, or because it's not in the OnLevelInit keyvalues...
I think I will create trigger_bomb_reset entities, with the same size and in the same place with func_wall_toggle.
__________________

Last edited by Ilusion9; 01-16-2021 at 10:15.
Ilusion9 is offline
ESK0
Veteran Member
Join Date: May 2014
Location: Czech Republic
Old 01-19-2021 , 05:42   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #4

Does your model have collision model?
__________________
ESK0 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-19-2021 , 06:58   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #5

Quote:
"models/error.mdl"
ESKO is right, your model does not have a phymodel so you should try another one like(just for test) "models/props/cs_office/vending_machine.mdl"

Also this might be usefull https://forums.alliedmods.net/showthread.php?t=129597
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<

Last edited by andi67; 01-19-2021 at 07:01.
andi67 is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-19-2021 , 11:50   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #6

Quote:
Originally Posted by andi67 View Post
ESKO is right, your model does not have a phymodel so you should try another one like(just for test) "models/props/cs_office/vending_machine.mdl"

Also this might be usefull https://forums.alliedmods.net/showthread.php?t=129597
I've changed the model to "models/props/cs_office/vending_machine.mdl" and same result. I created trigger_bomb_reset entities and c4 is teleported back to the player (exactly how de_vertigo does).
__________________
Ilusion9 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-19-2021 , 12:14   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #7

"func_wall_toggle"


Than maybe try func_brush it also has a toggle for what you might need....https://developer.valvesoftware.com/wiki/Func_brush
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
FroGeX
Senior Member
Join Date: Aug 2020
Old 01-23-2021 , 03:05   Re: [CS:GO] Weapon goes through solid wall
Reply With Quote #8

Try change func_wall_toggle to func_brush
FroGeX 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 16:31.


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