AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   First's Zombie Helper (https://forums.alliedmods.net/showthread.php?t=324357)

Mankled 05-14-2020 01:32

First's Zombie Helper
 
,.

OciXCrom 05-14-2020 07:39

Re: First's Zombie Helper
 
1. Create a global bool.
2. Check the player count whenever a user connects/disconnects.
3. If the count is <= 5 set the bool to "false", else set it to "true".
4. Use the bool in every function in your plugin and stop the function if the bool is "false".

Mankled 05-14-2020 13:26

Re: First's Zombie Helper
 
Quote:

Originally Posted by OciXCrom (Post 2700075)
1. Create a global bool.
2. Check the player count whenever a user connects/disconnects.
3. If the count is <= 5 set the bool to "false", else set it to "true".
4. Use the bool in every function in your plugin and stop the function if the bool is "false".

How I do number 2

OciXCrom 05-14-2020 13:34

Re: First's Zombie Helper
 
By using the get_playersnum() function or using a global variable and adding +1 or -1 for each connect/disconnect (preferred method).


All times are GMT -4. The time now is 17:05.

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