Server Status (Players Online[xx])
#1

Hello.
Please write a script that will show players online.
This would look like this:

http://rp-pl.net/ - In menu "Graczy Online (47)"

That script is simple, but very important for me.
Reply
#2

This is not a gift shop.

Try you self, and then ask for help later - Show us your work, so we can tell you what wrong/right.

In that way you hopefully will understand how to do next time.
Reply
#3

please help
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=118885
Reply
#5

Hi since I'm really bored right now, I've made you this :
(Uses Textdraws + Its on top of your radar.)

pawn Код:
#include <a_samp>

new Text:TotalPlayersTD;
new totalOnline;

public OnGameModeInit()
{
  TotalPlayersTD = TextDrawCreate(35.000000,320.000000,"Test Server ( Players Online)");
  TextDrawAlignment(TotalPlayersTD,0);
  TextDrawBackgroundColor(TotalPlayersTD,0x000000ff);
  TextDrawFont(TotalPlayersTD,1);
  TextDrawLetterSize(TotalPlayersTD,0.299999,1.000000);
  TextDrawColor(TotalPlayersTD,0x0000ffff);
  TextDrawSetOutline(TotalPlayersTD,1);
  TextDrawSetProportional(TotalPlayersTD,1);
  TextDrawSetShadow(TotalPlayersTD,1);
  SetTimer("TotalConnect", 1000, true);
  return 1;
}

public OnPlayerConnect(playerid)
{
  totalOnline++;
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  totalOnline--;
  return 1;
}

public OnPlayerSpawn(playerid)
{
  TextDrawShowForPlayer(playerid, TotalPlayersTD);
  return 1;
}


forward TotalConnect(playerid);
public TotalConnect(playerid)
{
   new string[126];
   format(string, sizeof(string), "%s Server (%d Players Online)", GetServerHostName(), totalOnline);
   TextDrawSetString(TotalPlayersTD, string);
   return 1;
}




stock GetServerHostName()
{
   new string[106];
   GetServerVarAsString("hostname", string, sizeof(string));
   return string;
}
Merge it in your Gamemode.

If it has some problems, just PM me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)