02.03.2010, 20:27
Can I make a random number generator, and if yes, how?
random(5); // this will return a number from 0 to 4
public OnPlayerCommandText(playerid, cmdtext[])
{
new
rand = random(10);
if(strval(cmdtext) == rand)
{
SendClientMessage(playerid, COLOR, "You got it!");
GivePlayerCash(playerid, 1000000);
return 0;
}
return 1;
}
Originally Posted by SAWC™
Yes, using random(value):
pawn Code:
pawn Code:
|