08.08.2017, 21:18
Yeah, replace
with
You're sending the chat first, then checking if he's muted. You want to check he's muted before calling the (realchat) code in.
Код:
public OnPlayerText(playerid, text[]) { if (realchat) { new string[128]; format(string, sizeof(string), "%s says: %s", GetName(playerid), text); ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); format(string, sizeof(string), "says: %s", text); SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000); return 0; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, COLOR_GREY, "You can't speak, you're muted."); printf("%d", PlayerInfo[playerid][pMuted]); return 0; } return 1; }
Код:
public OnPlayerText(playerid, text[]) { if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, COLOR_GREY, "You can't speak, you're muted."); printf("%d", PlayerInfo[playerid][pMuted]); return 0; } if (realchat) { new string[128]; format(string, sizeof(string), "%s says: %s", GetName(playerid), text); ProxDetector(30.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); format(string, sizeof(string), "says: %s", text); SetPlayerChatBubble(playerid,string,COLOR_WHITE,5.0,5000); return 0; } return 1; }