Originally Posted by Ballu Miaa
Here you go!
There are two methods to this!
The First Method:
pawn Код:
new const NumeriuRaides[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; new const NumeriuSkaiciai[] = "0123456789";
new string[6],msg[10]; format( string[0],1,"%s",NumeriuRaides[random(sizeof(NumeriuRaides))]); format( string[1],1,"%s",NumeriuRaides[random(sizeof(NumeriuRaides))]); format( string[2],1,"%s",NumeriuRaides[random(sizeof(NumeriuRaides))]); format( string[3],1,"%d",NumeriuSkaiciai[random(sizeof(NumeriuSkaiciai))]); format( string[4],1,"%d",NumeriuSkaiciai[random(sizeof(NumeriuSkaiciai))]); format( string[5],1,"%d",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);
Or the Second Method:
pawn Код:
new const NumeriuRaides[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; new const NumeriuSkaiciai[] = "0123456789";
new string[6],msg[10]; for(new i=0;i<3;i++) { format( string[i],1,"%s",NumeriuRaides[random(sizeof(NumeriuRaides))]); } for(new i=3;i<=5;i++) { format( string[i],1,"%s",NumeriuRaides[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);
|