21.12.2012, 12:41
Anyone know how to script random numbers, like Tag 2323242 Tag 482783 and maybe of something out of the registered accounts, something like that. (Hope you understand)
Random numbers? https://sampwiki.blast.hk/wiki/Random
|
//put this globally
new regNum[ MAX_PLAYERS ][ 7 ]; //7 cells for #XXXXX
//registration
format( regNum[ playerid ], 7, "#%05i", ( pRegs + 1 ));
You would have to store the number of players registered in a file, read it when registering a player, and set his number to the number of players register + 1.
I bet you know how to save that to a file, so here's how you would save it In this example, "pRegs" is the function you would use to store the information from the file pawn Код:
Remember to save the new number of registered players after a player registeres. |