03.08.2018, 21:38
This
is the same like this without stock?
or..
??
Fucking learning process..
PHP код:
stock GenerateRegistration() //states the name of the stock
{
new registration = random(9999); //Generates a number out of 9999
foreach(Player, i) //Searches every user in the server checking if the vehicle plate is used.
{
if(PlayerInfo[i][vReg] == registration || registration < 1000) // Checks if the reg is in use or if its below 1000.
{
GenerateRegistration(); //Regenerates a reg if the criteria is not met
return 1;
}
}
return registration; //returns the reg if the criteria is met
}
PHP код:
GenerateRegistration() //states the name of the stock
{
new registration = random(9999); //Generates a number out of 9999
foreach(Player, i) //Searches every user in the server checking if the vehicle plate is used.
{
if(PlayerInfo[i][vReg] == registration || registration < 1000) // Checks if the reg is in use or if its below 1000.
{
GenerateRegistration(); //Regenerates a reg if the criteria is not met
return 1;
}
}
return registration; //returns the reg if the criteria is met
}
PHP код:
forward GenerateRegistration();
public GenerateRegistration() //states the name of the stock
{
new registration = random(9999); //Generates a number out of 9999
foreach(Player, i) //Searches every user in the server checking if the vehicle plate is used.
{
if(PlayerInfo[i][vReg] == registration || registration < 1000) // Checks if the reg is in use or if its below 1000.
{
GenerateRegistration(); //Regenerates a reg if the criteria is not met
return 1;
}
}
return registration; //returns the reg if the criteria is met
}
Fucking learning process..