PM command
#3

Quote:
Originally Posted by Despacito
Посмотреть сообщение
Can someone tell me why this command doesnt work:

pawn Код:
new string[200], iUser[80], iMsg[200];
    if(sscanf(params, "s[80]s[200]", iUser, iMsg)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ircpm [user] [message]");
    if(!IRC_IsUserOnChannel(groupID, IRC_CHANNEL, iUser))
    {
    format(string, sizeof(string), "* The name '%s' is not currently connected to the IRC channel.", iUser);
    SendClientMessage(playerid, COLOR_RED, string);
    }
    else
    {
    format(string, sizeof(string), "* Your message has been sent to %s", iUser);
    SendClientMessage(playerid, COLOR_RED, string);
    format(string, sizeof(string), "* PM from %s [%d]: %s", ReturnPlayerName(playerid), playerid, iMsg);
    IRC_Notice(groupID, iUser, string);
    }
I always get even if i type all params correctly.
try to change to this

Код:
new iUser, iMsg[ 128 ];
	if( sscanf ( params, "us", iUser, iMsg))
Reply


Messages In This Thread
PM command - by Despacito - 11.05.2017, 11:37
Re: PM command - by Sew_Sumi - 11.05.2017, 13:25
Re: PM command - by BlueGames - 11.05.2017, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)