Inventory item on the same line.
#9

Use strcat, it's faster than format and you can use it without using format in another line. (Thanks to Gammix & SickAttack for the tip)

How to use strcat properly:
PHP код:
new str[40];
strcat(str"Marijuana: [");
strcat(strMarijuana_Variable);
strcat(str"] Cocaine: [");
strcat(strCocaine_Variable);
strcat(str"].");
SendClientMessage(playerid0x828282FFstr); 
How strcat is used:
PHP код:
new str[40];
strcat(str"Marijuana: [%d] Cocaine: [%d].");
format(strsizeof(str), strMarijuana_VariableCocaine_Variable);
SendClientMessage(playerid0x828282FFstr); 
EDIT: Changed the variable size, thanks oMa37.
Reply


Messages In This Thread
Inventory item on the same line. - by SukMathcuck - 17.12.2016, 12:31
Re: Inventory item on the same line. - by Runn3R - 17.12.2016, 12:58
Re: Inventory item on the same line. - by coool - 17.12.2016, 12:59
Re: Inventory item on the same line. - by SukMathcuck - 17.12.2016, 14:37
Re: Inventory item on the same line. - by oMa37 - 17.12.2016, 15:08
Re: Inventory item on the same line. - by SukMathcuck - 17.12.2016, 17:09
Re: Inventory item on the same line. - by Pearson - 17.12.2016, 21:53
Re: Inventory item on the same line. - by SukMathcuck - 17.12.2016, 22:37
Re: Inventory item on the same line. - by Logic_ - 18.12.2016, 05:26
Re: Inventory item on the same line. - by oMa37 - 18.12.2016, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)