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

[CS:GO] Noclip without godmode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 07-17-2018 , 10:22   [CS:GO] Noclip without godmode
Reply With Quote #1

The change of movetype into MOVETYPE_NOCLIP automatically gives godmode, how to revoke the godmode when giving noclip?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-17-2018 , 10:28   Re: [CS:GO] Noclip without godmode
Reply With Quote #2

You could use MOVETYPE_FLY, don't know if it fits ur benifits
mug1wara is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 07-17-2018 , 10:29   Re: [CS:GO] Noclip without godmode
Reply With Quote #3

I would check to see if SDKHooks take damage fires and m_takedamage could be changed while the player is in noclip. If those don't work you'd probably need to replicate noclip mode by setting the player's gravity and position etc.

Quote:
Originally Posted by mug1wara View Post
You could use MOVETYPE_FLY, don't know if it fits ur benifits
note: this doesn't go through walls and it's more of a gravityless frictionless movement through air.

Last edited by Mitchell; 07-17-2018 at 10:30.
Mitchell is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 07-17-2018 , 10:39   Re: [CS:GO] Noclip without godmode
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
I would check to see if SDKHooks take damage fires and m_takedamage could be changed while the player is in noclip. If those don't work you'd probably need to replicate noclip mode by setting the player's gravity and position etc.



note: this doesn't go through walls and it's more of a gravityless frictionless movement through air.
TakeDamageAlive is never fired for noclips. I used !god player 0 and godmode remains.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 07-17-2018 , 11:24   Re: [CS:GO] Noclip without godmode
Reply With Quote #5

maybe SDKHook_TraceAttack
Indarello is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-18-2018 , 04:51   Re: [CS:GO] Noclip without godmode
Reply With Quote #6

I overcame this problem by hooking the players with SDKHook_OnTakeDamage and SDKHook_OnTakeDamagePost

Snippet:
PHP Code:
bool gB_Noclip[MAXPLAYERS 1];

public 
Action OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetype
{
    if (
victim <= MaxClients && IsClientInGame(victim) && gB_Noclip[victim])
        
SetEntityMoveType(victimMOVETYPE_WALK);
}

public 
Action OnTakeDamagePost(int victimint attacker)
{
    if (
victim <= MaxClients && IsClientInGame(victim) && gB_Noclip[victim])
        
SetEntityMoveType(victimMOVETYPE_NOCLIP);

__________________
LenHard 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:22.


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