Hi guys
I want to make that players can check which houses are on sell and locate it.
I'm make test command:
And it works nice! I just now don't know how to make dialogresponse.
Picture:
http://prntscr.com/ibifbw
For example,when i click on first option.It's House ID 277.How i can know in "ondialogreponse" that he is click on ID 277 ?
Ok,i can know that he is click on first option,but it's not every time ID 277.If someone buy it house,then 168 will be first option.So i dont have idea how to do it..I hope you understand me.(my english is very bad)
I want to make that players can check which houses are on sell and locate it.
I'm make test command:
Code:
YCMD:freehouse(playerid,params[],help)
{
mysql_tquery( MySQL, "SELECT Level, Cijena, Vrsta , ID FROM `kuce` WHERE ProveraVlasnika = '0' ORDER BY `Cijena` DESC LIMIT 10", "LoadFreeHouse", "i", playerid );
return 1;
}
Quote:
forward LoadFreeHouse( playerid ); public LoadFreeHouse( playerid ) { new name[25], level, price, str[ 512 ],id; format(str, sizeof(str), "{FFC50A}ID\t{FFC50A}Vrsta kuce\t{FFC50A}Cijena\t{FFC50A}Level\n"); for(new i =0; i < cache_num_rows(); i++) { cache_get_field_content(i, "Vrsta", name, MySQL, 24); price = cache_get_field_content_int(i,"Cijena"); level = cache_get_field_content_int(i,"Level"); id = cache_get_field_content_int(i,"ID"); format(str, sizeof(str), "%s%d\t{2ECC71}%s\t%d\t%d\n", str,id , name, price , level); } AC_ShowPlayerDialog(playerid, DIALOG_HOUSES, DIALOG_STYLE_TABLIST_HEADERS, "{FFC50A}Kuce: {FFFFFF}na prodaju", str, "Lociraj", ""); } |
Picture:
http://prntscr.com/ibifbw
For example,when i click on first option.It's House ID 277.How i can know in "ondialogreponse" that he is click on ID 277 ?
Ok,i can know that he is click on first option,but it's not every time ID 277.If someone buy it house,then 168 will be first option.So i dont have idea how to do it..I hope you understand me.(my english is very bad)