[FilterScript] Player online count+record of players
#1

Online player count+Record system
A simple system that has a record of players ever connected+it can detect how many players are online.
The record is saved in record.txt file.
Online players are seen with

Code:
PlayerCount
A little command that tells you how many players are online.
Code:
	if (strcmp("/online", cmdtext, true, 10) == 0)
	{
	format(str,sizeof(str),"Online players: [%d]",PlayerCount);
	SendClientMessage(playerid,-1,str);
		return 1;
	}
Download:
Pastenbin.com
Reply
#2

You can simply just press "TAB" and see the number.
Reply
#3

Quote:
Originally Posted by Stuun23
View Post
You can simply just press "TAB" and see the number.
And can the server see player number with 'TAB'?
Reply
#4

Quote:
Originally Posted by Kruno88
View Post
And can the server see player number with 'TAB'?
Yes (I think its in a header)
Reply
#5

This not even a filterscript
SAMP Players counter
Reply
#6

If it was a textdraw it would be useful.
Reply
#7

Some of the code is not even making sense...
Reply
#8

Okey,how will you detect if there are 10 players online,within the script
Reply
#9

You are already doing that with the PlayerCount variable, raising it @ OnPlayerConnect and decrease @OnPlayerDisconnect. It's just that the function "ConnectingOfPlayer()" is useless since it will return the same number as the PlayerCount-variable already has...


..also the code at OnPlayerSpawn is useless and will just annoy the players each time a player dies and spawns.


..also why do you reset the record in the file when the script starts? What would be the point of saving the number in the file if you reset it anyway?
Reply
#10

Quote:
Originally Posted by Stuun23
View Post
You can simply just press "TAB" and see the number.
Quote:
Originally Posted by Schneider
View Post
You are already doing that with the PlayerCount variable, raising it @ OnPlayerConnect and decrease @OnPlayerDisconnect. It's just that the function "ConnectingOfPlayer()" is useless since it will return the same number as the PlayerCount-variable already has...


..also the code at OnPlayerSpawn is useless and will just annoy the players each time a player dies and spawns.
Ok.Btw you joined in 2007,while I was still 3d grade.So...Thanx for your suggestion.
OnPlayerSpawn funcion is just an example of a proper use of it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)