24.08.2012, 16:14
Have you changed the "params" thing for this line too? If you keep "params", it'll keep making error. Whole code should be like this:
Edited, use this last one.
pawn Код:
dcmd_ac(playerid,params[])
{
new pname[MAX_PLAYER_NAME];
new string[128], text[128];
if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, -1, "USAGE: /ac [Message]");
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(AdminLevel[i] == 1)
{
format(string,sizeof string, "[ADMIN CHAT] %s(%d): %s", pname, playerid, text);
SendClientMessage(i,COLOR_PINK,string);
}
}
return 1;
}