AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CS:GO] Noclip without godmode (https://forums.alliedmods.net/showthread.php?t=309202)

eyal282 07-17-2018 10:22

[CS:GO] Noclip without godmode
 
The change of movetype into MOVETYPE_NOCLIP automatically gives godmode, how to revoke the godmode when giving noclip?

mug1wara 07-17-2018 10:28

Re: [CS:GO] Noclip without godmode
 
You could use MOVETYPE_FLY, don't know if it fits ur benifits

Mitchell 07-17-2018 10:29

Re: [CS:GO] Noclip without godmode
 
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 (Post 2604256)
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.

eyal282 07-17-2018 10:39

Re: [CS:GO] Noclip without godmode
 
Quote:

Originally Posted by Mitchell (Post 2604259)
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.

Indarello 07-17-2018 11:24

Re: [CS:GO] Noclip without godmode
 
maybe SDKHook_TraceAttack

LenHard 07-18-2018 04:51

Re: [CS:GO] Noclip without godmode
 
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);




All times are GMT -4. The time now is 13:07.

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