[HELP] Showing Id On OnPlayerText -
will_92 - 28.02.2010
Sorry guys, I am sick and i have a bad headache... I've been trying to find out how to show the player's id on chat... I've searched up everyway but couldn't find anything really...Sorry.. Can someone show me an example.. it would be greatly appreiciated thanks... and you'll put less pain on my headache.
Re: [HELP] Showing Id On OnPlayerText -
[HiC]TheKiller - 28.02.2010
pawn Код:
public OnPlayerText(playerid, text[])
{
new str[9];
format(str, 9, "(%d) ", playerid);
strins(text, str, 0);
return 1;
}
1234 posts :P.
Re: [HELP] Showing Id On OnPlayerText -
AnimeOtaku - 28.02.2010
Dangit ^^^^^ He Beat me 2 it -_-
Re: [HELP] Showing Id On OnPlayerText -
[HiC]TheKiller - 28.02.2010
Quote:
Originally Posted by AnimeOtaku
Dangit ^^^^^ He Beat me 2 it -_-
|
Dude, all your posts are just posts saying that people got there before you, don't spam.
Re: [HELP] Showing Id On OnPlayerText -
AnimeOtaku - 28.02.2010
I registered Today and im Scripting and the same time, I dont look at peoples posts i just post replies, I posted the answer and then edited it, So yeah :^)
Re: [HELP] Showing Id On OnPlayerText -
Norn - 28.02.2010
Quote:
Originally Posted by AnimeOtaku
I registered Today and im Scripting and the same time, I dont look at peoples posts i just post replies, I posted the answer and then edited it, So yeah :^)
|
Then from now on don't do it..
Re: [HELP] Showing Id On OnPlayerText -
Gozerr - 28.02.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/whatsmyid", cmdtext, true, 10) == 0)
{
new str[256];
format(str, sizeof(str), "Your ID is: %d ", playerid);
SendClientMessage(playerid, 0xFFFFFFAA, str);
return 1;
}
return 0;
}
Re: [HELP] Showing Id On OnPlayerText -
will_92 - 28.02.2010
Still Doesn't Work!!!
?!?
Re: [HELP] Showing Id On OnPlayerText -
Eazy_Efolife - 28.02.2010
Quote:
Originally Posted by ◄=[•
WIll[•]=► ]
Still Doesn't Work!!! ?!?
|
Try this
pawn Код:
public OnPlayerText(playerid, text[])
{
format(text, sizeof(text), "%s(%d): %s",GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(0xFFFFFFAA, text);
return 0; // Don't remove or change this.
}
Код:
stock GetPlayerNameEx(playerid)
{
new string[MAX_PLAYER_NAME];
GetPlayerName(playerid,string,24);
return string;
}
Re: [HELP] Showing Id On OnPlayerText -
Niixie - 28.02.2010
Or this.
pawn Код:
public OnPlayerText(playerid, text[]) // or what it is
{
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[%i]%s: %s", playerid, pName, text);
SendClientMessageToAll(0xFFFFFF, string);
return 1;
}
Something like that would work