- 0
Problema comanda cars
-
Similar Content
-
- 4 replies
- 412 views
-
- 1 answer
- 220 views
-
- 3 answers
- 948 views
-
- 3 answers
- 337 views
-
- 3 replies
- 389 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
robert777
Problema intalnita (descriere):Salut vin cu o problema putin mai incurcata sper sa intelegeti , am adaugat un nou slot la masini personale la comanda /cars slotul 2 nu mai apare scrie slot 3 (cel nou adaugat) iar daca dau ok pe slot 3 este de fapt 2 iar adevaratul slot 3 nu apare
Ero(area / rile) / warning-(ul / urile):
Comanda cars
CMD:cars(playerid, params[])
{
new param4[1000];
if(playerVariables[playerid][pCarModel] >= 1)
{
format(param4, sizeof(param4), "[Masina %s] \t[ID %d] \t{66FF00}[Manager Masina]", VehicleNames[playerVariables[playerid][pCarModel] - 400], playerVariables[playerid][pCarID]);
CanSelect[playerid] = 1;
}
else
{
param4 = "Masina Personala 1 \t[Slot Disponibil] \t{FF0000}[Manager Indisponibil]";
CanSelect[playerid] = 0;
}
format(szMessage, sizeof(szMessage), "%s", param4);
if(playerVariables[playerid][pCarModel2] >= 1)
{
format(param4, sizeof(param4), "[Masina %s] \t[ID %d] \t{66FF00}[Manager Masina]", VehicleNames[playerVariables[playerid][pCarModel2] - 400], playerVariables[playerid][pCarID2]);
CanSelect2[playerid] = 1;
}
else
{
param4 = "Masina Personala 2 \t[Slot Disponibil] \t{FF0000}[Manager Indisponibil]";
CanSelect2[playerid] = 0;
}
if(playerVariables[playerid][pCarModel3] >= 1)
{
format(param4, sizeof(param4), "[Masina %s] \t[ID %d] \t{66FF00}[Manager Masina]", VehicleNames[playerVariables[playerid][pCarModel3] - 400], playerVariables[playerid][pCarID3]);
CanSelect3[playerid] = 1;
}
else
{
param4 = "Masina Personala 3 \t[Slot Disponibil] \t{FF0000}[Manager Indisponibil]";
CanSelect3[playerid] = 0;
}
format(szMessage, sizeof(szMessage), "%s\n%s\n%s", szMessage,param4);
ShowPlayerDialog(playerid, DIALOG_CARS, DIALOG_STYLE_TABLIST, "Masini Personale", szMessage, "Select", "Cancel");
return 1;
}
DIALOG_CARS
case DIALOG_CARS:
{
if(response)
{
switch(listitem)
{
case 0:
{
if(CanSelect[playerid] == 1)
{
new param4[269];
if(playerVariables[playerid][pCarModel] >= 400)
format(param4, sizeof(param4), "%s (ID %d)", VehicleNames[playerVariables[playerid][pCarModel] - 400], playerVariables[playerid][pCarID]);
else
param4 = "None";
new quer[256], dayss;
mysql_format(handle, quer, 256, "SELECT * FROM playeraccounts WHERE playerID = '%d'", playerVariables[playerid][pInternalID]);
new Cache: result22 = mysql_query(handle, quer);
if(cache_get_row_count() != 0)
{
cache_get_field_content(0, "playerCarDays", result); dayss = strval(result);
}
cache_delete(result22);
selcar[playerid] = 1;
format(szMessage, sizeof(szMessage), "Vehicle: %s\nInsurance: %d\nKM: %.0f kilometers\nDays: %d", param4, playerVariables[playerid][pCarInsurance], playerVariables[playerid][pCarKM], dayss);
ShowPlayerDialog(playerid, DIALOG_CARS2, DIALOG_STYLE_MSGBOX, "Server: Personal Cars", szMessage, "Manage", "Cancel");
}
else
{
hidePlayerDialog(playerid);
}
}
case 1:
{
if(CanSelect2[playerid] == 1)
{
new param4[269];
if(playerVariables[playerid][pCarModel2] >= 400)
format(param4, sizeof(param4), "%s (ID %d)", VehicleNames[playerVariables[playerid][pCarModel2] - 400], playerVariables[playerid][pCarID2]);
else
param4 = "None";
new quer[256], dayss;
mysql_format(handle, quer, 256, "SELECT * FROM playeraccounts WHERE playerID = '%d'", playerVariables[playerid][pInternalID]);
new Cache: result22 = mysql_query(handle, quer);
if(cache_get_row_count() != 0)
{
cache_get_field_content(0, "playerCarDays2", result); dayss = strval(result);
}
cache_delete(result22);
selcar[playerid] = 2;
format(szMessage, sizeof(szMessage), "Vehicle: %s\nInsurance: %d\nKM: %.0f kilometers\nDays: %d", param4, playerVariables[playerid][pCarInsurance], playerVariables[playerid][pCarKM], dayss);
ShowPlayerDialog(playerid, DIALOG_CARS2, DIALOG_STYLE_MSGBOX, "Server: Personal Cars", szMessage, "Manage", "Cancel");
}
else
{
hidePlayerDialog(playerid);
}
}
case 2:
{
if(CanSelect3[playerid] == 1)
{
new param4[269];
if(playerVariables[playerid][pCarModel3] >= 400)
format(param4, sizeof(param4), "%s (ID %d)", VehicleNames[playerVariables[playerid][pCarModel3] - 400], playerVariables[playerid][pCarID3]);
else
param4 = "None";
new quer[256], dayss;
mysql_format(handle, quer, 256, "SELECT * FROM playeraccounts WHERE playerID = '%d'", playerVariables[playerid][pInternalID]);
new Cache: result22 = mysql_query(handle, quer);
if(cache_get_row_count() != 0)
{
cache_get_field_content(0, "playerCarDays3", result); dayss = strval(result);
}
cache_delete(result22);
selcar[playerid] = 3;
format(szMessage, sizeof(szMessage), "Vehicle: %s\nInsurance: %d\nKM: %.0f kilometers\nDays: %d", param4, playerVariables[playerid][pCarInsurance], playerVariables[playerid][pCarKM], dayss);
ShowPlayerDialog(playerid, DIALOG_CARS3, DIALOG_STYLE_MSGBOX, "Server: Personal Cars", szMessage, "Manage", "Cancel");
}
else
{
hidePlayerDialog(playerid);
}
}
}
}
}
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:
Link to comment
Share on other sites
8 answers to this question
Recommended Posts