#1

how can i make a join count and register count
like i type /info
it wil show
players joined : %d
Acount Registered : %d
Reply
#2

ontop
pawn Код:
new aCount, pCount;
onplayerconnect
pawn Код:
pCount++;
inside your register command
pawn Код:
aCount++;
Remember that you might wanna save to a file (?)
if you want all-time registered players, not only since last restart
Reply
#3

i want that it stay's
Reply
#4

Use any file function system (original File Functions, dINI etc)

I recommend dINI

Example code:

pawn Код:
//bottom of onplayerconnect:
if(!dini_Exists("playercount.ini"))
{
  dini_Create("playercount.ini");
  dini_IntSet("playercount.ini", "pCount", 0);
  dini_IntSet("playercount.ini", "aCount", 0);
}
dini_IntSet("playercount.ini", "pCount", dini_Int("playercount.ini", pCount)+pCount);
dini_IntSet("playercount.ini", "aCount", dini_Int("playercount.ini", aCount)+aCount);
Reply
#5

how ?
Reply
#6

check my post,I've edited
Reply
#7

2 errors

C:\DOCUME~1\Tim\BUREAU~1\pawno\GAMEMO~1\****.pwn(2 572) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\Tim\BUREAU~1\pawno\GAMEMO~1\****.pwn(2 573) : error 035: argument type mismatch (argument 2)


line 2572 en 2573 are the last 2 lines of that dini shit

pawn Код:
if(!dini_Exists("playercount.ini"))
    {
        dini_Create("playercount.ini");
        dini_IntSet("playercount.ini", "PlayersOnline", 0);
        dini_IntSet("playercount.ini", "PlayersRegisterd", 0);
    }
    dini_IntSet("playercount.ini", "PlayersOnline", dini_Int("playercount.ini", PlayersOnline)+PlayersOnline);
    dini_IntSet("playercount.ini", "PlayersRegisterd", dini_Int("playercount.ini", PlayersRegisterd)+PlayersRegisterd);
Reply
#8

pawn Код:
if(!dini_Exists("playercount.ini"))
    {
    dini_Create("playercount.ini");
    dini_IntSet("playercount.ini", "pCount", 0);
    dini_IntSet("playercount.ini", "aCount", 0);
    }
    dini_IntSet("playercount.ini", "pCount", dini_Int("playercount.ini", "pCount")+pCount);
    dini_IntSet("playercount.ini", "aCount", dini_Int("playercount.ini", "aCount")+aCount);
there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)