19.02.2010, 17:53
Hey guys, i made a system on my server that everyplayer gets an ID like a number and for example 4 digits, i made it to be random, and it works fine.
Here is my problem - The system it self is giving out people random numbers and there is a possibility that 2 players might have the same number, so how can i make it that if one player already has the number different player won't have that number. I know its a bunch of scripting to do with checking for an ID and all, so if anyone can help me out with this one. Or a different system where it follows so first player will get an ID 1, second player will get an ID 2 etc.
Here is my problem - The system it self is giving out people random numbers and there is a possibility that 2 players might have the same number, so how can i make it that if one player already has the number different player won't have that number. I know its a bunch of scripting to do with checking for an ID and all, so if anyone can help me out with this one. Or a different system where it follows so first player will get an ID 1, second player will get an ID 2 etc.