Posts: 6,129
Threads: 36
Joined: Jan 2009
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.