Quote:
Originally Posted by Not available
This has a 50% chance of failing.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/test", cmdtext, true)) { new lucky = random(1); if(lucky == 1) { SendClientMessage(playerid, 0xFF0000FF, "You're lucky.") GivePlayerMoney(playerid, 10000); return 1; } SendClientMessage(playerid, 0xFF0000FF, "You're unlucky.") return 1; } }
|
Well acutally it has 100% chance of failing, this is correct: