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

[CSGO] Is there a command to make a player "invincible"?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ryan2
Senior Member
Join Date: Jul 2020
Old 02-27-2023 , 14:20   [CSGO] Is there a command to make a player "invincible"?
Reply With Quote #1

I want to make a player invincible for X amount of seconds as a reward. Is something like this possible?

Something like spawn protection but of course they can be invincible anywhere in the map.
Ryan2 is offline
breezetix
Member
Join Date: Oct 2019
Location: nah
Old 02-27-2023 , 20:54   Re: [CSGO] Is there a command to make a player "invincible"?
Reply With Quote #2

god in console
breezetix is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-28-2023 , 06:56   Re: [CSGO] Is there a command to make a player "invincible"?
Reply With Quote #3

You may hook clients with "OnTakeDamage" and change damage to 0 / or return Plugin_Handled;

Just search some examples
https://forums.alliedmods.net/showthread.php?t=341920

To control for how long, I always create a client based variable (MAXPLAYERS+1) and control the time with GetGameTime()
__________________

Last edited by Marttt; 02-28-2023 at 06:57.
Marttt 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 18:34.


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