Help chat system
#6

Quote:
Originally Posted by Langky
Посмотреть сообщение
How to let local chat did not come to global chat, local chat to the player nearest and global chat plasticity everything.

sorry for my bad english

Код:
if (text[0] == '!') // global chat
    {
    	new pname[24];
    	new string[128];
    	GetPlayerName(playerid,pname,sizeof(pname));
    	format(string,sizeof(string)," %s[%d]: {FFFFFF}%s.",pname,playerid,text[1]);
    	SendClientMessageToAll(COLOR_WHITE,string);
    }
   	if(PlayerInfo[playerid] == 1) //local chat
   	{
		new pname[24];
		new string[128];
		format(string, sizeof(string), "%s: %s", pname, text);
        GetPlayerName(playerid, pname, 24);
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
		return 0;
		}
		return 1;
 	}
remove the return 1;

PHP код:
if (text[0] == '!'// global chat
{
    new 
pname[24];
    new 
string[128];
    
GetPlayerName(playerid,pname,sizeof(pname));
    
format(string,sizeof(string)," %s[%d]: {FFFFFF}%s.",pname,playerid,text[1]);
    
SendClientMessageToAll(COLOR_WHITE,string);
    return 
0
}
else
{
    new 
pname[24];
    new 
string[128];
    
format(stringsizeof(string), "%s: %s"pnametext);
    
GetPlayerName(playeridpname24);
    
ProxDetector(20.0playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
    return 
0;

Reply


Messages In This Thread
Help chat system - by Langky - 03.03.2017, 09:52
Re: Help chat system - by RyderX - 03.03.2017, 10:53
Re: Help chat system - by Langky - 03.03.2017, 12:05
Re: Help chat system - by RyderX - 03.03.2017, 12:47
Re: Help chat system - by Langky - 03.03.2017, 14:16
Re: Help chat system - by haikalbintang - 03.03.2017, 15:06
Re: Help chat system - by Langky - 04.03.2017, 07:36
Re: Help chat system - by RyderX - 04.03.2017, 07:52
Re: Help chat system - by Langky - 04.03.2017, 08:03
Re: Help chat system - by Toroi - 04.03.2017, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)