Getting the name of listitem -
Nimrodcame - 15.05.2013
Hello friends. Searched but did not find a pretty result.
How can I get the name of the incoming data with Lisitem. I mean is not clear data from the database lists a certain number of sounds and 5 is 10, do not be. Therefore, if (listitem == 1) I can not do something like this. Well, what can I do?
Re: Getting the name of listitem -
Vince - 15.05.2013
https://sampwiki.blast.hk/wiki/OnDialogResponse
Quote:
inputtext[] The text entered into the input box by the player or the selected list item text.
|
Re: Getting the name of listitem -
Nimrodcame - 15.05.2013
Код:
case 8:
{
new query[256], yazi[512], string[512];
format(query, sizeof(query), "SELECT * FROM klanlar");
mysql_query(query);
mysql_store_result();
new i = 0;
while(mysql_fetch_row_format(query,"|"))
{
i++;
mysql_fetch_field_row(string,"klan_isim");
format(yazi,sizeof(yazi),"%s\n{ff0000}%d) {ffffff}%s\n",yazi,i, string);
}
mysql_free_result();
ShowPlayerDialog(playerid, KLAN_WS, DIALOG_STYLE_LIST, "KLAN WS",yazi,"Davet","Iptal");
}
}
}
}
case KLAN_WS:
{
if(response)
{
//Klan sorgula
new query[256], klanWsLider[MAX_PLAYERS];
format(query, sizeof(query),"SELECT * FROM klanlar WHERE klan_isim = '%s'",listitem);
mysql_query(query);
.
.
.
Did not understand what I mean. With the name of the incoming data dialog does not question the need to Lisitem another. But I can not get the name of the incoming data with listitem. How do I get?
Re: Getting the name of listitem -
Nimrodcame - 16.05.2013
help please .. :/
Re: Getting the name of listitem -
Knappen - 16.05.2013
pawn Код:
if(!strcmp(inputtext, SomeString))
{
// Do Something
}
Re: Getting the name of listitem -
marshallbrown - 16.05.2013
Stop bumping threads. :3