Hi, guys!
How to show entire data where char_id = getcharid(0) in npc dialog?
I believe that i'll need to use WHILE's, IF and some query_sql's...But, i dont know for where i can start...
Can you help me?
@OTHERWAY
A player have "Z" entries on sql_db...
When i use:
query_sql( "SELECT `x` FROM `y` WHERE `char_id` = '"+escape_sql( getcharid(0) )+"'",.@status);
can i show the values with this?
while (i < entries_quantity) {mes "Args: "+.@status+";}
can you understand what i can say?
@IFOUNDSOMETHING
I found a ranking script that have what i want... Look:
query_sql "SELECT `char_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='overallkdr' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 1",.@value,.@name$;for (.@i=0; .@i<getarraysize(.@value); .@i++){mes "^0000FFOverall KDR^000000: ^808000"+ .@name$[.@i] +"^000000 - ^CC6633"+ .@value[.@i] +":1^000000";}
E.g:
The player will send a "Apple" to database.
The player will send a "Mace" to database.
The player will send a "Ygg" to database.
I want to show all items sent by the character in a npc dialogue.
How to show entire data where char_id = getcharid(0) in npc dialog?
I believe that i'll need to use WHILE's, IF and some query_sql's...But, i dont know for where i can start...
Can you help me?
@OTHERWAY
A player have "Z" entries on sql_db...
When i use:
query_sql( "SELECT `x` FROM `y` WHERE `char_id` = '"+escape_sql( getcharid(0) )+"'",.@status);
can i show the values with this?
while (i < entries_quantity) {mes "Args: "+.@status+";}
can you understand what i can say?
@IFOUNDSOMETHING
I found a ranking script that have what i want... Look:
query_sql "SELECT `char_reg_num_db`.`value`,`char`.`name` FROM `char` INNER JOIN `char_reg_num_db` ON `char_reg_num_db`.`char_id`=`char`.`char_id` WHERE `char_reg_num_db`.`key`='overallkdr' ORDER BY `char_reg_num_db`.`value` DESC LIMIT 1",.@value,.@name$;for (.@i=0; .@i<getarraysize(.@value); .@i++){mes "^0000FFOverall KDR^000000: ^808000"+ .@name$[.@i] +"^000000 - ^CC6633"+ .@value[.@i] +":1^000000";}
E.g:
The player will send a "Apple" to database.
The player will send a "Mace" to database.
The player will send a "Ygg" to database.
I want to show all items sent by the character in a npc dialogue.
Last edited by a moderator: