ID next to players name
#1

how can i make that it shows the id next to player names

example:

Someone[1] : hello


I looked all over for this but i cant find it.
Reply
#2

If you want the id next to the name you cant have the name as a seperate color.
pawn Код:
public OnPlayerText(playerid, text[])
{
  new name[MAX_PLAYER_NAME];
  new string[144];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "%s[%d] : %s", name, playerid, text);
  SendClientMessageToAll(string);
  return 0;
}
Reply
#3

Uum it wont work

Код:
public OnPlayerText(playerid, text[])
{
  new name[MAX_PLAYER_NAME];
  new string[144];
  GetPlayerName(playerid, name, sizeof(name));
  format(string, sizeof(string), "%s[%d] : %s", name, playerid, text);
  SendClientMessageToAll(string);
  return 0;
}
Код:
C:\Documents and Settings\Administrator\Desktop\Samp-server\gamemodes\Stunt-World.pwn(146) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

pawn Код:
new textstring[2][MAX_PLAYER_NAME];
GetPlayerName(playerid,textstring[0],sizeof(textstring[]));
GetPlayerName(playerid,textstring[1],sizeof(textstring[]));
format(textstring[0],sizeof(textstring[]),"[%d]%s",playerid,textstring[0]);
SetPlayerName(playerid,textstring[0]);
SendPlayerMessageToAll(playerid,text);
SetPlayerName(playerid,textstring[1]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)