18.12.2016, 05:26
(
Последний раз редактировалось Logic_; 18.12.2016 в 07:36.
)
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:
How strcat is used:
EDIT: Changed the variable size, thanks oMa37.
How to use strcat properly:
PHP код:
new str[40];
strcat(str, "Marijuana: [");
strcat(str, Marijuana_Variable);
strcat(str, "] Cocaine: [");
strcat(str, Cocaine_Variable);
strcat(str, "].");
SendClientMessage(playerid, 0x828282FF, str);
PHP код:
new str[40];
strcat(str, "Marijuana: [%d] Cocaine: [%d].");
format(str, sizeof(str), str, Marijuana_Variable, Cocaine_Variable);
SendClientMessage(playerid, 0x828282FF, str);