Help me understand sscanf
#4

Here some light on what you're trying to understand. Let's say I have a command called say and I use if(sscanf(parmas, "s[128]", text)) return SendClientMessage(playerid, -1, "ERROR: You haven't used the command correctly use /say testing1...2....3");
What that would do if you just did /say it would return that SendClientMessage, if you use /say siaais it will imput the command.
Edit: heres a command
PHP код:
CMD:test(playeridparams[])
{
    new 
text[128], string[128];
    if(
sscanf(params"s[128]"text)) return SendClientMessage(playerid, -1"/test [message]"); //Check if the command has a extra input e.g /test hello :D
    
format(stringsizeof(string), "%s"text); //Format the string
    
SendClientMessageToAll(-1string);
    return 
1;

Reply


Messages In This Thread
Help me understand sscanf - by Flacker - 18.06.2015, 23:31
Re: Help me understand sscanf - by DarkLored - 18.06.2015, 23:48
Re: Help me understand sscanf - by Flacker - 19.06.2015, 09:04
Re: Help me understand sscanf - by J0sh... - 19.06.2015, 09:19
Re: Help me understand sscanf - by Vince - 19.06.2015, 09:30
Re: Help me understand sscanf - by Lajko1 - 19.06.2015, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)