give random money and msg print if its low or high - 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)
+--- Thread: give random money and msg print if its low or high (
/showthread.php?tid=423682)
give random money and msg print if its low or high -
omidi - 18.03.2013
Код:
new mrand =random(1000);
if (mrand <= 100) // i also tried >= or == and not worked
{
format(string,sizeof(string),"u get under 100 money.!",mrand);
SendClientMessage(i,COLOR_RED,string);
}
else
format(string,sizeof(string),"u get more than 100 money.!",mrand);
SendClientMessage(i,COLOR_RED,string);
{
but it wont show msg at all
it will only show msg about u got high moneyu but not for low money
Re: give random money and msg print if its low or high -
Konstantinos - 18.03.2013
Try this:
pawn Код:
printf("DEBUG No.1 >> playerid = %d", i);
new mrand =random(1000);
if (mrand <= 100) SendClientMessage(i,COLOR_RED,"Under 100");
else SendClientMessage(i,COLOR_RED,"More than 100");
print("DEBUG No.2");
Does it print these messages I wrote in the console?
Re: give random money and msg print if its low or high -
omidi - 18.03.2013
LOL ITS WORKED
thanks you