Jump to content

[REZOLVAT] Problema sistem


LastGuards
 Share

Recommended Posts

Incearca functia

stock saveCar(idd) {
    if(idd == 0) return 1;
    new query[512];
    mysql_format(SQL, query, sizeof(query),
        "UPDATE `cars` SET `Model`='%d', `Locationx`='%f', `Locationy`='%f', `Locationz`='%f', `Angle`='%f', `ColorOne`='%d', `ColorTwo`='%d', `Owner`='%s', `Value`='%d', `License`='%s', `Userid`='%d', `Virtual`='%d'  WHERE `ID`='%d'",
    CarInfo[idd][cModel], CarInfo[idd][cLocationx], CarInfo[idd][cLocationy], CarInfo[idd][cLocationz], CarInfo[idd][cAngle], CarInfo[idd][cColorOne], CarInfo[idd][cColorTwo], CarInfo[idd][cOwner], CarInfo[idd][cValue],
    CarInfo[idd][cLicense], CarInfo[idd][Userid], CarInfo[idd][cVirtual], idd);
    mysql_tquery(SQL, query, "", "");
    return 1;
}

 

din garage.pwn (Inlocuiesteo !)

Link to comment
Share on other sites

Just now, LastGuards said:

Dupa restart merge, dar nu arata ownerul  scrie : 0

Iar in garage nu sa salvat masina inauntru

Ai aici data de baze de date (cars) > https://www41.zippyshare.com/v/YOJmxrWD/file.html
 

Incearca functia

stock saveCar(idd) {
    if(idd == 0) return 1;
    new query[512];
    mysql_format(SQL, query, sizeof(query),
        "UPDATE `cars` SET `Model`='%d', `Locationx`='%f', `Locationy`='%f', `Locationz`='%f', `Angle`='%f', `ColorOne`='%d', `ColorTwo`='%d', `Owner`='%s', `Value`='%d', `License`='%s', `Userid`='%d', `Virtual`='%d'  WHERE `ID`='%d'",
    CarInfo[idd][cModel], CarInfo[idd][cLocationx], CarInfo[idd][cLocationy], CarInfo[idd][cLocationz], CarInfo[idd][cAngle], CarInfo[idd][cColorOne], CarInfo[idd][cColorTwo], CarInfo[idd][cOwner], CarInfo[idd][cValue],
    CarInfo[idd][cLicense], CarInfo[idd][Userid], CarInfo[idd][cVirtual], idd);
    mysql_tquery(SQL, query, "", "");
    return 1;
}

 

din garage.pwn (Inlocuiesteo !)

Link to comment
Share on other sites

11 hours ago, SorinGamerYT said:

Incearca functia

stock saveCar(idd) {
    if(idd == 0) return 1;
    new query[512];
    mysql_format(SQL, query, sizeof(query),
        "UPDATE `cars` SET `Model`='%d', `Locationx`='%f', `Locationy`='%f', `Locationz`='%f', `Angle`='%f', `ColorOne`='%d', `ColorTwo`='%d', `Owner`='%s', `Value`='%d', `License`='%s', `Userid`='%d', `Virtual`='%d'  WHERE `ID`='%d'",
    CarInfo[idd][cModel], CarInfo[idd][cLocationx], CarInfo[idd][cLocationy], CarInfo[idd][cLocationz], CarInfo[idd][cAngle], CarInfo[idd][cColorOne], CarInfo[idd][cColorTwo], CarInfo[idd][cOwner], CarInfo[idd][cValue],
    CarInfo[idd][cLicense], CarInfo[idd][Userid], CarInfo[idd][cVirtual], idd);
    mysql_tquery(SQL, query, "", "");
    return 1;
} 

 

din garage.pwn (Inlocuiesteo !)

Am facut asta dar acum primesc erroare cand dau /v 

Uite ai aici tot ce trebuie https://pastebin.com/v3qXdqLm

Link to comment
Share on other sites

Pentru a se salva mașina în garaj, du-te la:

case DIALOG_GARAGE1

Și, la cazul 4 (case 4), sau unde ai: if(CarInfo[vsid][Spawned], modifică întregul caz cu:

				case 4: { // rezolvare save
					if(CarInfo[vsid][Spawned] == 0) {
						if(CarInfo[vsid][Confiscated] == 1) return SCM(playerid, -1, "Acest vehicul este confiscat deoarece a fost parcat neregulamentar! Plateste amenda (ultimul rand din meniu).");
						SpawnPlayerCar(vsid);
					}
					else {
						if(IsAttached(CarInfo[vsid][Spawned])) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti folosi aceasta functie momentan!");
						if(IsVehicleOccupied(CarInfo[vsid][Spawned])) return SCM(playerid, COLOR_LGREEN, "Eroare: Vehiculul tau este ocupat!");
						DestroyPlayerCar(vsid);
						format(string, sizeof(string), "[Manage vehicle] Your vehicle, %s, has been despawned.", aVehicleNames[CarInfo[vsid][cModel]-400]);
						SCM(playerid, COLOR_GOLD, string);
					}
				}

 

Discord: Jahen#4481

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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