SA-MP Forums Archive
Help with Licplates please. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Licplates please. (/showthread.php?tid=211984)



Help with Licplates please. - Danny - 16.01.2011

Hello,

I need some help with my random licenseplate system. For some reason, the random function of the letters shows me weird sings like *E_ inststead of normal letters.

Random Function:
Код:
new Licplateletters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Usage:
Код:
format(str2, sizeof str2,"%s%s%s%s %d%d%d",random(sizeof(Licplateletters)),random(sizeof(Licplateletters)),random(sizeof(Licplateletters)),random(sizeof(Licplateletters)),random(sizeof(Licplatenumbers)),random(sizeof(Licplatenumbers)),random(sizeof(Licplatenumbers)));
Please help me make this working.

Thanks,
Danny


Re: Help with Licplates please. - Kase - 16.01.2011

I guess you should use "Licplateletters[random(...)]" and "random(sizeof(maxiumnumber-1))" when formatting the string.

Replace the red pieces with your own code, it should work, let me know


Re: Help with Licplates please. - JamesC - 16.01.2011

Click