Small dialog problem
#1

Alright so me again lol

the dialog shows only last thing it found, if I do it all with SendClientMessage it works but dialog shows only last found data

PHP код:
for(new i=0rowsi++) {
        
cache_get_field_content(i"Reason"string);
        
format(reasonsizeof(string), string);
        
        
cache_get_field_content(i"Date"dateString);
        
format(dateNowsizeof(dateString), dateString);
        
        
format(mainstring,sizeof(mainstring),"%s\t%s\n",string,dateString);
        
crimecount++;
    }
    if(
crimecount == 0) return Msg(playerid,COLOR_RED,"No results found for this person");
    else if(
crimecount >= 1) return ShowPlayerDialog(playerid,DIALOG_PLAYER_CRIMES,DIALOG_STYLE_TABLIST,"Test",mainstring,"Confirm","Decline"); 
Reply
#2

Where are you using this?
Reply
#3

pawn Код:
for(new i=0; i < rows; i++)
{
    cache_get_field_content(i, "Reason", string);
    cache_get_field_content(i, "Date", dateString);

    format(mainstring,sizeof(mainstring),"%s%s\t%s\n",mainstring,string,dateString);
    crimecount++;
}
Reply
#4

Quote:
Originally Posted by itsCody
Посмотреть сообщение
Where are you using this?
PHP код:
mysql_format(mysqlquerysizeof(query),"SELECT `Name`,`IssuedBy`,`Reason`, `Date` FROM `crimes` WHERE `Name`='%e'",somename);
    
mysql_tquery(mysqlquery"OnCrimeLoad","i",playerid); 
PHP код:
forward OnCrimeLoad(playerid);
public 
OnCrimeLoad(playerid)
{
    new 
reason[128],
        
string[128],
        
        
dateNow[128],
        
dateString[128],
        
rows cache_num_rows(),
        
        
someName[24],
        
someStringName[24],
        
        
IssuedByOmg[24],
        
IssuedByString[24],
        
        
crimecount,
        
mainstring[1024];
    for(new 
i=0rowsi++) { 
Reply
#5

Do what Jefff said above.
Reply
#6

omg Jeff & Code <3 u both! Thanks for the help! THAT WORKED!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)