17.07.2015, 15:35
Hi guys i have a problem, i want to make a random part message, so make random just a part of a string, i'll show you the bugged code, that i want someone teach me to fix , infact when i go in game and type the cmd, i got the string, but no showing the random mex, making an empty word-part (Just Showing: Sir %s,), and no more.
CODE:
new sonylikes[6][128] =
{
"i really don't like this, and i am sincerely ",
"i love it ! How do you know it ! <3 ",
"i really like it, as of now ! ",
"no, i don't like so much, but i respect other opinions, always !",
"with all [~SDC] & my respect, but are you fucking kidding me?",
"i am a server machine, please don't kid me, also if i answer 'i like', but i shouldn't do it "
};
CMD:test[etc...]{
new str[128], sonylike = random(sizeof(sonylikes));
format(str, sizeof(str), "Sir %s, %s", PlayerName2(playerid), sonylike);
SendClientMessage(playerid, white, str);
return 1;
}
why the random string part is not showing when i type the cmd ?
Thanks to all
CODE:
new sonylikes[6][128] =
{
"i really don't like this, and i am sincerely ",
"i love it ! How do you know it ! <3 ",
"i really like it, as of now ! ",
"no, i don't like so much, but i respect other opinions, always !",
"with all [~SDC] & my respect, but are you fucking kidding me?",
"i am a server machine, please don't kid me, also if i answer 'i like', but i shouldn't do it "
};
CMD:test[etc...]{
new str[128], sonylike = random(sizeof(sonylikes));
format(str, sizeof(str), "Sir %s, %s", PlayerName2(playerid), sonylike);
SendClientMessage(playerid, white, str);
return 1;
}
why the random string part is not showing when i type the cmd ?
Thanks to all