Raised This Month: $32 Target: $400
 8% 

show count player servers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexunder
Member
Join Date: Jun 2018
Old 07-18-2018 , 01:55   show count player servers
Reply With Quote #1

hi guys
my script :
Code:
public Action:CommandIpServer(client, args)
{
	PrintToChat(client, "\x01 \x04[SM]\x01 IP Test1 : \x04 127.0.0.1:27015")
	PrintToChat(client, "\x01 \x04[SM]\x01 IP Test2 : \x04 127.0.0.1:27019")
}
if player say "!ip" to chat , can see ip multi server , it's ok .

i want to see current player on server , example :
result =
Code:
[SM] IP Test1 127.0.0.1:27015 (21 player)
[SM] IP Test2 127.0.0.1:27015 (6 player)
i can use Database (select count player on table and update count player with php , no problem)
i am looking for a simpler solution

thx
Alexunder is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-18-2018 , 04:34   Re: show count player servers
Reply With Quote #2

You'd need to use SQL (Preferably MySQL) database table, which would distinguish the server's ip address, and use that to insert the players count. Then updating the player count on every player join/disconnect. There isn't a simpler solution other than this.
__________________

Last edited by LenHard; 07-18-2018 at 04:34.
LenHard is offline
Alexunder
Member
Join Date: Jun 2018
Old 07-18-2018 , 04:41   Re: show count player servers
Reply With Quote #3

Quote:
Originally Posted by LenHard View Post
You'd need to use SQL (Preferably MySQL) database table, which would distinguish the server's ip address, and use that to insert the players count. Then updating the player count on every player join/disconnect. There isn't a simpler solution other than this.
true , i think use host_info_show is better , i can make database and register all server and auto update count player (cronjob) , np , but not good idea .
Alexunder is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 07-18-2018 , 06:26   Re: show count player servers
Reply With Quote #4

use socket
__________________
8guawong is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-18-2018 , 07:27   Re: show count player servers
Reply With Quote #5

Quote:
Originally Posted by 8guawong View Post
use socket
yeah, id use that aswell
mug1wara is offline
Reply


Thread Tools
Display Modes

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 14:59.


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