SA-MP Forums Archive
Chat Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Chat Problem (/showthread.php?tid=271484)



Chat Problem - MrBlake - 24.07.2011

Hi everyone ! I have a problem on the chat. (The normal chat, no /b, /s or another)
The Players can't write anything in the normal chat after register JUST after te first re-log
But they can write in /s(hout) or /b
What I must change ?
Thanks !



Re: Chat Problem - MoroDan - 24.07.2011

Post here the OnPlayerText callback.


Re: Chat Problem - MrBlake - 24.07.2011

Here you are:

Код:
if (realchat)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        return 0;
      	}
        new i;
		while (text[++i])
		{
			if(text[i] > 64 && text[i]< 91) text[i] += 32;
		}
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
	    	new Colors[] = { COLOR_WHITE, COLOR_YELLOW, COLOR_LIGHTGREEN, COLOR_LIGHTRED, TEAM_GROVE_COLOR, 0x008100AA };
			SetPlayerChatBubble(playerid,says: text, Colors[random(sizeof(Colors))], 50.0, 5000);
		}
		if(PlayerInfo[playerid][pAdmin] >= 1)
       	{
        	format(string, sizeof(string), " %s ", text);
         	SetPlayerChatBubble(playerid, string, 0xFFFF80FF, 30.0, 8000);
        }
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s Says: %s", sendername, text);
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		return 0;
	}
	return 1;
}



Re: Chat Problem - =WoR=Varth - 25.07.2011

Have you put this "gPlayerLogged[playerid] == 1" inside your OnPlayerSpawn or somewhere?


Re: Chat Problem - MrBlake - 25.07.2011

No, at
Код:
public OnPlayerSpawn
I have just :
Код:
if(gPlayerLogged[playerid] == 0)
	{
    	SendClientMessage(playerid, COLOR_WHITE, ": On this server you need to Log-in ! (Kicked).");
        KickPlayer[playerid] = 1;
 	}
The problem is just AFTER YOU USE /REGISTER, next time when you enter on the server, you can speak !


Re: Chat Problem - =WoR=Varth - 26.07.2011

You have to put "gPlayerLogged[playerid] == 1" after/inside player register code.


Re: Chat Problem - MrBlake - 29.07.2011

No, i don't put gPlayerLogged[playerid] == 1 anywhere.