Count question.
#1

How to count how many accounts reggistered I have in my scriptfiles ?
Reply
#2

For what do you need that?

I mean if you need count for lets say /statistic command you can do something like:
- When the player registers YourRegisterCounter++;
Reply
#3

I want to put on my tutorial when a player make an account.
And in the tutorial to say something like this: We have %s accounts recorded
Reply
#4

%d not %s :P what is the tutorial saving system, mysql?
Reply
#5

INI :/ i'm an old school scripter )
Reply
#6

well, I haven't used INI before so I can't tell you how to do the saving system for counting, but I can give you some tips.

1. Make a new variable called RegisteredAccounts and put it in the top of the script (after the includes of course)

pawn Код:
new RegisteredAccounts;
now when a player register do:
pawn Код:
RegisteredAccounts ++;
//then tell him We have %d accounts recorded
now ongamemodeinit:
pawn Код:
//here make a check if the file exists or not, if it exists then set RegisteredAccounts = saved else then make a new file
Reply
#7

If I understood you,you need something like this:

PHP код:
new RegisterCounter// on top of your script
// Put this on your finish registration part
RegisterCounter++;
// Part of the tutorial that tells us how many players have registered on the server
new message[128];
format(message,sizeof(message),"INFO: There are %d players registered on our server.",RegisterCounter);
SendClientMessage(playerid,-1,poruka); 
Reply
#8

Quote:
Originally Posted by Eth
Посмотреть сообщение
well, I haven't used INI before so I can't tell you how to do the saving system for counting, but I can give you some tips.

1. Make a new variable called RegisteredAccounts and put it in the top of the script (after the includes of course)

pawn Код:
new RegisteredAccounts;
now when a player register do:
pawn Код:
RegisteredAccounts ++;
//then tell him We have %d accounts recorded
now ongamemodeinit:
pawn Код:
//here make a check if the file exists or not, if it exists then set RegisteredAccounts = saved else then make a new file
can you make me an example please?
Reply
#9

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)