[Ask] How to turn off chat for all
#1

Hello, Everyone i has problem

Ex:
When i chat original all player can see that text every where

and when i use that code

Код:
new realchat = 1;

public OnPlayerText(playerid, text[])
{
    new sendername[MAX_PLAYER_NAME];
    new string[256];
    if (realchat)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        return 0;
      	}
      	new idx;
        new length = strlen(text);
		while ((idx < length) && (text[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[256];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = text[idx];
			idx++;
		}
		result[idx - offset] = EOS;
      	        new bbs[MAX_STRING];
                format(bbs, sizeof(bbs), "'' %s ''", text);
		SetPlayerChatBubble(playerid,bbs, 0xFF436FFF, 20.0, 10000);
		GetPlayerName(playerid, sendername, sizeof(sendername));
  		format(string, sizeof(string), "%s: %s", sendername, text);
		ProxDetector(20.0, playerid, string, COLOR_GRAD5, COLOR_GRAD5, COLOR_GRAD5, COLOR_GRAD5, COLOR_GRAD5);
		if(!IsPlayerInAnyVehicle(playerid))	ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,1,1);
		return 1;
  	}
	return 1;
}
See this



line 1 Original text
line 2 realchat ProxDetector 20.0

I need turnoff line 1 how to make it


sorry my English skill not good.
and sorry if this topic wrong section. Thankyou
Reply
#2

make the return 1; of OnPlayerText to return 0;
Reply
#3

Quote:
Originally Posted by Romel
Посмотреть сообщение
make the return 1; of OnPlayerText to return 0;
not work TT TT
Reply
#4

Change the last return 1; to return 0;
Reply
#5

OK it work already thankyou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)