29.01.2015, 14:19
Hello.
When i use /asay, It shows: [ADMIN] y, But it should show what i typed, Not "y"
And i think the problem is from the "if(sscanf(params,"u",params))" line ..
When i use /asay, It shows: [ADMIN] y, But it should show what i typed, Not "y"
And i think the problem is from the "if(sscanf(params,"u",params))" line ..
PHP Code:
CMD:asay(playerid,params[])
{
new string[128];
if(AdminLevel[playerid] < 1) return SCM(playerid,COLOR_WHITE,"{AFAFAF}[Error]: {FFFFFF}You do not have the correct admin level for this command.");
if(sscanf(params,"u",params))
{
SendClientMessage(playerid,COLOR_WHITE, ""COL_USAGE"[SYNTAX] {FFFFFF}/asay [MESSAGE]");
return 1;
}
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}%s",params);
SendClientMessageToAll(COLOR_WHITE,string);
format(string,sizeof(string),"%s(%d) has used /asay",PlayerName(playerid),playerid);
SendALogMessage(string);
return 1;
}