09.06.2010, 18:20
Listo, pude hacerlo:
Gracias a los dos
Код:
public OnPlayerText(playerid, text[]) { new str[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); if(IsPlayerAdmin(playerid)) { format(str, sizeof(str), "* %s [%d]: %s", name, playerid, text); SendClientMessageToAll(COLOR_CELESTE, str); } else { // FORMA 1: "Nombre [ID]: texto new pname[MAX_PLAYER_NAME+5]; new pname2[MAX_PLAYER_NAME+5]; GetPlayerName(playerid,pname,sizeof(pname)); format(pname2,sizeof(pname2),"%s[%d]",pname,playerid); SetPlayerName(playerid,pname2); SendPlayerMessageToAll(playerid,text); SetPlayerName(playerid,pname); // FORMA 2: "Nombre:[ID] texto // format(str, sizeof(str), "[%d] %s", playerid, text); // SendPlayerMessageToAll(playerid, str); } return 0; }