07.01.2011, 13:05
Use this:
So the command will look like this:
pawn Code:
stock UnderscoreToSpaceName(playerid)
{
new Name[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, Name, sizeof(Name));
}
else
{
Name = "Disconnected/Nothing";
}
for(new name = 0; name < MAX_PLAYER_NAME; name++) if(Name[name] == '_') Name[name] = ' ';
return Name;
}
pawn Code:
new msg[256];
if (sscanf(params, "s", msg)) SendClientMessage(playerid, COLOR_RED, "USAGE: /ann [text]");
else {
format(msg, sizeof(msg), "Announcement from %s: %s", UnderscoreToSpaceName(playerid), msg);
SendClientMessageToAll(COLOR_LOCALMSG, msg);
}
}
return 1;
}

