Double Chat How to fix ?
#1

Public for text
public OnPlayerText(playerid, text[])
{
new Float,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new string[128];
format(string,sizeof(string),"%s Berkata : %s",getPlayerName(playerid),text);
new chat_warna;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!IsPlayerInRangeOfPoint(i, CHAT_RADIUS, x, y, z)) continue;
new Float:distance = GetPlayerDistanceFromPoint(i, x,y,z);
if(distance < CHAT_RADIUS / CHAT_TEXTS)
{
chat_warna = WARNA_CHAT;
}
else if(distance < CHAT_RADIUS / CHAT_TEXTS * 2)
{
chat_warna = WARNA_TEXT1;
}
else if(distance < CHAT_RADIUS / CHAT_TEXTS * 3)
{
chat_warna = WARNA_TEXT2;
}
else if(distance < CHAT_RADIUS / CHAT_TEXTS * 4)
{
chat_warna = WARNA_TEXT3;
}
else if(distance <= CHAT_RADIUS / CHAT_TEXTS * 5)
{
chat_warna = WARNA_TEXT4;
}
SendClientMessage(i, chat_warna, string);
}
return 1;
}

This My Problem
Reply


Messages In This Thread
Double Chat How to fix ? - by Jihanz - 04.03.2017, 12:44
Re: Double Chat How to fix ? - by RyderX - 04.03.2017, 12:45
Re: Double Chat How to fix ? - by Jihanz - 04.03.2017, 12:48
Re: Double Chat How to fix ? - by Isolated - 04.03.2017, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)