am si eu o problema la comanda /carplate de pe gamemode-ul hpq123
cand folosesc aceasta comanda imi spune ca Numarul de inmatriculare a fost salvat. Acesta se va pune automat la urmatorul respawn al vehiculului, totul bine pana aici , dar daca folosesc comanda /park imi spune ca nu sunt intr-un vehicul personal
Mai jos aveti comanda
YCMD:carplate(playerid, params[], help) {
new string[128], plate[10];
new car = GetPlayerVehicleID(playerid);
if(Iter_Count(MyVehicle[playerid]) == 0)
return SendClientMessage(playerid, COLOR_ERROR, "Eroare: {FFFFFF}Nu ai un vehicul personal!");
if(sscanf(params, "s[10]", plate))
return SendClientMessage(playerid, COLOR_GREY, "Syntax: {FFFFFF}/carplate <Car Plate>");
if(GetPersonalCar(playerid, car) == -1)
return SendClientMessage(playerid, COLOR_ERROR, "Eroare: {FFFFFF}Nu esti in unul dintre vehiculele tale personale!");
new idd = PersonalCar(playerid);
if(strfind(plate, "'", true) != -1 || strfind(plate, "Model", true) != -1 || strfind(plate, "`", true) != -1)
return SendClientMessage(playerid, -1, "Caractere invalide!");
if(strlen(plate) > 10)
return SendClientMessage(playerid, -1, "Numarul de inmatriculare poate avea maxim 10 caractere!");
if(idd == 0)
return SendClientMessage(playerid, -1, "Acest vehicul nu iti apartine!");
if(CarInfo[idd][Spawned] == 0)
return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Vehiculul tau nu este spawnat!");
if(PlayerMoney(playerid, 5000))
return SendClientMessage(playerid, COLOR_GREY, "Nu ai $5,000!");
SetVehicleNumberPlate(CarInfo[idd][Spawned], plate);
GivePlayerCash(playerid, 0, 5000);
BizzInfo[16][bBalance] += 5000;
format(string, sizeof(string), "Numarul de inmatriculare a fost salvat. Acesta se va pune automat la urmatorul respawn al vehiculului");
SendClientMessage(playerid, COLOR_LGREEN, string);
format(string, sizeof(string), "%s", plate);
if(PlayerInfo[playerid][pPremiumAccount] != 0) format(CarInfo[idd][cLicense], 100, "{FF0000}%s", plate);
if(PlayerInfo[playerid][pVip] != 0) format(CarInfo[idd][cLicense], 100, "{F0B548}%s", plate);
else format(CarInfo[idd][cLicense], 100, "%s", plate);
mysql_format(SQL, string, sizeof(string), "UPDATE cars SET License='%s' WHERE ID=%d", plate, CarInfo[idd][cID]);
mysql_tquery(SQL, string, "", "");
mysql_format(SQL, string, sizeof(string), "UPDATE bizz SET Till = %d WHERE ID = %d",BizzInfo[16][bBalance],5);
mysql_tquery(SQL, string, "", "");
return true;
}