SA-MP Forums Archive
[Help] Chat - 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: [Help] Chat (/showthread.php?tid=132372)



[Help] Chat - tony_fitto - 07.03.2010

Hey guys

Today i got an new problem, This problem is in the chat, and the things is that when i type somthing i should only see the message if the player is close to me but thay all see it.
Well when i talk i get to lines of the same message, like i say hey then it will look like this

Everest Community says: Hey // Right
Everest_Community: Hey // Worng ( should not be there )

I have search in my Gamemode for this line %s: %s but i cant find that line. Some one know where i can fix this and how ?

Onplayertext
Код:
if (realchat)
	{
	  if(gPlayerLogged[playerid] == 0)
	  {
	    return 0;
   	}
    if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == 1)
		{
		  format(string, sizeof(string), " %s Says: %s", str, text);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		}
   	if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == 2)
		{
			if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
 			{
  				format(str, sizeof(str), "%s Says In the Car: %s", str, text);
				new VID;
				VID = GetPlayerVehicleID(playerid);
				SendCarWhisper(VID, COLOR_YELLOW2, str);
			}
			else
			{
				format(string, sizeof(string), "(Windows Open) %s Says: %s", str, text);
				ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
		}
	}



Re: [Help] Chat - Johnyy - 29.04.2010

push!


Re: [Help] Chat - MadeMan - 29.04.2010

You must add return 0; at the end.

pawn Код:
else
        {
            format(string, sizeof(string), "(Windows Open) %s Says: %s", str, text);
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        }
    }
    return 0;
}