Help me with player id
#1

I tried to add playerid when player Text something but...
it shows 2 messages and its in 1 color:
pawn Код:
public OnPlayerText(playerid, text[])
 {
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s(%i): %s",pName,playerid,text);
    SendClientMessageToAll(GetPlayerColor(playerid),string);
    return 1;
}
i know... but i did sometihng wrong....
Reply
#2

I don't really understand what you mean,
Reply
#3

i mean like this:
when player writes something it dont show playerid after name....
so i want add id but... when i try this way it dont work right good....
2 messages in 1 time....
i dont want add id in player text... like [WSF]Th4_Devil: (id) text... <----- not like this
i want like this: [WSF]Th4_Devil(id): text....
Reply
#4

pm me your msn
Reply
#5

omg i dont have MSN xD
Reply
#6

first of all, GetPlayerColor does not work when u haven't used SetPlayerColor. (hold that in mind)

Second, you're sending the message in one color, because u can only use 1 color in sendclientmessages.
Reply
#7

i have set players color! when player connects i set it (random) my own choosen
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)