12.01.2012, 23:34
Like this:
pawn Код:
public OnPlayerText(playerid, text[])
{
new Rank[20];
switch(GetPlayerScore(playerid))
{
case 0 .. 10: format(Rank, sizeof(Rank),"[Newbie]");
case 11 .. 20: format(Rank, sizeof(Rank),"[Beginner]");
//etc..
}
new ChatText[128], Nameasd[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nameasd, MAX_PLAYER_NAME);
format(ChatText, sizeof(ChatText),"%s %s: %s", Rank, Nameasd, text);
SendClientMessageToAll(-1, ChatText);
return 0; // ignore the default text and send the custom one
}