SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem (/showthread.php?tid=202842)



Problem - Face9000 - 25.12.2010

Hi all,i need a thing:

I've the OnPlayerConnect msg (blabla has joined the server),i need to do:

blabla has joined the server. (Players: 1/SERVER SLOTS).

How to?


Re: Problem - Sascha - 25.12.2010

try this:
Код:
new players = 0;
	for(new i=0; i<GetMaxPlayers(); i++){
	    if(IsPlayerConnected(i)){
	        players++;
		}
	}
	players = players - 1;
	new string[200];
	format(string, sizeof(string), "blablablabla... (%d/%d)",players, GetMaxPlayers());