Problem with command /am [+REP]
#1

Код:
CMD:am(playerid, params[])
{
	new text[85], astring[128];
	if(sscanf(params,"us",text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am");
	
    format(astring,sizeof(astring), "{006600}[ADMINMESSAGE] %s: %s", pName(playerid), text);
   	MessageToAdmins(COLOR_GREEN,astring);
    	
    format(astring,sizeof(astring), ""COL_RED"[INFO]:"COL_LIME"To reply use /am [id] [message]");
	MessageToAdmins(COLOR_GREEN,astring);

	return 1;
}
So, when I enter the game and do /am [text], there is no text shown to admins, only some weird symbols :/ by the way, MessageToAdmins functions perfect with other commands, just this, get rep if you solve it.
Reply
#2

Код:
CMD:am(playerid, params[])
{
	new text[85], astring[128];
	if(sscanf(params,"s[85]",text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am");
	
    format(astring,sizeof(astring), "{006600}[ADMINMESSAGE] %s: %s", pName(playerid), text);
   	MessageToAdmins(COLOR_GREEN,astring);
    	
    format(astring,sizeof(astring), ""COL_RED"[INFO]:"COL_LIME"To reply use /am [id] [message]");
	MessageToAdmins(COLOR_GREEN,astring);

	return 1;
}
You had "u" specifier there which is used for players.
Reply
#3

Thanks, repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)