SA-MP Forums Archive
Please help! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please help! (/showthread.php?tid=129291)



Please help! - Nexotronix - 21.02.2010

i need when player write in a chat...or hangin on the server,i need to see after nickname the player id!
like this
[TOG]N[e]x("id")

Thnx


Re: Please help! - Rzzr - 21.02.2010

pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[128];
    format(string,sizeof(string),"(%d) %s",playerid,text);
    SendPlayerMessageToAll(playerid, string);
    return 0;
}
That is the easiest way.
It will show like this:
[ST]DutchBas: (0) Hello I said something


Re: Please help! - Nexotronix - 21.02.2010

Thank you!

But when i writin' somethhin' it's showin' twice:




Re: Please help! - Rzzr - 21.02.2010

Did you remove return 0;?


Re: Please help! - Nexotronix - 21.02.2010

No


Re: Please help! - Rzzr - 21.02.2010

That's strange, for me it works :/


Re: Please help! - Nexotronix - 21.02.2010

Do you know how to add id like this:

[TOG]N[e]x[ID:%]: text

cause i need the ID tobe in color like my nickname!



Re: Please help! - Rzzr - 21.02.2010

You can do that, however, it will look like this if your name is for example red:
[ST]DutchBas[ID:5]: What you're saying
So the text won't be white anymore.


Re: Please help! - Nexotronix - 21.02.2010

Look here!
This i saw on one of russians servers:

i need it too!






P.S.
---------------------
---------------------
if u can help me just help here:
http://forum.sa-mp.com/index.php?topic=154545.0


Re: Please help! - Rzzr - 21.02.2010

Oh well, I don't know how they did that then..


Re: Please help! - Miguel - 21.02.2010

It's pretty simple:
pawn Код:
public OnPlayerConnect(playerid)
{
  new
    pName[27];

  GetPlayerName(playerid, pName, 24);
  format(pName, 27, "%s[ID_%d]", pName, playerid);
  SetPlayerName(playerid, pName);
  return 1;
}



Re: Please help! - Rzzr - 21.02.2010

Oh ofcourse. Never thought about that


Re: Please help! - Nexotronix - 22.02.2010

Thanks you!

But this on my server:

But on the server where:

The <tab menu> this:



Re: Please help! - Fedee! - 22.02.2010

Quote:
Originally Posted by SAWC™
It's pretty simple:
pawn Код:
public OnPlayerConnect(playerid)
{
  new
    pName[27];

  GetPlayerName(playerid, pName, 24);
  format(pName, 27, "%s[ID_%d]", pName, playerid);
  SetPlayerName(playerid, pName);
  return 1;
}
Why OnPlayerConnect?

I tryed that and din't work


Re: Please help! - Nexotronix - 23.02.2010

Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by SAWC™
It's pretty simple:
pawn Код:
public OnPlayerConnect(playerid)
{
  new
    pName[27];

  GetPlayerName(playerid, pName, 24);
  format(pName, 27, "%s[ID_%d]", pName, playerid);
  SetPlayerName(playerid, pName);
  return 1;
}
Why OnPlayerConnect?

I tryed that and din't work
it's work man!
but i need what i show on a pictures