09.07.2009, 21:17
Код:
if(strcmp(cmd, "/vrn", true) == 0) { new VR1 = random(sizeof(vehreglet)); new VR2 = random(sizeof(vehregnum)); new VRF[256]; format(VRF, sizeof(VRF), "%s%s%s%s%s%s%s%s%s",vehreglet[VR1][0],vehregnum[VR2][0],vehreglet[VR1][1],vehregnum[VR2][1],vehreglet[VR1][2],vehregnum[VR2][2],vehreglet[VR1][3],vehregnum[VR2][3],vehreglet[VR1][4]); MYVARIABLE = VRF; new string[256]; format(string, sizeof(string), "%s", MYVARIABLE); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; }
VR2 is getting a random array from vehregnum.
Let's say VR1 gets the letter h and VR2 lets the number 9. I want to put those together so they form "h9". And store that in MYVARIABLE. I wanna do this so later I could store it in SQL. Any ideas?