The online racing simulator
Need help with this bit of code
(5 posts, started )
Need help with this bit of code
Hia guys can anyone tell me were i went wrong here, all im trying to do is make a button apper on the screen to a player and give the option to take away cash.

When playerA types the command !tow (AMOUNT) playerB, it should create a few buttons to playerB saying PlayerA wants to tow you do you except yes/no, if yes then -(AMOUNT) and gives to playerA if no then says playerB refuses your offer

here's the code
[SIZE=2][COLOR=#0000ff]
[SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"!tow"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (StrMsg.Length > 2)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] TradeCash = 0;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]try[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2]TradeCash = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ToInt32(StrMsg[2]);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (TradeCash >= 0)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]clsConnection[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Recipient [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Connections)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Recipient.Username == Msg.Remove(0, (9 + StrMsg[1].Length + StrMsg[2].Length)))[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Recipient.Cash >= TradeCash)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^7"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(MSO.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" wants to tow you."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_LEFT, 5, 100, 30, 72, 215, Recipient.UniqueID, 40, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^7Price: €"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + TradeCash, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_LEFT, 5, 100, 35, 72, 216, Recipient.UniqueID, 40, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^7Do you except the tow?"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_LEFT, 5, 100, 40, 72, 217, Recipient.UniqueID, 40, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^2Yes"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_C1 | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_DARK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_CLICK, 5, 10, 47, 77, 218, Recipient.UniqueID, 40, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1No"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_C1 | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_DARK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_CLICK, 5, 10, 47, 97, 219, Recipient.UniqueID, 40, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]SenderUCID = MSO.UCID;[/SIZE]
[SIZE=2]SentMoney = TradeCash;[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 The recipient doesn't have enough cash!"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Invalid selection. Please try again"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]catch[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 an error in code has happened please contact a admin"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Invalid command. Please see ^2!help^7 for a command list"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]

thanks guys
costom button bit forgot sry

[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 215:
Connections[GetConnIdx(SenderUCID)].Cash += [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ToInt32(SentMoney - (SentMoney / 20));
Connections[GetConnIdx(BTC.UCID)].Cash -= SentMoney;
InSim.Send_BFN_DeleteButton(0, 215, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 216, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 217, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 218, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 219, BTC.UCID);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Transaction complete. Thank you for you custom!"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], BTC.UCID, 0);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Transaction complete."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], SenderUCID, 0);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 You received €"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + SentMoney + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" - 5% tax (€"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ToInt32(SentMoney - (SentMoney / 20)) + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]")"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], SenderUCID, 0);
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"/msg ^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(SenderUCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" Towed"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"/msg ^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(BTC.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" for €"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + SentMoney);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];

[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 216:
InSim.Send_BFN_DeleteButton(0, 215, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 216, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 217, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 218, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 219, BTC.UCID);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(BTC.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" rejected your offer"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], SenderUCID, 0);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE]

anyone got any ideas.?
-
(Heiko1) DELETED by Heiko1
-
(Heiko1) DELETED by Heiko1
Sweet sorry just got in, testin it now

thanks in advance
tryed it like this still not playing well no erros just when u try to do it halts at error cant find user ?

[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"!tow"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (StrMsg.Length > 2)
{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]try
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Send = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Parse(StrMsg[1]);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]bool[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SendComplete = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]clsConnection[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] i [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Connections)
{
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (i.Username == Msg.Remove(0, 7 + StrMsg[1].Length))
{
SendComplete = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (StrMsg[1].Contains([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"-"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]))
{
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1Send Error. Please don't use minus values!"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Connections[GetConnIdx(MSO.UCID)].Cash >= Send)
{
InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(MSO.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^7 wants to tow you for^2 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(MSO.UCID)] .Cash + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"€"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_DARK, 8, 60, 30, 20, 215, i.UniqueID, 1, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"Accept"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_DARK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_CLICK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_C4, 6, 15, 40, 20, 216, i.UniqueID, 1, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
InSim.Send_BTN_CreateButton([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"Denied"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_DARK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_CLICK | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_C1 | [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Flags[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]ButtonStyles[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ISB_C4, 6, 15, 40, 40, 217, i.UniqueID, 1, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Connections[GetConnIdx(MSO.UCID)].Cash < Send)
{
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1You don't have enough cash to complete the transaction."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);
}
}
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (SendComplete == [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])
{
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1Send Error. User not found."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);
}
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]catch
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1Error has occured. Amount too high."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);
}
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^1Invalid send command. Please try again."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], MSO.UCID, 0);
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE]

[SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 215:
Connections[GetConnIdx(SenderUCID)].Cash += [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Convert[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].ToInt32(SentMoney - (SentMoney / 20));
Connections[GetConnIdx(BTC.UCID)].Cash -= SentMoney;
InSim.Send_BFN_DeleteButton(0, 215, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 216, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 217, BTC.UCID);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Transaction complete. Thank you for you custom!"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], BTC.UCID, 0);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 Transaction complete."[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], SenderUCID, 0);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 You received €"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + SentMoney + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"for this tow"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] , SenderUCID, 0);
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"/msg ^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(SenderUCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" Towed"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"/msg ^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(BTC.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" for €"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + SentMoney);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];

[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] 216:
InSim.Send_BFN_DeleteButton(0, 215, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 216, BTC.UCID);
InSim.Send_BFN_DeleteButton(0, 217, BTC.UCID);
InSim.Send_MTC_MessageToConnection([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"^6|^7 "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] + Connections[GetConnIdx(BTC.UCID)].Username + [/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]" rejected your offer"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], SenderUCID, 0);
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE]


Need help with this bit of code
(5 posts, started )
FGED GREDG RDFGDR GSFDG