Chat System Help
#1

Hello There...
I got a question to ask. Here it is

In RP Servers if we talk without any commands it will be:
i.e
John_Smith: Hello There Sir
Tyler_Ran: Hello Sir.

But I wanted that the"_" is gone.
How to do it?
i.e.
John Smith: Hello There Sir
Tyler Ran: Hello Sir.

See the "_" is gone. How do I do it in my script?

Thanks
Reply
#2

Little Bump..

I need help really. Thanks
Reply
#3

pawn Код:
new
    pName[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, pName, sizeof(pName));
pName[strfind(pName, "_", true)] = ' ';
Reply
#4

Thx but..

It's not working
Reply
#5

Here the function i use, you can have it.

Код:
stock Name(playerid)
{
  	new name[MAX_PLAYER_NAME], stri[24];
  	GetPlayerName(playerid,name,24);
  	strmid(stri,name,0,strlen(name),24);
  	for(new i = 0; i < MAX_PLAYER_NAME; i++) { if (stri[i] == '_') stri[i] = ' '; }
  	return stri;
}
E.g.

Код:
OnPlayerText(playerid, text[])
{
new string[128];
format(string, sizeof(string), "%s: %s", Name(playerid), text);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)