Raised This Month: $ Target: $400
 0% 

Give noclip to player without godmode?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 03-26-2016 , 09:23   Give noclip to player without godmode?
Reply With Quote #1

As you already may know, giving noclip to a player will give the godmode as well.

I tried to remove the godmode for terrorists but it doesn't work.
They still have godmode on.

PHP Code:
 if(StrEqual(selection"noclipfight")) 
    {
        
GAME_ON true;
        
        for (new 
1<= MaxClientsi++)  
        {
            if (
IsClientInGame(i))
            {
                if(
GetClientTeam(i) == CS_TEAM_T && IsPlayerAlive(i))
                {
                    
SetEntityHealth(i100);
                    
SetEntityMoveType(iMOVETYPE_NOCLIP);
                    
SetEntProp(iProp_Data"m_takeDamage"21); 
                }     

            }    
        }
    } 
__________________

Last edited by proffs; 03-26-2016 at 09:23.
proffs is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-28-2016 , 05:38   Re: Give noclip to player without godmode?
Reply With Quote #2

I found these threads:
https://forums.alliedmods.net/showthread.php?t=266284
https://forums.alliedmods.net/showthread.php?t=224569

I'm going to try the plugin Franc1sco posted.
__________________
proffs is offline
proffs
Senior Member
Join Date: Jul 2013
Old 04-03-2016 , 10:23   Re: Give noclip to player without godmode?
Reply With Quote #3

Quote:
Originally Posted by proffs View Post
The plugin Franc1sco posted doesn't work for some reason.
Anyone able to post a method if they know any?
__________________
proffs is offline
Farbror Godis
AlliedModders Donor
Join Date: Feb 2016
Old 04-03-2016 , 11:07   Re: Give noclip to player without godmode?
Reply With Quote #4

I haven't tested it, but i believe you could hook SDKHook_OnTakeDamage, subtract the damage done from the players health, then check if the health is less than 1 and deactivate noclip to let them die?

Last edited by Farbror Godis; 04-03-2016 at 11:09.
Farbror Godis 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 04:58.


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