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

Solved NoClip problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-08-2019 , 20:42   NoClip problem
Reply With Quote #1

Hello, I try to give noclip to a player but is not working (he gets stuck and also can't be killed)
How can I solve this ?
Code:
SetEntityMoveType(client, MOVETYPE_NOCLIP); // this seems not to work, why?
// cvar problem ? I'll post my server.cfg if is necessary
EDIT: Solved by hooking and unhooking the take damage pre and setting the movetype to walk and back to noclip.

Last edited by ShD3luxe; 08-22-2019 at 05:46. Reason: Solved
ShD3luxe is offline
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Old 08-09-2019 , 08:05   Re: NoClip problem
Reply With Quote #2

The function usage seems right, give more contex of the code that is around it
__________________
Add me for commissions!
Steam: [U:1:88621772]
Discord: lugui#0889
My Plugins
lugui is offline
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-09-2019 , 09:37   Re: NoClip problem
Reply With Quote #3

Code:
public start_noclip()
{
	for (new client = 1; client <= MaxClients; client++)
	{
		if(!IsClientInGame(client))
			continue;
		if(!IsPlayerAlive(client))
			continue;
		
		StripAllWeapons(client);
		SetEntityGravity(client,1.0);
		SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
		if(GetClientTeam(client) == CS_TEAM_T)
		{
			SetEntityHealth(client,100);
			GivePlayerItem(client, "weapon_m4a1");
		}
		else if(GetClientTeam(client) == CS_TEAM_CT)
		{
			GivePlayerItem(client, "weapon_knife");
			SetEntityHealth(client, 150);
			SetEntityMoveType(client, MOVETYPE_NOCLIP);
		}
	}
}
This is the function, I try to set noclip only for counter-terrorists , also I modified some cvars in round start
->
Code:
	SetCvar("mp_teammates_are_enemies", 0);
	SetCvar("mp_friendlyfire",0);
	SetCvar("mp_limitteams", 0)
	SetCvar("mp_autoteambalance", 0)
	SetCvar("mp_tkpunish", 0)
	SetCvar("sv_alltalk",1);
	SetCvar("sv_gravity", 800);
	SetCvar("sv_airaccelerate", 9999);                            
	SetCvar("sv_enablebunnyhopping", 1); 
	SetCvar("sv_staminamax", 0);
	SetCvar("sv_staminajumpcost", 0);
	SetCvar("sv_staminalandcost", 0);
	SetCvar("sm_paintball_enable", 0);
       SetCvarF("sv_accelerate", 900.0);
Are those causing the problem ?
ShD3luxe is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 08-12-2019 , 10:36   Re: NoClip problem
Reply With Quote #4

if cvar sv_maxspeed value more than 1000, noclip speed will slow. or if more than 2000 then completely stuck.
farawayf is offline
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-12-2019 , 18:44   Re: NoClip problem
Reply With Quote #5

Changed it to 600 worked thx m8. Do you know how can I turn off god mode for noclip ?
ShD3luxe is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 08-13-2019 , 06:10   Re: NoClip problem
Reply With Quote #6

SetEntProp(client, Prop_Data, "m_takeDamage", 2, 1);
farawayf is offline
ShD3luxe
Member
Join Date: Aug 2019
Location: Localhost
Old 08-13-2019 , 11:39   Re: NoClip problem
Reply With Quote #7

I tried that , is not working.
ShD3luxe 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 13:01.


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