SA:MP Random Message-Part -
Rodri99 - 17.07.2015
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
Re: SA:MP Random Message-Part -
andrew01000 - 17.07.2015
Confucius say
not all pasta is good pasta
Re: SA:MP Random Message-Part -
SpikeSpigel - 17.07.2015
new
sonylikes
format(str, sizeof(str), "Sir %s, %s", PlayerName2(playerid), [COLOR="rgb(139, 0, 0)"]sonylike[/COLOR]);
In your define you said SONELIKE[COLOR="rgb(139, 0, 0)"]S[/COLOR] and in the command you didn't PUT the S.