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

First's Zombie Helper


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mankled
Senior Member
Join Date: Oct 2019
Old 05-14-2020 , 01:32   First's Zombie Helper
Reply With Quote #1

,.

Last edited by Mankled; 05-17-2020 at 20:36.
Mankled is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2020 , 07:39   Re: First's Zombie Helper
Reply With Quote #2

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".
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Mankled
Senior Member
Join Date: Oct 2019
Old 05-14-2020 , 13:26   Re: First's Zombie Helper
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
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
Mankled is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2020 , 13:34   Re: First's Zombie Helper
Reply With Quote #4

By using the get_playersnum() function or using a global variable and adding +1 or -1 for each connect/disconnect (preferred method).
__________________

Last edited by OciXCrom; 05-14-2020 at 13:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 13:43.


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