SA-MP Forums Archive
dice game - 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: dice game (/showthread.php?tid=550457)



dice game - RonnyCZ - 12.12.2014

Код:
if(dialogid == DIALOG_DICEB && response)
 {
     if(response)
     {
         if(strlen(inputtext))
         {
    new number2 = strval(inputtext);
    //

     new number = 0; 
     while(number == 0)
     {
         number = random(9);
     }

     if(number== strval(inputtext))
     {

         GivePlayerMoney(playerid, (dice_money[playerid]*2));
         new str[128];
      //new string[64];
         format(str,sizeof str,"{FFFFFF}Player %s won the toss Dice %d $ {00FFFF}", Jmeno(playerid),(dice_money[playerid]*2));
      SendClientMessageToAll(-1,str); 
      DICEA[playerid] --;
     }
     else
     {
      SendClientMessage(playerid,-1,"[ HAZARD ] Unfortunately, you lost  again next time!");
      KostkaA[playerid] --;
     }
    }
    else SendClientMessage(playerid, 0xFFFFFFF, "[ HAZARD ] 1 - 9"); 
   }
   else SendClientMessage(playerid, 0xFFFFFFF, "[ HAZARD ] 
You can not enter zero"); 

  }
  else
  {
   SCM(playerid,-1,"You canceled los");
  }
    }
Hi, I need to bear less than 1 and greater than 6 Thank you


Re: dice game - RonnyCZ - 13.12.2014

pls help