03.03.2017, 15:06
Quote:
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; } |
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(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;
}