Yo, wie multipliziere ich den inputtext?
Sprich:
C
ublic OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_GAME)
{
if(response)
{
if(strval(inputtext) < 2500 || strval(inputtext) > 10000)
{
ShowPlayerDialog(playerid,DIALOG_GAME, DIALOG_STYLE_INPUT, "Set a bet", "Type in for how much money you want to buy a ticket.", "Buy", "Cancel");
return SendClientMessage(playerid,0x00FF00FF, "{FF1717}ERROR:{FFFFFF} You must set a bet from 2.500$ to 10.000$ at least.");
}
new str[145];
//format(str, sizeof(str), "You have bought a ticket for %i $!", strval(inputtext));
//SendClientMessage(playerid,0x00FF00FF, str);
new zahl = random(300001) + 100000;
format(str, sizeof(str), "Ticketnumber: %d", zahl);
if(random(2) == 0)
{
Showing[playerid] = 1;
format(str, sizeof(str), "You have bought a ticket for %i$ and won %i $ !", strval(inputtext));
SendClientMessage(playerid,0x00FF00FF, str);
PlayerPlaySound(playerid,4201, 0.0, 0.0, 0.0);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4); //Win Textdraw
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawSetString(Textdraw2, str);
SelectTextDraw(playerid, 0xFFFF0000);
}
Alles anzeigen
