Jump to content
  • 0

Problema Dealership


cristian9900

Question

Problema intalnita (descriere): Atunci cand incerc sa vand masina la dealership , imi da bani inapoi , dar masina tot la mine ramane , si pe langa asta cateodata merge /v cateodata nu 
 

Ero(area / rile) / warning-(ul / urile): -
 

Liniile de cod / sursa / script-ul(obligatoriu): "Trebuie să îi setezi player.ului cheia 0 folosesti Delete * from ca să o ștergi din baza de date si destroyVehicle ca să o ștergi de pe server  ," - Asta mi-a spus o persoana dupa forum . Dar din baza de date se sterge , dar dupa  server nu ...

    case DIALOG_SELLCAR: {
            if(!response) return 1;
            new vsid = PlayerSellCar[playerid];
            CarInfo[vsid][cID] = -2;
            new value;
            value = floatround((CarInfo[vsid][cValue] * 7) / 10);
            GivePlayerCash(playerid, value);
            format(string, sizeof(string), "{FFB870}Distribuitorul Auto ti-a dat %s$ (60%s din pretul vehiculului).",FormatNumber(value), "%%");
            SendClientMessage(playerid,COLOR_WHITE,string);
            if(CarInfo[PlayerInfo[playerid][pCarKey1]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][0] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey2]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][1] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey3]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][2] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey4]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][3] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey5]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][4] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey6]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][5] = -1;
            else if(CarInfo[PlayerInfo[playerid][pCarKey7]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][6] = -1;

            DestroyVehicle(GetPlayerVehicleID(playerid));

            mysql_format(SQL, string,sizeof(string),"DELETE FROM cars WHERE ID=%d",vsid);
            mysql_tquery(SQL, string, "", "");

            if(PlayerInfo[playerid][pCarKey1] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey1] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey1 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey1],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey2] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey2] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey2 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey2],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey3] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey3] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey3 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey3],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey4] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey4] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey4 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey4],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey5] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey5] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey5 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey5],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey6] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey6] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey6 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey6],PlayerInfo[playerid][pUsername]); }
            if(PlayerInfo[playerid][pCarKey7] == CarInfo[vsid][cID]) { PlayerInfo[playerid][pCarKey7] = 0; mysql_format(SQL, string,sizeof(string),"UPDATE `users`SET CarKey7 = %d WHERE `Name` = '%s'",PlayerInfo[playerid][pCarKey7],PlayerInfo[playerid][pUsername]); }

            mysql_tquery(SQL, string, "", "");
        }


Imagini / Video (optional):-
Ati incercat sa rezolvati singur?: Da , tin sa mentionez ca din baza de date se sterge vehiculul dar nu se sterge dupa server 

Edited by cristian9900
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.