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

[CS:S] If connected clients =X exec Xcommand


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NouveauJoueur
SourceMod Donor
Join Date: May 2009
Old 07-01-2009 , 01:43   [CS:S] If connected clients =X exec Xcommand
Reply With Quote #1

sm_cmexec_nclients "6" // If there is less then 6 clients, it will exec the "sm_cmexec_n" command.

sm_cmexec_pclients "12" // If there is 12 clients or more connected, it will exec the "sm_cmexec_p"

sm_cmexec_p "sm_noblock "1""
sm_cmexec_n "sm_noblock "0""
When a client connects to the server, the plugins check the amount of connected clients, and if it's equal or more then 12, it will exec sm_noblock "1".

The no block command is an example, but it could be so much usefull on so much case .... If you can make this credit me for the Idea please
NouveauJoueur is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-01-2009 , 04:36   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #2

Not tested, so try it before using it!

Quote:
CVars
  • sm_cmexec_nclients
    Execute sm_cmexec_n if theres n or less players on the server
  • sm_cmexec_pclients
    Execute sm_cmexec_p if theres p or less players on the server
  • sm_cmexec_p
    Execute this if there are n or less players on the server
  • sm_cmexec_n
    Execute this if there are p or less players on the server
+K if helpful plz.
Attached Files
File Type: sp Get Plugin or Get Source (cmexec.sp - 425 views - 1.8 KB)

Last edited by Gachl; 07-01-2009 at 04:39.
Gachl is offline
NouveauJoueur
SourceMod Donor
Join Date: May 2009
Old 07-01-2009 , 09:15   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #3

I tested it really fast, and it seems to work well !
I connected to the server and it's said the sentance I wanted it to say ^^
Thanks you very much, now i've a few idea of new features.

sm_cmexec_e1clients
Execute sm_cmexec_e if theres e1 players on the server.

sm_cmexec_e1
Execute this if theres e1 players on the server.

sm_cmexec_e2clients
Execute sm_cmexec_e if theres e1 players on the server.

sm_cmexec_e2
Execute this if theres e2 players on the server.

So when "e1" is reached, I set a command (let's take the no block example) "sm_noblock "1"" and when "e2" is reached it'll exec my other command "sm_noblock "0"".

So it wont exec the command everytime someone connect. But we must keep the 4 first cvars too, it's cool I can display a message each time a player connect now !

And thanks you again for coding so fast something working so well ^^

+K on you

Was looking at source code and i saw a mistake on my name :

Quote:
author = "GachL (To NouveauJouers request)",
author = "GachL (To NouveauJoueurs request)",

Can you correct it with this missing "u" on my name please? ^^

Last edited by NouveauJoueur; 07-01-2009 at 09:20.
NouveauJoueur is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-01-2009 , 11:36   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #4

Still not tested. Good luck.
I also corrected your name, je suis suisse alors je ne parle pas français ^__^

Quote:
CVars
  • sm_cmexec_nclients
    Execute sm_cmexec_n if theres n or less players on the server
  • sm_cmexec_pclients
    Execute sm_cmexec_p if theres p or less players on the server
  • sm_cmexec_e1clients
    Execute sm_cmexec_e1 if theres e1 players on the server
  • sm_cmexec_e2clients
    Execute sm_cmexec_e2 if theres e2 players on the server
  • sm_cmexec_n
    Execute this if there are n or less players on the server
  • sm_cmexec_p
    Execute this if there are p or less players on the server
  • sm_cmexec_e1
    Execute this if there are e1 players on the server
  • sm_cmexec_e2
    Execute this if there are e2 players on the server
Quote:
Fastest coder ever Thanks!
lol if you think so ^^ thx for +K
Attached Files
File Type: sp Get Plugin or Get Source (cmexec.sp - 449 views - 2.7 KB)

Last edited by Gachl; 07-01-2009 at 11:39.
Gachl is offline
NouveauJoueur
SourceMod Donor
Join Date: May 2009
Old 07-02-2009 , 06:39   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #5

The new release works fine too.
It's a very good plugin i'm going to use it on 8 of my 10 servers ! Thanks ^^
NouveauJoueur is offline
MrSaturn
SourceMod Donor
Join Date: Jan 2009
Old 07-17-2009 , 14:25   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #6

Could someone show me their configuration for this type of plugin?

I am not entirely sure how to work this but I'm sure if I saw an example I could edit it the way I'd like.

(does this work only for CS:S ?)
__________________
MrSaturn is offline
MrSaturn
SourceMod Donor
Join Date: Jan 2009
Old 08-29-2009 , 12:44   Re: [CS:S] If connected clients =X exec Xcommand
Reply With Quote #7

any help please?
__________________
MrSaturn 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 11:52.


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