[Include] pcounter - count all players online
#1

ok, this is a suuuuuper simple "include" that i made in about 5 minutes. I am only releasing it because im a noob. Anyway, here it is:

PCounter
Functions:
CountPlayersOnline();
Example:
pawn Код:
#include <a_samp>
#include <pcounter>

main()
{
    print("\n----------------------------------");
    print(" testcrap");
    print("----------------------------------\n");
}

public OnFilterScriptInit()
{
    SetTimer("count", 7500, true);
}

forward count();
public count()
{
    new num = CountPlayersOnline();
    printf("players online: %i", num);
}
Download: http://solidfiles.com/d/05305/
Pastebin: http://pastebin.com/ZHS54UTr
THANKZ!
Reply
#2

nice =D
i will use it

Question:
how do i make it count the number of online players when som1 connect to the server?
Reply
#3

thanks! is it really use ful at all though?
Reply
#4

Pastebin link would be cool.
Reply
#5

how i get a pastebin account? press create account?
ill try to get pastebin.
Reply
#6

Simple and Nice
Reply
#7

thanks
Reply
#8

answer me!!(the first reply)
Reply
#9

so... what do you think of it?........................
Reply
#10

Fail Much ?
Reply
#11

ik. i failedededededed
Reply
#12

cool
Reply
#13

Question:
how do i make it count the number of online players when som1 connect to the server?
Reply
#14

Quote:
Originally Posted by Meyer
Посмотреть сообщение
lol....


(sorry for dueble posting)
Reply
#15

under OnPlayerConnect(playerid)
put:
new num = CountPlayersOnline();
printf("players online: %i", num);
and i highly recomend you put it under OnPlayerDisconnect(playerid, reason) too!!!
Reply
#16

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
Question:
how do i make it count the number of online players when som1 connect to the server?
pawn Код:
public OnPlayerConnect(playerid)
{
    new num = CountPlayersOnline();
    printf("players online: %i", num);
}

public OnPlayerDisconnect(playerid)
{
    new num = CountPlayersOnline();
    printf("players online: %i", num);
}
Reply
#17

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
nice =D
i will use it

Question:
how do i make it count the number of online players when som1 connect to the server?
Just use the function. It counts online players. When you use the functions, it checks for the online players. When you're online, you're connected.
Reply
#18

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Just use the function. It counts online players. When you use the functions, it checks for the online players. When you're online, you're connected.
exactly!
Reply
#19

k thx =D
Reply
#20

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)