Not all vehicles should come with such number.
There is a problem with in the code! What i think is we need the
char datatype to step out here. Let me think for a while. Ill post you a new code.
You know what wait! Try this its an edit of your original code: I want to know what do you get when you do this.
pawn Код:
new const NumeriuRaides[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
new const NumeriuSkaiciai[] = "0123456789";
new string[6],msg[10];
string[0] = NumeriuRaides[random(sizeof(NumeriuRaides))];
string[1] = NumeriuRaides[random(sizeof(NumeriuRaides))];
string[2] = NumeriuRaides[random(sizeof(NumeriuRaides))];
string[3] = NumeriuSkaiciai[random(sizeof(NumeriuSkaiciai))];
string[4] = NumeriuSkaiciai[random(sizeof(NumeriuSkaiciai))];
string[5] = NumeriuSkaiciai[random(sizeof(NumeriuSkaiciai))];
format(msg,8,"%s%s%s:%d%d%d",string[0],string[1],string[2],string[3],string[4],string[5]);
format(tInfo[nuomTransp][Numeriai],8,"%s",msg);
SetVehicleNumberPlate(nuomTransp,tInfo[nuomTransp][Numeriai]);
SetVehicleToRespawn(nuomTransp);
I think you will be having
sscanf , click here if you want to download it..
I made this code to use it with sscanf. Try this too:
pawn Код:
new const NumeriuRaides[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
new const NumeriuSkaiciai[] = "0123456789";
new string[6],msg[10];
new randletter = random(sizeof(NumeriuRaides));
new randdigit = random(sizeof(NumeriuSkaiciai));
sscanf(NumeriuRaides[randletter], "s[1]", string[0]);
sscanf(NumeriuRaides[randletter], "s[1]", string[1]);
sscanf(NumeriuRaides[randletter], "s[1]", string[2]);
sscanf(NumeriuRaides[randdigit], "s[1]", string[3]);
sscanf(NumeriuRaides[randdigit], "s[1]", string[4]);
sscanf(NumeriuRaides[randdigit], "s[1]", string[5]);
format(msg,8,"%s%s%s:%d%d%d",string[0],string[1],string[2],string[3],string[4],string[5]);
format(tInfo[nuomTransp][Numeriai],8,"%s",msg);
SetVehicleNumberPlate(nuomTransp,tInfo[nuomTransp][Numeriai]);
SetVehicleToRespawn(nuomTransp);