if(strcmp(PlayerInfo[playerid][LastTextSaid],str,true)==0) { SendClientMessage(playerid, COLOR_RED, "YOU CANNOT SEND DUPLICATE MESSAGES"); } else { SetPlayerChatBubble(playerid,str,COLOR_WHITE,30,10000); PlayerInfo[playerid][LastTextSaid] = str; SendClientMessage(playerid, COLOR_YELLOW, PlayerInfo[playerid][LastTextSaid]); }
public OnPlayerText(playerid, text[])
{
if(strcmp(PlayerInfo[playerid][LastTextSaid], str, true) == 0)
{
SendClientMessage(playerid, COLOR_RED, "YOU CANNOT SEND DUPLICATE MESSAGES");
return 1;
}
else
{
SetPlayerChatBubble(playerid, str ,COLOR_WHITE,30,10000);
format(PlayerInfo[playerid][LastTextSaid], 128, str);
SendClientMessage(playerid, COLOR_YELLOW, PlayerInfo[playerid][LastTextSaid]);
}
return 0;
}
that's what I mean. it displays it to every1. wtf is wrong with you
|
public OnPlayerText(playerid, text[])
{
if(strcmp(PlayerInfo[playerid][LastTextSaid], str, true) == 0)
{
return SendClientMessage(playerid, COLOR_RED, "YOU CANNOT SEND DUPLICATE MESSAGES");
}
else
{
SetPlayerChatBubble(playerid, str ,COLOR_WHITE,30,10000);
format(PlayerInfo[playerid][LastTextSaid], 128, str);
SendClientMessage(playerid, COLOR_YELLOW, PlayerInfo[playerid][LastTextSaid]);
}
return 0;
}
public OnPlayerText(playerid, text[])
{
if(strcmp(PlayerInfo[playerid][LastTextSaid], text, true))
{
SendClientMessage(playerid, COLOR_RED, "YOU CANNOT SEND DUPLICATE MESSAGES");
return 0;
}
else
{
SetPlayerChatBubble(playerid, text,COLOR_WHITE,30,10000);
format(PlayerInfo[playerid][LastTextSaid], 128, text);
SendClientMessage(playerid, COLOR_YELLOW, PlayerInfo[playerid][LastTextSaid]);
return 0;
}
}