Dialogs not showing an interger!
#4

Quote:

CMD:bphelp(playerid, params[])
{
new string[1024];
strcat(string, "{FF0000}Small Backpack Information:{FFFFFF}\n");
strcat(string, "{00FF00}Narcotics Storage:{FFFFFF}\t\t\t\t\t %d Grams\n", BP_NARC);
strcat(string, "{00FF00}Firearms Storage:{FFFFFF}\t\t\t\t\t 40 Grams\n");
ShowPlayerDialog(playerid,DIALOG_BACKPACKHELP,DIAL OG_STYLE_MSGBOX, "{FFFF00}Information:{FFFFFF} Backpacks", string, "Close", "");
return 1;
}

Just a simple re-write of your code, you shouldn't be using strcat like that, it's only for copying from one char array to another, instead you should use format, then may be use strcat to concatenate the strings.

Checkout the below modified code,

PHP код:
CMD:bphelp(playeridparams[]) 

    new 
string[1024], new tmp[500]; 
    
strcpy(string"{FF0000}Small Backpack Information:{FFFFFF}\n"); 
    
format(tmp"{00FF00}Narcotics Storage:{FFFFFF}\t\t\t\t\t %d Grams\n"BP_NARC); 
    
strcat(stringtmp);
    
strcpy(tmp"{00FF00}Firearms Storage:{FFFFFF}\t\t\t\t\t 40 Grams\n"); 
    
strcat(stringtmp);
    
ShowPlayerDialog(playerid,DIALOG_BACKPACKHELP,DIALOG_STYLE_MSGBOX"{FFFF00}Information:{FFFFFF} Backpacks"string"Close"""); 
    return 
1

Hope it helped out
Reply


Messages In This Thread
Dialogs not showing an interger! - by Immortal99 - 06.05.2017, 11:13
Re: Dialogs not showing an interger! - by Toroi - 06.05.2017, 11:16
Re: Dialogs not showing an interger! - by Immortal99 - 06.05.2017, 11:23
Re: Dialogs not showing an interger! - by ShihabSoft - 06.05.2017, 11:23
Re: Dialogs not showing an interger! - by Immortal99 - 06.05.2017, 11:28
Re: Dialogs not showing an interger! - by ShihabSoft - 06.05.2017, 11:30
Re: Dialogs not showing an interger! - by Immortal99 - 06.05.2017, 11:32
Re: Dialogs not showing an interger! - by Immortal99 - 06.05.2017, 11:37
Re: Dialogs not showing an interger! - by ShihabSoft - 06.05.2017, 11:38
Re: Dialogs not showing an interger! - by ShihabSoft - 06.05.2017, 11:42

Forum Jump:


Users browsing this thread: 1 Guest(s)