Jump to content
  • Chatbox

    Load More
    You don't have permission to chat.

Recommended Posts

Posted (edited)

Salut, sunt nou in in scripting si am si eu o problema la sellcar pentru ds cand vand o masina si o cumpar eu sau alt cineva unele sisteme raman salvate cum ar fi stage rainbow vip plus neon, dar in mare parte am vazut ca ramane salvat doar vip plus si neon-ul. Nu stiu cum sa rezolv, ma poate ajuta cineva va rog frumos din suflet?

Am lasat mai jos codul, am uitat sa precizez dar folosesc gamemode hpq123

 

        case DIALOG_SELLCAR: {
            if(!response) return true;
            new vsid = PlayerSellCar[playerid];
            if(CarInfo[vsid][Spawned] == 0) return true;
                        
            new value;
            if(CarInfo[vsid][cSpecial] != 1) value = CarInfo[vsid][cValue] / 2;
            else value = CarInfo[vsid][cValue];

            GivePlayerCash(playerid, 1, value);
            format(string, sizeof(string), "Ai primit $%s pentru ca ti-ai vandut vehiculul!",FormatNumber(value), "%%");
            SCM(playerid,COLOR_MONEY,string);
                        
            format(string, sizeof(string), "%s si-a vandut vehiculul %s[%d] (la stat) si a primit $%s.", GetName(playerid), aVehicleNames[CarInfo[vsid][cModel]-400], vsid, FormatNumber(value));
            SendAdminMessage(COLOR_YELLOW, string, 1); 
            InsertLog(playerid, string, LOG_CAR);    
            DestroyPlayerCar(vsid);
            Iter_Remove(MyVehicle[playerid], vsid);
            Iter_Remove(PersonalVehicles, vsid);
            mysql_format(SQL, gQuery, sizeof(gQuery), "DELETE FROM `cars` WHERE `ID`='%d' LIMIT 1", CarInfo[vsid][cID]);
            mysql_tquery(SQL, gQuery, "", "");
            foreach(Player, i) {
                if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
                    if(GetPVarInt(i, "OfferBy") == playerid) {
                        SCM(playerid, -1, "Afacerea a fost anulata!");
                        SCM(i, -1, "Afacerea a fost anulata!");
                        SetPVarInt(i, "OfferBy", -1);        
                    }
                    if(TradePlayer[i] == playerid) {
                        SCM(playerid, -1, "Afacerea a fost anulata!");
                        SCM(i, -1, "Afacerea a fost anulata!");                
                        TradePlayer[i] = -1;
                    }
                }
            }            
        }

si inca codul asta

                case 5: {
                    if(TradeID[playerid] != -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti folosi aceasta comanda atata timp cat esti implicat intr-o afacere!");
                    if(CarInfo[vsid][Spawned] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Vehiculul tau nu este spawnat!");
                    if(!PlayerToPoint(5,playerid, 1487.0498,-2287.2930,13.7529)) return SCM(playerid, COLOR_WHITE, "Trebuie sa fii la dealership. Foloseste /gps pentru a afla unde este.");
                    if(IsAttached(CarInfo[vsid][Spawned])) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti folosi aceasta functie momentan!");
                    new value;
                    if(CarInfo[vsid][cSpecial] != 1) value = CarInfo[vsid][cValue] / 2;
                    else value = CarInfo[vsid][cValue];
                    format(string, sizeof(string), "You're sure you want to sell your %s for %s?",aVehicleNames[CarInfo[vsid][cModel]-400],FormatNumber(value));
                    ShowPlayerDialog(playerid, DIALOG_SELLCAR, DIALOG_STYLE_MSGBOX, "Dealership", string, "Select", "Cancel");
                    PlayerSellCar[playerid] = vsid;
                    if(CP[playerid] == 43 || CP[playerid] == 53) { CP[playerid] = 0; DisablePlayerCheckpointEx(playerid); }
                }

Va rog sa ma ajutati ca sunt nou aici si vreau sa invat cat mai multe dar bug-ul acesta nu il pot rezolva. Multumesc mult!

Edited by Zorzonel

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...