02.03.2010, 21:18
Yes, using random(value):
Example:
pawn Code:
random(5); // this will return a number from 0 to 4
pawn Code:
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;
}