Make players immune to damage for 5 seconds?
player.SetPlayerFlag(BasePlayer.PlayerFlags.Invincible, true);

I tried the above code, but could not compile it

How about this? Then just use timer for the amount of seconds.

player.net.connection.info.Set("global.god", "true");

Timer turnOff = timer.Once(5f, () =>
            {
                player.net.connection.info.Set("global.god", "false");
            });
NMi4ePL9rCny2Pb.png zeeuss

How about this? Then just use timer for the amount of seconds.

player.net.connection.info.Set("global.god", "true");

Timer turnOff = timer.Once(5f, () =>
            {
                player.net.connection.info.Set("global.god", "false");
            });

Is it global? Instead of a single player?



Merged post

At the same time, will he make players become administrators temporarily?
dream

Is it global? Instead of a single player?



Merged post

At the same time, will he make players become administrators temporarily?
It makes only the player who f.e. executes command become invincible, it won't make him admin.
uWaM1bNM0NdAsr1.png zeeuss
It makes only the player who f.e. executes command become invincible, it won't make him admin.

Thank you very much. I have finished it

gaQLowwYPdaFu6Q.png zeeuss
It makes only the player who f.e. executes command become invincible, it won't make him admin.

Hello, after several days of use, I found that this code is only valid for administrators, not for players