hi guys got another problem i've made a button when clicked for it to open a text box to allow user input i just don't know how to code the input that was made.
that's the header i need to put the input but i need it to use my !withdraw command i know i gotta use BTT packets but i just dont know how to code it the forums so far hasn't been much help in telling me exactly what i need to code/write
If somebody could help me on how to write/code the first line even on how to read the input and take it from the players bank and into the players cash, would be greatly appreciated.
if (Connections[GetConnIdx(BTC.UCID)].InBank == 1) // Withdraw
{
}
that's the header i need to put the input but i need it to use my !withdraw command i know i gotta use BTT packets but i just dont know how to code it the forums so far hasn't been much help in telling me exactly what i need to code/write
case "!withdraw":
if (Connections[GetConnIdx(MSO.UCID)].InBank == 1)
{
int Withdraw = int.Parse(StrMsg[1]);
{
if (StrMsg[1].Contains("-"))
{
InSim.Send_MTC_MessageToConnection("^1* ^3Error. Please don't use minus values!", MSO.UCID, 0);
}
else if (Connections[GetConnIdx(MSO.UCID)].BankBalance >= Withdraw)
{
Connections[GetConnIdx(MSO.UCID)].BankBalance -= Withdraw;
Connections[GetConnIdx(MSO.UCID)].Cash += Withdraw;
Connections[GetConnIdx(MSO.UCID)].Timer = 60;
Connections[GetConnIdx(MSO.UCID)].TodaysCash += Withdraw;
InSim.Send_MTC_MessageToConnection("^1*^3 Your new Bank Balance is ^7£" + Connections[GetConnIdx(MSO.UCID)].BankBalance, MSO.UCID, 0);
}
else if (Connections[GetConnIdx(MSO.UCID)].BankBalance < Withdraw)
{
InSim.Send_MTC_MessageToConnection("^1* ^3You don't have enough cash to complete the transaction.", MSO.UCID, 0);
}
}
}
break;
If somebody could help me on how to write/code the first line even on how to read the input and take it from the players bank and into the players cash, would be greatly appreciated.