Help me in this
#7

Quote:
Originally Posted by X337
Посмотреть сообщение
You have to use strcat / strunpack for packed string.
Example:
Код:
static const
	name[][] = {
		{!"Medkit" },
		{!"Computer" },
		{!"Jus" },
		{!"Journal" },
		{!"Burger" }
	}
;
new msg[56];
format(msg, 56, "You have %d ", 2);
strcat(msg, name[1]); // msg = You have 2 Computer

// or...
new itemname[10];
strunpack(itemname, name[1]);
format(msg, 56, "You have %d %s", 2, itemname); // msg = You have 2 Computer
We don't know if the user will write computer or something else in /show so I guess we need a stock for it and that what I want to know
Reply


Messages In This Thread
Help me in this - by Krauser123 - 14.02.2017, 16:11
Re: Help me in this - by AjaxM - 14.02.2017, 16:16
Re: Help me in this - by Krauser123 - 14.02.2017, 16:38
Re: Help me in this - by AjaxM - 14.02.2017, 16:40
Re: Help me in this - by X337 - 14.02.2017, 16:57
Re: Help me in this - by Dayrion - 14.02.2017, 17:58
Re: Help me in this - by Krauser123 - 14.02.2017, 18:37
Re: Help me in this - by Krauser123 - 15.02.2017, 09:41
Re: Help me in this - by Vince - 15.02.2017, 10:35
Re: Help me in this - by Krauser123 - 15.02.2017, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)