SA-MP Forums Archive
How do I make the player serial number? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do I make the player serial number? (/showthread.php?tid=550532)



How do I make the player serial number? - _Application_ - 13.12.2014

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


Re: How do I make the player serial number? - Lordzy - 13.12.2014

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.


Re: How do I make the player serial number? - Vince - 13.12.2014

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.


Re: How do I make the player serial number? - _Application_ - 13.12.2014

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?? :/


Re: How do I make the player serial number? - Djole1337 - 13.12.2014

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.


Re: How do I make the player serial number? - _Application_ - 13.12.2014

I do not know how to do it please help me?


Re: How do I make the player serial number? - HY - 13.12.2014

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.


Re: How do I make the player serial number? - Ox1gEN - 13.12.2014

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.


Re: How do I make the player serial number? - _Application_ - 13.12.2014

help