Double Chat Messages
#1

Hi, i got this probllem on my samp server while playing just sometimes i got this



Any solution?
Reply
#2

Show us what's below OnPlayerText.
Reply
#3

there is alot of stuff below OnPlayerText so this the player chat Code

Quote:

if(ServerVariables[CHAT_WITH_ID])
{
new color = GetPlayerColor(playerid);
format(string,sizeof(string),"» %s {D0E0FF}[%d]{FF0000}: {FFFFFF}%s", PlayerName[playerid], playerid, text);
ForEachPlayer(i)
if(!BlockedPlayerList[i][playerid])
SendClientMessage(i, color, string);
}
else
ForEachPlayer(i)
if(!BlockedPlayerList[i][playerid])
SendPlayerMessageToPlayer(i,playerid,text);
return 0;

Reply
#4

I think that sends the text twice.
Код:
 
if(ServerVariables[CHAT_WITH_ID])
{
new color = GetPlayerColor(playerid);
format(string,sizeof(string),"» %s {D0E0FF}[%d]{FF0000}: {FFFFFF}%s", PlayerName[playerid], playerid, text);
ForEachPlayer(i)
if(!BlockedPlayerList[i][playerid])
SendClientMessage(i, color, string);
return 0;
}
else
ForEachPlayer(i)
if(!BlockedPlayerList[i][playerid])
SendPlayerMessageToPlayer(i,playerid,text);
return 0;
Mind trying this one ?
Reply
#5

Код:
if(ServerVariables[CHAT_WITH_ID])
{
new color = GetPlayerColor(playerid);
format(string,sizeof(string),"» %s {D0E0FF}[%d]{FF0000}: {FFFFFF}%s", PlayerName[playerid], playerid, text);
foreach (new i : Player)
{
if(!BlockedPlayerList[i][playerid])
SendClientMessage(i, color, string);
}
}
else
{
foreach (new i : Player)
{
if(!BlockedPlayerList[i][playerid])
SendPlayerMessageToPlayer(i,playerid,text);
}
}
return 0;
Hope it work
Reply
#6

Im Gonna try them both

thanks =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)