Player-Based CVARs
8 Attachment(s)
Player-Based CVARs By: nikhilgupta345 Description: This plugin allows you to execute certain commands or set certain cvars when there are a certain number of players on the server. The commands are sent to the server console as soon as a player connects. Admin Commands: Installation: Example 'player_cvars.ini':
Changelog: Notes: Suggestions/Comments/Feedback are welcome. |
Re: Player-Based CVARs
Good job! :)
|
Re: Player-Based CVARs
Good job ;)
|
Re: Player-Based CVARs
I'm pretty sure you gonna have false numbers with that global var and connect/disconnect.
If so, use get_playersnum and client_putinserver and client_disconnect (not that in client_disconnect, the disconnected client is still counted). |
Re: Player-Based CVARs
Quote:
|
Re: Player-Based CVARs
Aw, first I thought every player would have the CVars set specifically for them. :(
|
Re: Player-Based CVARs
Quote:
|
Re: Player-Based CVARs
Quote:
May be it is not the situation, but i've read that client_connect could be triggered few times without client_disconnect between different calls. And the other idea is to not trust a global var but to check each time players value, global var wouldn't be a significant improvement anyway. |
Re: Player-Based CVARs
Quote:
With that being said, would you suggest client_connect with get_playersnum() passed with 1 as a parameter so that it counts connecting players as well? I think that may work better. |
Re: Player-Based CVARs
Seems that you are right (tested on dedicated server) :
Code:
L 10/22/2011 - 18:22:05: ClientPutInServer(1), startmoney set to 2000 Code:
May be you don't want to include fakemeta to use FM_ClientPutInServer, but if you use get_playersnum at client_connect, i don't know if the client is counted, and if that client disconnect while downloading on a fasturl without disconnect being sent i doubt that server owners would be glad with bad settings as well. I don't have time right now to investigate more on it, and anyway it's up to you to find the right way ;) |
All times are GMT -4. The time now is 11:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.