how to make Name(id): text?
#1

hey guys,
i want to know how to make it that when a player types something you see: Name(id): histext
so for example:
niels44(id:0): hey

does anyone knows how to make htis?
greets niels
Reply
#2

pawn Код:
new textstring[128];
format(textstring, sizeof(textstring), "(ID:%i) %s", playerid, text);
SendPlayerMessageToAll(playerid, textstring);
Reply
#3

and where to put this? XD under onplayertext or something?
Reply
#4

pawn Код:
public OnPlayerText(playerid, text)
{
    new textString[129], playerName[25];
    GetPlayerName(playerid, playerName, 25);
    format(textString, 129, "%s (%d): %s", playerName, playerid, text);
    SendClientMessageToAll(0xFFFFFFFF, textString);
    return 0;
}
rep me. :>
Reply
#5

pawn Код:
public OnPlayerText( playerid, text[ ] )
{
    new textmsg[ 128 ];
    format( textmsg, sizeof ( textmsg ), "(id:%d): %s", playerid, text );
    SendPlayerMessageToAll( playerid, textmsg );
    return 0;
}
Quote:
Originally Posted by Schurman
Посмотреть сообщение
rep me. :>
..
Reply
#6

thnx guys REP+ for all for the fast help XD
EDIT: i couldnt give dwane rep becuz it didnt let me so sorry dwane
Reply
#7

textstring function
Reply
#8

Quote:
Originally Posted by niels44
Посмотреть сообщение
thnx guys REP+ for all for the fast help XD
EDIT: i couldnt give dwane rep becuz it didnt let me so sorry dwane
lol, only that I could help make me happy, I don't care about this.
Reply
#9

okay XD
Reply
#10

Quote:
Originally Posted by Schurman
Посмотреть сообщение
rep me. :>
and

Quote:
Originally Posted by Schurman
Посмотреть сообщение
WTF kind of drug are you on?

There's no playerid and SendPlayerMessageToAll doesn't even exist.
That's who I'm talking about.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)