how to make Name(id): text? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to make Name(id): text? (
/showthread.php?tid=318526)
how to make Name(id): text? -
niels44 - 15.02.2012
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
Re: how to make Name(id): text? -
fiki574 - 15.02.2012
pawn Код:
new textstring[128];
format(textstring, sizeof(textstring), "(ID:%i) %s", playerid, text);
SendPlayerMessageToAll(playerid, textstring);
Re: how to make Name(id): text? -
niels44 - 15.02.2012
and where to put this? XD under onplayertext or something?
Re: how to make Name(id): text? -
SchurmanCQC - 15.02.2012
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. :>
Re: how to make Name(id): text? -
Konstantinos - 15.02.2012
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. :>
|
..
Re: how to make Name(id): text? -
niels44 - 15.02.2012
thnx guys

REP+ for all for the fast help XD
EDIT: i couldnt give dwane rep becuz it didnt let me

so sorry dwane
Re: how to make Name(id): text? -
Lisa - 15.02.2012
textstring function
Re: how to make Name(id): text? -
Konstantinos - 15.02.2012
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.
Re: how to make Name(id): text? -
niels44 - 15.02.2012
okay XD
Re: how to make Name(id): text? -
KingHual - 15.02.2012
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.