View Single Post
Plugin Info:     Modification:          Category:         
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-25-2019 , 09:06   Need players to connect - requested
Reply With Quote #1

Hi, i'm here to post a small plugin that sends a message to other servers in a network.
Ie, if your server is need more players to enter. It is requested by some user

To install:
1. Create a rcon.rc file in amxmodx/configs dir and put it this content:

Also replace servers with your info.

Code:
amx_send_msg 0 "127.0.0.1" "27015" "1234" // Server 01
amx_send_msg 1 "127.0.0.1" "27015" "1234" // Server 02
amx_send_msg 2 "127.0.0.1" "27015" "1234" // Server 03
amx_send_msg 2 "127.0.0.1" "27015" "1234" // Server 04
2. Compile and install the plugin in your server. Make sure that sockets module is installed

To use in game:
1. Players can use the .need command in say as he need, with a delay (amx_need_delay) of 20 seconds.

2. That is all, the servers will receive a message like:
(127.0.0.1) (Biohazard Server) - Need players: 13 of 32!

Ps. This is first release, i will do:
1. Dynamic array to get unlimited servers count;
2. Translate it
3. Optmize some code??

Cheers
Attached Files
File Type: sma Get Plugin or Get Source (network.sma - 121 views - 3.2 KB)
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY