Hello everybody, I have one little bug and I don't know how to fix it. When player types the text it's
duplicate I don't want it... For more info i put foto:
Код HTML:
public OnPlayerText(playerid, text[])
{
if(NeleistiniSimboliai(text))
{
InfoBoxForPlayer(playerid, "~r~Tekste yra neleistinu simboliu");
return 1;
}
if(PlayerInfo[playerid][muted] == true)
{
SendClientMessage(playerid, RAUDONA, "Jūs esate uћtildytas");
return 1;
}
new msg[128];
if(!PlayerInfo[playerid][Atsiliepe]) format(msg,128,"{FFFF00}%s sako: {FFFFFF}%s",zVardas(playerid),text);
else
{
format(msg,128,"[TELEFONAS]: {CCFF99}Paљnekovas sako: %s",text);
SendClientMessage(PlayerInfo[playerid][Pasnekovas]-2,0x809FFFFF,msg);
format(msg,128,"{FFFF00}%s sako: {D8D8D8}(telefonas) {FFFFFF}%s",zVardas(playerid),text);
}
SetPlayerChatBubble( playerid, text, 0xFF0000FF, 5.0, 10000 );
new
Float:dis [ 3 ],
string [ 256 ];
format ( string, sizeof( string ), "{B2B3A8}%s sako: {FFFFFF}%s", GetPlayerNameEx( playerid ), text );
GetPlayerPos ( playerid, dis[ 0 ], dis[ 1 ], dis[ 2 ] );
foreach(Player, player)
{
if(IsPlayerInRangeOfPoint( player, 8, dis[ 0 ], dis[ 1 ], dis[ 2 ] ) )
{
SendClientMessageEx( player, -1, string );
}
}
A_OnPlayerText(playerid, text);
return 1;
}