Sscanf cmd
#1

Hello,

I want to make a cmd like this:
if(!sscanf(params,"s[16]s[16]s[16]d",action[0],action[1],action[2],amount))

But, for example when action 2 and amount isn't inserted I still want to proceed the cmd
So it will be like:

Код:
if(!sscanf(params,"s[16]s[16]s[16]d",action[0],action[1],action[2],amount))
{
	if(strcmp("open",action[0], true ) == 0)
	{
	
	}
	else if(strcmp("close",action[0], true ) == 0)
	{

	}
	if(strcmp("store",action[0], true ) == 0)
	{
		if(strcmp("weapon",action[1], true ) == 0)
		{

		}
	}
}
Something like this, but this doesnt work because when I only use /trunk open
I have to insert something at the others.


[/code]
Reply


Messages In This Thread
Sscanf cmd - by Roel - 06.09.2012, 17:23
Re: Sscanf cmd - by MarkoN - 06.09.2012, 17:29
Re: Sscanf cmd - by HuSs3n - 06.09.2012, 17:31
Re: Sscanf cmd - by Roel - 06.09.2012, 17:43
Re: Sscanf cmd - by Roel - 06.09.2012, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)