Hi again! sorry for my post last night but i was sleepy! Sorry!
Now lets start!
I am trying to do a car dealer. I made the house,interface,
and now i work for buy/ sell buttons
Here is the code:
string Cars = Connections[GetConnIdx(BTC.UCID)].Cars;
switch (StrMsg[1].ToUpper())
{
case "XRG":
Cars = Cars + " " + "XRG";
Connections[GetConnIdx(BTC.UCID)].Cars = Cars;
Connections[GetConnIdx(BTC.UCID)].Cash -= Dealer.GetCarPrice("XRG");
MsgAll("^4|^7 " + Connections[GetConnIdx(BTC.UCID)].PlayerName + " ^7bought a ^1XRG");
InSim.Send_MTC_MessageToConnection("^4|^7 You have bought ^1XR GTi (XRG) ^7in Garage", BTC.UCID, 0);
InSim.Send_MTC_MessageToConnection("^4|^7 Price Tag: ^1$" + Dealer.GetCarPrice("XRG") + " ^7You have: ^2$" + Connections[GetConnIdx(BTC.UCID)].Cash + " ^7left", BTC.UCID, 0);
break;
Now when i put that in button click i get error cuz the "StrMsg[1]." So what i must to chenge to get it work in button click