How do I make the player serial number?
#1

How do I make a serial number in register?

Example: (After registration looks like this)

Your serial number: 7
Server registered players: 7


Hope you understand me, I want it to be in the library y_ini
Reply
#2

Create a variable that increments by +1 on every registration. Save that variable separately on a file (since you wanted to use y_ini). Whenever the player registers, you can set their ID to the variable's value and the increase it.
Reply
#3

With what intent? If you've seen that in another server, it most likely means that they are using MySQL. In such cases the id (or "serial number" as you call it) is used to uniquely identify players across different tables in the database.
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
With what intent? If you've seen that in another server, it most likely means that they are using MySQL. In such cases the id (or "serial number" as you call it) is used to uniquely identify players across different tables in the database.
Yes it is a serial number

Can you please build me that in y_ini?

please?? :/
Reply
#5

Quote:
Originally Posted by _Application_
Посмотреть сообщение
Can you please build me that in y_ini?
It's rather pointless, it has no USE in ini saving system.
Reply
#6

I do not know how to do it please help me?
Reply
#7

At the top of script:

pawn Код:
new Registered;
Where do you have register system add:

pawn Код:
Registered++;
Then you can check how many players registered.

pawn Код:
CMD:registered(playerid, params[])
{
    new string[3];
    format(string, sizeof(string), "%d", Registered);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Of course, you can optimize it by savin' this in a file, etc.
Reply
#8

Quote:
Originally Posted by HY
Посмотреть сообщение
At the top of script:

pawn Код:
new Registered;
Where do you have register system add:

pawn Код:
Registered++;
Then you can check how many players registered.

pawn Код:
CMD:registered(playerid, params[])
{
    new string[3];
    format(string, sizeof(string), "%d", Registered);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Of course, you can optimize it by savin' this in a file, etc.
You're also going to need to define Registered with what you have in the file.
Because doing it like you did will just reset after the server restarts.
Reply
#9

help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)