The online racing simulator
#1 - Djili
Cruise Car Shop Sell Button
Hello! I was made Buy button and work 100%.. When click button i buy the car, but when click sell button i sell car, but dont get money... I use for Conn.Cash this: Is this wrong?

Conn.Cash += Dealer.GetCarValue("XFG");

#2 - Djili
Someone?
You are sharing an awesome lot of information. I don't think a lot of people have any clue what the hell you are talking about.
#4 - Djili
Okay Sorry... I was tried to make Car Dealer Shop in cruise.. I make XRG buy button for the car, and work.. When click to ''Buy'' i buy car(XRG) but when to try sell i sell car but i dont get money..
How about some debugging? Set a breakline at that line you posted for example. Check if the method you're calling actually returns a value.
Quote from Djili :Okay Sorry... I was tried to make Car Dealer Shop in cruise.. I make XRG buy button for the car, and work.. When click to ''Buy'' i buy car(XRG) but when to try sell i sell car but i dont get money..

Your example was selling an XFG, not an XRG.

Perhaps try:

Conn.Cash += Dealer.GetCarValue("XRG");

Or provide more code.
#7 - Djili
Again not work....

Conn.Cash += Dealer.GetCarValue("XRG");
If you don't show us more code we can't help you like that. I am guessing you are using wrong button id, or could be anything.
#9 - Djili
case 162:
string UserCars = Conn.Cars;
int IdxCar = UserCars.IndexOf("XFG");

try
{
Conn.Cars = Conn.Cars.Remove(IdxCar, 4);
}
catch
{
Conn.Cars = Conn.Cars.Remove(IdxCar, 3);
}
if (Conn.Cars.Contains("XFG") == true)
{

string Cars = Conn.Cars.Remove(Conn.UniqueID, 3);
Conn.Cars = Conn.Cars.Remove(Conn.UniqueID, 4);
Conn.Cash += Dealer.GetCarValue("XFG");
MsgAll("^7 " + Conn.PlayerName + " ^7sell a ^1XFG");
InSim.Send_MTC_MessageToConnection("^7 You have sell ^1(XFG) ^7from Garage", Conn.UniqueID, 1);
InSim.Send_MTC_MessageToConnection("^7 Price Tag: ^1€" + Dealer.GetCarPrice("XFG") + " ^7You have: ^2€" + Conn.Cash + " ^7left", Conn.UniqueID, 1);
}



break;

FGED GREDG RDFGDR GSFDG