08.06.2015, 17:46
Hi all, I'm newbie at MYSQL.
Today I converted my Y_INI Vehicle System to MYSQL.
The register step work very well.
Load vehicle step don't work.
I did:
It don't work. How can I fix this?
Today I converted my Y_INI Vehicle System to MYSQL.
The register step work very well.
Load vehicle step don't work.
I did:
PHP код:
function LoadingVehicle(id)
{
new string[250];
Veicolo[id][ID] = cache_get_field_content_int(0, "ID");
Veicolo[id][Creato] = cache_get_field_content_int(0, "Creato");
Veicolo[id][Modello] = cache_get_field_content_int(0, "Modello");
Veicolo[id][Costo] = cache_get_field_content_int(0, "Costo");
Veicolo[id][Creato] = cache_get_field_content_int(0, "Creato");
Veicolo[id][Colore_uno] = cache_get_field_content_int(0, "Colore_uno");
Veicolo[id][Colore_due] = cache_get_field_content_int(0, "Colore_due");
Veicolo[id][Chiuso] = cache_get_field_content_int(0, "Chiuso");
Veicolo[id][Motore] = cache_get_field_content_int(0, "Motore");
Veicolo[id][Fari] = cache_get_field_content_int(0, "Fari");
Veicolo[id][Bagagliaio] = cache_get_field_content_int(0, "Bagagliaio");
Veicolo[id][Cofano] = cache_get_field_content_int(0, "Cofano");
Veicolo[id][Carburante] = cache_get_field_content_int(0, "Carburante");
Veicolo[id][Acquistato] = cache_get_field_content_int(0, "Acquistato");
Veicolo[id][Distrutto] = cache_get_field_content_int(0, "Distrutto");
Veicolo[id][DiFazione] = cache_get_field_content_int(0, "Fazione");
Veicolo[id][Sirena] = cache_get_field_content_int(0, "Sirena");
Veicolo[id][LimiteCarburante] = cache_get_field_content_int(0, "LimiteCarburante");
Veicolo[id][vX] = cache_get_field_content_float(0, "Posizione_X");
Veicolo[id][vY] = cache_get_field_content_float(0, "Posizione_Y");
Veicolo[id][vZ] = cache_get_field_content_float(0, "Posizione_Z");
Veicolo[id][vA] = cache_get_field_content_float(0, "Posizione_A");
Veicolo[id][rX] = cache_get_field_content_float(0, "Respawn_X");
Veicolo[id][rY] = cache_get_field_content_float(0, "Respawn_Y");
Veicolo[id][rZ] = cache_get_field_content_float(0, "Respawn_Z");
Veicolo[id][rA] = cache_get_field_content_float(0, "Respawn_A");
Veicolo[id][vHP] = cache_get_field_content_float(0, "HP");
cache_get_field_content(0, "Proprietario", Veicolo[id][Proprietario]);
if(Veicolo[id][Creato] == 1)
{
Veicolo[id][vO] = CreateVehicle(Veicolo[id][Modello], Veicolo[id][vX], Veicolo[id][vY], Veicolo[id][vZ], Veicolo[id][vA], Veicolo[id][Colore_uno], Veicolo[id][Colore_due], -1, Veicolo[id][Sirena]);
}
printf("Server: %d veicoli sono stati caricati!", id);
}
function LoadVehicle()
{
for(new id = 1; id < sizeof(Veicolo); id++)
{
new query[2000];
mysql_format(mysql, query, sizeof(query), "SELECT * FROM Veicolo");
mysql_tquery(mysql, query, "LoadingVehicle", "i", id);
}
return 1;
}