07.02.2009, 18:17
default server messages are:
sk1llz: bla bla bla bla
but i need this:
sk1llz[ID?]: bla bla bla bla
sk1llz: bla bla bla bla
but i need this:
sk1llz[ID?]: bla bla bla bla
Originally Posted by Marcel
|
Originally Posted by JeNkStAX
Then change the string round lol
|
Originally Posted by JeNkStAX
Post your code
|
public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string), "[%d] %s",playerid,text); SendPlayerMessageToAll(playerid,string); return 0; }
public OnPlayerText(playerid, text[])
{
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s [ID:%d]: %s",playername,playerid,text);
SendClientMessageToAll(COLOR_w/e, string);
return 0;
}
public OnPlayerText(playerid, text[])
{
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s (ID:%d): %s",playername,playerid,text);
SendPlayerMessageToAll(playerid,string);
return 0;
}
Originally Posted by brett7
pawn Код:
|
SendPlayerMessageToAll(playerid, string);
string[128];
string[256];
Originally Posted by sk1llz
Quote:
Код:
public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string), "[%d] %s",playerid,text); SendPlayerMessageToAll(playerid,string); return 0; } |
public OnPlayerText(playerid, text[]) { new string[128], pName[24]; GetPlayerName(playerid, pName, 24); //gets player name format(string, sizeof(string), "%s [ID: %d]",pName, playerid); //formats name ("Leopard [ID: 0]") SetPlayerName(playerid, string); SendPlayerMessageToAll(playerid,text); SetPlayerName(playerid, pName); //sets player name back to original return 0; }
Originally Posted by [K4L
Leopard ]
Quote:
Код:
public OnPlayerText(playerid, text[]) { new string[128], pName[24]; GetPlayerName(playerid, pName, 24); //gets player name format(string, sizeof(string), "%s [ID: %d]",pName, playerid); //formats name ("Leopard [ID: 0]") SetPlayerName(playerid, string); SendPlayerMessageToAll(playerid,text); SetPlayerName(playerid, pName); //sets player name back to original return 0; } Mine will probably do what you want. |
Originally Posted by JeNkStAX
Quote:
|
Originally Posted by [K4L
Leopard ]
Quote:
Код:
public OnPlayerText(playerid, text[]) { new string[128], pName[24]; GetPlayerName(playerid, pName, 24); //gets player name format(string, sizeof(string), "%s [ID: %d]",pName, playerid); //formats name ("Leopard [ID: 0]") SetPlayerName(playerid, string); SendPlayerMessageToAll(playerid,text); SetPlayerName(playerid, pName); //sets player name back to original return 0; } Mine will probably do what you want. |
Originally Posted by (FF)TeddyBear
Quote:
|
Originally Posted by sk1llz
default server messages are:
sk1llz: bla bla bla bla but i need this: sk1llz[ID:??]: bla bla bla bla |
Originally Posted by [K4L
Leopard ]
Quote:
Also he said Quote:
|
Originally Posted by sk1llz
jenkstax,
SendClientMessageToAll(COLOR_w/e, string); COLOR_w/e what is this ?=) |