InSim.Send_BTN_CreateButton("^1Buy", Flags.ButtonStyles.ISB_CLICK, 6, 6, 46, 111, 176, MSO.UCID, 1, false);
switch (BTC.ClickID)
{
#region " XFG "
[COLOR="Red"] case 176:[/COLOR]
if (Conn.Cash > 7999)
{
if (Conn.Cars.Contains("XFG") == false)
{
string Cars = Conn.Cars;
Cars = Cars + " " + "XFG";
Conn.Cars = Cars;
Conn.Cash -= Dealer.GetCarPrice("XFG");
MsgAll("^1)^7 " + Conn.PlayerName + " ^7bought a ^1XFG");
MsgPly("^1)^7 You have bought ^1(XFG) ^7in Garage", Conn.UniqueID, 1);
MsgPly("^1)^7 Price Tag: ^1€" + Dealer.GetCarPrice("XFG") + " ^7You have: ^2€" + Conn.Cash + " ^7left", Conn.UniqueID, 1);
}
}
break;
}
#endregion
struct IS_ACR // Admin Command Report - any user typed an admin command
{
byte Size; // 72
byte Type; // ISP_ACR
byte ReqI; // 0
byte Zero;
byte UCID; // connection's unique id (0 = host)
byte Admin; // set if user is an admin
byte Result; // 1 - processed / 2 - rejected / 3 - unknown command
byte Sp3;
char Text[64];
};
if (HOSTF_CAN_VOTE == 1)
{
InSim.Send_MST_Message ("/vote=no");
}
[Command("help", "help")]
public void help(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
{
if (StrMsg.Length > 0)
{
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
}
}
InSim.Send_BTN_CreateButton("^2Buy", "Maximum Buy 10 and you have " + Conn.Electronics, Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 2, 118, Conn.UniqueID, 2, false);
case 118:
byte Electronics = byte.Parse(BTT.Text);
if (BTT.Text.Contains("-"))
{
MsgPly("^4)^7 Transaction Incorrect. Don't put minus on the values!", BTT.UCID);
}
else
{
if (Electronics > 10)
{
MsgPly("^4)^7 Cannot buy more than^2 10 Electronic Items!", BTT.UCID);
}
else
{
if (Conn.Electronics < 10)
{
if (Conn.Cash > 190 * Electronics)
{
Conn.Electronics += Electronics;
Conn.Cash -= 190 * Electronics;
Conn.TotalSale += Electronics;
MsgPly(Conn.PlayerName + "^7 bought some ^6Electronic^7 for ^2€" + Electronics * 190 + "^7!", BTT.UCID);
MsgPly("^1) Total Electronic: " + Conn.Electronics, BTT.UCID);
if (Conn.LastRaffle == 0)
{
MsgPly("^4)^7 Buy more items and more chances of winning in the ^1Raffle!", BTT.UCID);
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^7Total Item bought: ^2(" + Conn.TotalSale + ")^7 Raffle for ^1€300", Flags.ButtonStyles.ISB_LEFT, 4, 100, 73, 54, 116, Conn.UniqueID, 2, false);
InSim.Send_BTN_CreateButton("^2Raffle!", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 73, 100, 120, Conn.UniqueID, 2, false);
}
}
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^2Buy", "Maximum Buy 10 and you have " + Conn.Electronics, Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 2, 118, Conn.UniqueID, 2, false);
}
}
else
{
MsgPly("^4)^1 Not Enough Cash to complete the transaction.", BTT.UCID);
}
}
else
{
MsgPly("^4)^1 Cannot carry more than 10 items!", BTT.UCID);
}
}
}
#region ' Electronic '
case 118:
if (Conn.Electronics < 10)
{
if (Conn.Cash > 190)
{
Conn.Electronics += 1;
Conn.Cash -= 190;
Conn.TotalSale += 1;
MsgPly(Conn.PlayerName + "^7 bought some ^6Electronic^7!", BTT.UCID);
MsgPly("^1) Total Electronic: " + Conn.Electronics, BTT.UCID);
if (Conn.LastRaffle == 0)
{
MsgPly("^4)^7 Buy more items and more chances of winning in the ^1Raffle!", BTT.UCID);
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^7Total Item bought: ^2(" + Conn.TotalSale + ")^7 Raffle for ^1€300", Flags.ButtonStyles.ISB_LEFT, 4, 100, 73, 54, 116, Conn.UniqueID, 2, false);
InSim.Send_BTN_CreateButton("^2Raffle!", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 73, 100, 120, Conn.UniqueID, 2, false);
}
}
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^2Buy", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 118, Conn.UniqueID, 2, false);
}
}
}
break;
#endregion
<?php
InSim.Send_BTN_CreateButton( Flags.ButtonStyles.ISB_CLICK, , , , 200 MSO.UCID, 40, false);
and in private void BTC_ButtonClicked(Packets.IS_BTC BTC)
switch (BTC.ClickID)
{
#region
case 200:
DeleteBTN(200, BTC.UCID);
break;
}
#endregion
?>