Jump to content

Number of players


Recommended Posts

Posted

Hello guys, I'm looking for script that says (every x minutes) in the chat how many players are online in the server.

Like: there are x players online.

And every x minutes this message appears in the chat.

Posted
local time = 240000 
function onlinePlayers() 
    outputChatBox("There are now " .. getPlayerCount() .. " players on this server!", root, 220, 220, 220) 
end 
setTimer(onlinePlayers, time, 0) 

Posted
  
function getOnlinePlayers(...) 
   outputChatBox("[ONLINE PLAYERS] There are" ..getPlayerCount.. "players on the server!", root, 0 , 0 , 0) 
  end 
setTimer(getOnlinePlayers, 120000, 10000) 
  
  

This script will get players and output it. 10000 Times for infinite use 0. setTimer(getOnlinePlayer, 120000, 0) for infinite times.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...