05.01.2016, 14:45
There is a slight problem
With that code +
It shows amount of messages based on players around you. Ie 2 players, it will show 2 messages
With that code +
PHP код:
public OnPlayerText(playerid, text[])
{
new message[128];
new Float:Pos[3];
if(AccInfo[playerid][Muted] == 0) {
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(message, sizeof(message), "%s says: %s", GetRoleplayName(playerid), text);
IC_ChatLog(message);
SetPlayerChatBubble(playerid, text, 0xFFFFFF, 10.0, 3000);
foreach(new i : Player) {
if(IsPlayerInRangeOfPoint(i,10,Pos[0],Pos[1],Pos[2])) {
format(message, sizeof(message), "{FFFFFF} %s", text);
SendRPMessage(playerid,10,message);
}
else if(IsPlayerInRangeOfPoint(i,20,Pos[0],Pos[1],Pos[2])) {
format(message, sizeof(message), "{BABABA} %s", text);
SendRPMessage(playerid,20,message);
}
}
}
else {
Msg(playerid,COLOR_RED,"You are muted. You cannot speak");
return 0;
}
return 0;
}