Don't show dialog box - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Don't show dialog box (
/showthread.php?tid=478815)
Don't show dialog box -
moof2010 - 01.12.2013
I want to create a little comand where showing a dialogbox but it now showing.
Код:
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;
}
The efect of this comand is like
Код:
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;
}
but in debug i have the query
Код:
[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.
Where is the problem?