Help with a command +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: Help with a command +rep (
/showthread.php?tid=619492)
Help with a command +rep -
[SU]Spartan - 18.10.2016
Код:
CMD:am(playerid, params[])
{
new text[85], astring[128];
new id;
if(admin[playerid] == 0)
{
if(sscanf(params,"s[85]",text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am <text>");
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);
}
else if(admin[playerid] >1)
{
if(sscanf(params,"us[85]",id,text)) return SendClientMessage(playerid,COLOR_RED,"ERROR:{FFFFFF}/am <id> <text>");
format(astring,sizeof(astring), "{006600}[ADMMESSAGE] %s to %s: %s", pName(playerid),pName(id),text);
MessageToAdmins(COLOR_GREEN,astring);
SendClientMessage(id,COLOR_RED,"{006600}Admin Message from %s: %s",pName(playerid),text);
}
return 1;
}
I get warnings at line
Код:
SendClientMessage(id,COLOR_RED,"{006600}Admin Message from %s: %s",pName(playerid),text);
Warnings:
Код:
C:\Users\John\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(3106) : warning 202: number of arguments does not match definition
C:\Users\John\Desktop\projects 2016\ESDS 0.3.7 NEW\gamemodes\ESDS.pwn(3106) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: Help with a command +rep -
ThatFag - 18.10.2016
Код:
new string [50];
format(string,sizeof(string),"{006600}Admin Message from %s: %s",pName(playerid),text);
SendClientMessage(id,COLOR_RED,string);
Edit:change this with the line that has the error
Re: Help with a command +rep -
[SU]Spartan - 18.10.2016
reped