AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [CS:S] If connected clients =X exec Xcommand (https://forums.alliedmods.net/showthread.php?t=96126)

NouveauJoueur 07-01-2009 01:43

[CS:S] If connected clients =X exec Xcommand
 
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 :P

Gachl 07-01-2009 04:36

Re: [CS:S] If connected clients =X exec Xcommand
 
1 Attachment(s)
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.

NouveauJoueur 07-01-2009 09:15

Re: [CS:S] If connected clients =X exec Xcommand
 
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? ^^

Gachl 07-01-2009 11:36

Re: [CS:S] If connected clients =X exec Xcommand
 
1 Attachment(s)
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

NouveauJoueur 07-02-2009 06:39

Re: [CS:S] If connected clients =X exec Xcommand
 
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 ^^

MrSaturn 07-17-2009 14:25

Re: [CS:S] If connected clients =X exec Xcommand
 
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 08-29-2009 12:44

Re: [CS:S] If connected clients =X exec Xcommand
 
any help please?


All times are GMT -4. The time now is 03:56.

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