08.08.2012, 23:37
Try this. Untested. Let me know if it returns any errors.
You don't need to use sscanf when dealing with one parameter only.
Are you running the latest updated version of sscanf also?
pawn Код:
CMD:b(playerid, params[])
{
new
str[128];
if (!strlen(params[0])) {
SendClientMessage(playerid, -1, "Error: parameter is missing.");
}
else
{
if(AdminDuty[playerid])
{
switch(PlayerInfo[playerid][pAdmin])
{
case 0: format(str, sizeof(string), "%s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
case 1: format(str, sizeof(string), "<Mod> %s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
case 2: format(str, sizeof(string), "<Admin> %s %s says: (( %s ))", Accent[playerid], PlayerNameEx(playerid), params[0]);
}
}
ProxDetector(20.0, playerid, str, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", str);
}
return 1;
}
Are you running the latest updated version of sscanf also?