Problem with command /am [+REP] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with command /am [+REP] (
/showthread.php?tid=619486)
Problem with command /am [+REP] -
[SU]Spartan - 18.10.2016
Код:
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.
Re: Problem with command /am [+REP] -
GoldenLion - 18.10.2016
Код:
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.
Re: Problem with command /am [+REP] -
[SU]Spartan - 18.10.2016
Thanks, repped.