01.12.2013, 13:50
I want to create a little comand where showing a dialogbox but it now showing.
The efect of this comand is like
but in debug i have the query
Where is the problem?
Код:
if (strcmp("/aplica factiune", cmdtext, true, 20) == 0)
{
if(strcmp(factiune[playerid],"Fara",true) == 0)
{
new qum3[300];
new factiuni[300];
format(qum3, sizeof(qum3), "SELECT `factiune` FROM `factiuni` WHERE stare = '1'");
mysql_query(qum3);
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_field_row(query, "factiune");
format(factiuni, sizeof(factiuni), "%s \n", factiuni);
}
ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Factiuni fac recrutari",factiuni,"Select","Cancel");
mysql_free_result(); //Eliberam baza de date
}
else
{
SendClientMessage(playerid, 0xFF00FFFF,"Ai deja factiune.");
}
return 1;
}
Код:
if (strcmp("/aplica factiune", cmdtext, true, 20) == 0)
{
if(strcmp(factiune[playerid],"Fara",true) == 0)
{
//empty
}
else
{
SendClientMessage(playerid, 0xFF00FFFF,"Ai deja factiune.");
}
return 1;
}
Код:
[16:55:30] >> mysql_query( Connection handle: 1 ) [16:55:30] CMySQLHandler::Query(SELECT `factiune` FROM `factiuni` WHERE stare = '1') - Successfully executed. [16:55:30] >> mysql_store_result( Connection handle: 1 ) [16:55:30] CMySQLHandler::StoreResult() - Result was stored. [16:55:30] >> mysql_retrieve_row( Connection handle: 1 ) [16:55:30] >> mysql_free_result( Connection handle: 1 ) [16:55:30] CMySQLHandler::FreeResult() - Result was successfully free'd.

