Random number wont display
#1

I'm trying to make a random thing
Код:
CMD:gamble(playerid, params[])
{
    new rand = random(1-5);
	new string[64];
	format(string,sizeof(string),"Your number is %i",rand);
    GivePlayerMoney(playerid, -10);
    if(rand == 3)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Your number landed on 3, and you won 50 dollars!");
    }
    else
    {
		SendClientMessage(playerid, COLOR_RED, string);
    }
    return 1;
}
But it shows up in game as "Your number is123124313412"
Reply


Messages In This Thread
Random number wont display - by ExtendedCarbon - 14.09.2013, 20:32
Re: Random number wont display - by DanishHaq - 14.09.2013, 20:35
Re: Random number wont display - by Scenario - 14.09.2013, 20:40
Re: Random number wont display - by Gilbonzo - 14.09.2013, 20:45

Forum Jump:


Users browsing this thread: 1 Guest(s)