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
#2

Change return 1; to return 0;
Reply
#3

Quote:
Originally Posted by RyderX
Посмотреть сообщение
Change return 1; to return 0;

FIXED THANKS ALOT !!
Reply
#4

Please use [ pawn] [/ pawn] without spaces to wrap code around in future.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)