The online racing simulator
Text Popup Help
Hello, I was wondering if Anyone could Help me with this!

How in the World can i make a button in the bank when you click on it a popup says "Enter Amount to Insert" etc.

I am using LFS_External!
MCI Updates + InSim.Button
Quote from skywatcher122 :MCI Updates + InSim.Button

I don't understand that...

I will Provide the button code

InSim.Send_BTN_CreateButton("^7Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);

Quote from skywatcher122 :MCI Updates + InSim.Button

Not even I got the point.
Quote from stuntguy3000 :I don't understand that...

I will Provide the button code

InSim.Send_BTN_CreateButton("^7Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);


Type //> InSim.Send_BTN_CreateButton( <\\ and you should get value input help(if.. that.. made any sense). You can see that there are 2 additional parameters that you can fill in. This makes the button an input one(god, did this explanation suck or what).

And when I have some free time I will give you a piece of code to look at, even tho that I don't like this practice a lot, and even tho that this question has been answered a lot.

While no reply arrives from anyone giving correct help, you, stuntguy, can search the forums a bit more to find the solution to your problem(because I am sure that it has been answered in not just one thread).
Quote from stuntguy3000 :I don't understand that...

I will Provide the button code

InSim.Send_BTN_CreateButton("^7Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);


Add this
InSim.Send_BTN_CreateButton("^7Deposit", "Enter amount to Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);

Highlight means it will activate the BTT Packet

to BTT Packet


switch (BTT.ClickID)
{
case 204:
if (Connections[GetConnIdx(BTT.UCID)].InBank == 1)
{
int Withdraw = int.Parse(BTT.Text);
{
if (BTT.Text.Contains("-"))
{
InSim.Send_MTC_MessageToConnection("^1Error. Please don't use minus values!", BTT.UCID, 0);
}
else if (Connections[GetConnIdx(BTT.UCID)].BankBalance >= Withdraw)
{
Connections[GetConnIdx(BTT.UCID)].BankBalance -= Withdraw;
Connections[GetConnIdx(BTT.UCID)].Cash += Withdraw;
Connections[GetConnIdx(BTT.UCID)].Timer = 60;
InSim.Send_MTC_MessageToConnection("^7You have succesfully withdrawn ^6$" + Withdraw + " ^7from the bank.", BTT.UCID, 0);
InSim.Send_BTN_CreateButton("^7Your bank balance is ^6$" + Connections[GetConnIdx(BTT.UCID)].BankBalance, Flags.ButtonStyles.ISB_LEFT, 4, 40, 65, 54, 163, Connections[GetConnIdx(BTT.UCID)].UniqueID, 2, false);
}
else if (Connections[GetConnIdx(BTT.UCID)].BankBalance < Withdraw)
{
InSim.Send_MTC_MessageToConnection("^1You don't have enough cash to complete the transaction.", BTT.UCID, 0);
}
}
}
break;
}

rofl I made a code for u
yh i dnt get tht either its kinda hard to me cause i was coding a botton then i forgot that i add to add somthing like that but any way im learning how to do tht =) if not then hope one of u pros help me out
Quote from skywatcher122 :Add this
InSim.Send_BTN_CreateButton("^7Deposit", "Enter amount to Deposit", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 5, 20, 50, 125, 204, 204, Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 2, false);

Highlight means it will activate the BTT Packet

to BTT Packet


switch (BTT.ClickID)
{
case 204:
if (Connections[GetConnIdx(BTT.UCID)].InBank == 1)
{
int Withdraw = int.Parse(BTT.Text);
{
if (BTT.Text.Contains("-"))
{
InSim.Send_MTC_MessageToConnection("^1Error. Please don't use minus values!", BTT.UCID, 0);
}
else if (Connections[GetConnIdx(BTT.UCID)].BankBalance >= Withdraw)
{
Connections[GetConnIdx(BTT.UCID)].BankBalance -= Withdraw;
Connections[GetConnIdx(BTT.UCID)].Cash += Withdraw;
Connections[GetConnIdx(BTT.UCID)].Timer = 60;
InSim.Send_MTC_MessageToConnection("^7You have succesfully withdrawn ^6$" + Withdraw + " ^7from the bank.", BTT.UCID, 0);
InSim.Send_BTN_CreateButton("^7Your bank balance is ^6$" + Connections[GetConnIdx(BTT.UCID)].BankBalance, Flags.ButtonStyles.ISB_LEFT, 4, 40, 65, 54, 163, Connections[GetConnIdx(BTT.UCID)].UniqueID, 2, false);
}
else if (Connections[GetConnIdx(BTT.UCID)].BankBalance < Withdraw)
{
InSim.Send_MTC_MessageToConnection("^1You don't have enough cash to complete the transaction.", BTT.UCID, 0);
}
}
}
break;
}

rofl I made a code for u

THANKS SO MUCH!!!!! lol
Quote from stuntguy3000 :THANKS SO MUCH!!!!! lol

2 Problems:

When i click the Button the text input does come up but it the text field in white is says Withdraw??????

And

When i click ok nothing happens (But it you enter text then hit ok the whole insim crashes)

HELP!
then how can you see the grammar and change it perhap :auto:

FGED GREDG RDFGDR GSFDG