Jump to content

Problema dialog


Lio
 Share

Recommended Posts

  • Administrator

poftim:

CMD:jobs(playerid, params[])
{
    new string[1024], string2[1024];

    strcat(string2, "Nume\tOras\tTip\n");

    for(new j = 0; j < 10; j++)
    {
        if(strlen(JobData[j][jName]) >= 1 && j != 7) 
        {
            format(string,sizeof(string), "%s\t%s\t%s\n",JobData[j][jName], JobData[j][jCity], JobData[j][jTip]);
            strcat(string2, string);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_TABLIST_HEADERS, "Locuri de munca", string2, "Ok", "Cancel");
    return 1;
}
Link to comment
Share on other sites

 

poftim:

CMD:jobs(playerid, params[])
{
    new string[1024], string2[1024];

    strcat(string2, "Nume\tOras\tTip\n");

    for(new j = 0; j < 10; j++)
    {
        if(strlen(JobData[j][jName]) >= 1 && j != 7) 
        {
            format(string,sizeof(string), "%s\t%s\t%s\n",JobData[j][jName], JobData[j][jCity], JobData[j][jTip]);
            strcat(string2, string);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_TABLIST_HEADERS, "Locuri de munca", string2, "Ok", "Cancel");
    return 1;
}

https://imgur.com/gjPF5nM si acum ce are

Link to comment
Share on other sites

 

Incearca 

if(strlen(JobData[j][jName]) >= 1)

 Oare problema este de aici: 

function LoadJob(){
	new jobid, jobscount, tmp[180], string[200];
	cache_get_data(rows, fields, handle);
	if(rows){
		for(new i = 0; i < rows; i++){
			jobscount++;
			cache_get_field_content(i, "JobID", tmp); jobid = strval(tmp);
			cache_get_field_content(i, "JobName", tmp); format(JobData[jobid][jName], 128, tmp);
			cache_get_field_content(i, "JobPosX", tmp); JobData[jobid][jPosX] = floatstr(tmp);
			cache_get_field_content(i, "JobPosY", tmp); JobData[jobid][jPosY] = floatstr(tmp);
			cache_get_field_content(i, "JobPosZ", tmp); JobData[jobid][jPosZ] = floatstr(tmp);
			cache_get_field_content(i, "JobTipe", tmp); format(JobData[jobid][jTip], 128, tmp);
			cache_get_field_content(i, "JobCity", tmp);	format(JobData[jobid][jCity], 128, tmp);
		}
	}
	printf("Load jobs: %d", jobscount);
	return 1;
}

Decat primul si ultemele 3 joburi le afiseaza corect

Edited by Lio
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...