Need help with /help [message] command.
#10

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Why do you need to use sscanf on a string that doesn't need to be split? Just check its length, for example:

pawn Код:
CMD:help( playerid, params[ ] )
{
    new string[ 128 ];
    if(!strlen(params)) return SendClientMessage(playerid, ERROR, "Use: /help [MESSAGE]");
    format(string, sizeof(string), "[!] %s[ID:%d] asks help: %s", name, playerid, params);
    SendClientMessageToAdmins( string );
    SendClientMessage( playerid, GREEN, "Your Message Has Been Sent To Online Admins." );
    return 1;
}
Actually, with zcmd you have to use isnull() instead of strlen() to confirm the string size as strlen() doesn't count null-terminated strings, afaik.
Reply


Messages In This Thread
Need help with /help [message] command. - by Randomai - 16.02.2011, 06:06
Re: Need help with /help [message] command. - by park4bmx - 16.02.2011, 06:45
Re: Need help with /help [message] command. - by Mean - 16.02.2011, 09:45
Re: Need help with /help [message] command. - by Randomai - 16.02.2011, 12:40
Re: Need help with /help [message] command. - by wups - 16.02.2011, 12:42
Re: Need help with /help [message] command. - by Randomai - 16.02.2011, 12:47
Re: Need help with /help [message] command. - by park4bmx - 16.02.2011, 15:02
Re: Need help with /help [message] command. - by HyperZ - 16.02.2011, 15:07
Re: Need help with /help [message] command. - by JaTochNietDan - 16.02.2011, 15:35
Re: Need help with /help [message] command. - by Calgon - 16.02.2011, 17:40

Forum Jump:


Users browsing this thread: 2 Guest(s)