0
0
HJones prieš 9 metus
stock KurtiTMasina(modelid, Float:x, Float:y, Float:z, Float:r)
{
new i = 0;
new str[150], tipass[30];
if(cpData[i][cpDegaluTipas] == 0) tipass = "Benzinas 95";
else if(cpData[i][cpDegaluTipas] == 1) tipass = "Benzinas 98";
else if(cpData[i][cpDegaluTipas] == 2) tipass = "Dyzelinas";
tacka = CreateVehicle(modelid, x, y, z, r, -1, -1, -1);
printf("Turgaus mašina sukurta");
format(str, sizeof(str), "Pavadinimas: {0080FF}%s\n{C0C0C0}Kuro tipas: {0080FF}%s\n{C0C0C0}Kiekis: {0080FF}%i vnt.\n{C0C0C0}Kaina: {0080FF}%i €.", GetVehicleName(tacka), tipass, cpData[i][cpKiekis], cpData[i][cpKaina]);
labelis[tacka] = Create3DTextLabel(str, 0xC0C0C0FF, 0.0, 0.0, 0.0, 20.0, 0, 1 );
Attach3DTextLabelToVehicle(labelis[tacka], tacka, 0.0, 0.0, 0.3);
return 1;
}
0
HJones prieš 9 metus
Oky, tuoj persikursiu pagal tavo duotą pavyzdį, o jeigu pvz aš dabar pasidaręs stocką:+1:
stock KurtiTMasina(modelid, Float:x, Float:y, Float:z, Float:r)
{
for(new i=0; i<MAX_TURGUS; i++)
{
new str[150], tipass[30];
if(cpData[i][cpDegaluTipas] == 0) tipass = "Benzinas 95";
else if(cpData[i][cpDegaluTipas] == 1) tipass = "Benzinas 98";
else if(cpData[i][cpDegaluTipas] == 2) tipass = "Dyzelinas";
tacka = CreateVehicle(modelid, x, y, z, r, -1, -1, -1);
format(str, sizeof(str), "Pavadinimas: {0080FF}%s\n{C0C0C0}Kuro tipas: {0080FF}%s\n{C0C0C0}Kiekis: {0080FF}%i vnt.\n{C0C0C0}Kaina: {0080FF}%i €.", GetVehicleName(tacka), tipass, cpData[i][cpKiekis], cpData[i][cpKaina]);
labelis[tacka] = Create3DTextLabel(str, 0xC0C0C0FF, 0.0, 0.0, 0.0, 20.0, 0, 1 );
Attach3DTextLabelToVehicle(labelis[tacka], tacka, 0.0, 0.0, 0.3);
return 1;
}
return 1;
}
tai i irgi persidaryti į i = 0; ir po kiekvieno sukūrimo pridėti po 1?
EDIT:
Neveikia, vistiek nekrauna... Susidėjau printf pasižiūrėt ar veikia, bet ne, neišprintina.
0
HJones prieš 9 metus
[01:22:51]
[01:22:51] ---------------------------
[01:22:51] MySQL Debugging activated (05/30/15)
[01:22:51] ---------------------------
[01:22:51]
[01:22:51] >> mysql_connect( )
[01:22:51] CMySQLHandler::CMySQLHandler() - constructor called.
[01:22:51] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "grpg_serveris" | Username: "root" ...
[01:22:51] CMySQLHandler::Connect() - Connection was successful.
[01:22:51] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[01:22:51] >> mysql_ping( Connection handle: 1 )
[01:22:51] CMySQLHandler::Ping() - Connection is still alive.
[01:22:51] >> mysql_query( Connection handle: 1 )
[01:22:51] CMySQLHandler::Query(SELECT `vardas` FROM `zaidejai`) - Successfully executed.
[01:22:51] >> mysql_store_result( Connection handle: 1 )
[01:22:51] CMySQLHandler::StoreResult() - Result was stored.
[01:22:51] >> mysql_num_rows( Connection handle: 1 )
[01:22:51] CMySQLHandler::NumRows() - Returned 6 row(s)
[01:22:51] >> mysql_free_result( Connection handle: 1 )
[01:22:51] CMySQLHandler::FreeResult() - Result was successfully free'd.