Problem with IDs
#1

Hello guys
I have made a my HQ System, but i have a problem.
I don't know why i can't make more id than 0.

This is my script:

Код:
stock AccendiVeicoloHQProprietario(playerid)
{
new nomeplayer2[24];
GetPlayerName(playerid, nomeplayer2, sizeof(nomeplayer2));
new vehicleid = GetPlayerVehicleID(playerid);
mysql_query("SELECT * FROM hq");
mysql_store_result();
new result[98], x;
while(mysql_retrieve_row())
{
mysql_get_field("hqID", result);
x = strval(result);
}
if(strcmp(PRVInfo[vehicleid][vProprietario], HQPlayer[x][hqNome]) == 0) //Se il veicolo ha il nome dell'HQ
{
if(strcmp(nomeplayer2, HQPlayer[x][hqProprietario]) == 0) //Se il nome del player и come il nome del proprietario dell'HQ
{
SendClientMessage(playerid, COLOR_RED, "Sei proprietario");
}
else
{
SendClientMessage(playerid, COLOR_RED, "NON sei proprietario");
}
}
return 1;
}
x is for ID of HQ's but only the 0 work and the ids 1-2-3-etc... don't work, i don't know why. But i need this script for make good.
"Sei proprietario" is good, i need it, but only with ID 0 work, the others ID are null.
I have the ID 1 HQ and this message don't show for no reason, how i can call all ids?

PS: Im sorry for my terrible english.
Reply
#2

Код:
while(mysql_retrieve_row())
{
mysql_get_field("hqID", result);
x = strval(result);
}
If I am not wrong, the rest of the code is supposed to be inside that loop.
Reply
#3

Im sorry for not reply but i have solved this, thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)