FBI recording bug
#1

Код:
if(ProxDetectorS(4.0, playerid, iTargetID))
		{
			new	szMessage[28 + MAX_PLAYER_NAME];
			PlayerInfo[iTargetID][pBugged] = 1;
			format(szMessage,sizeof(szMessage)," You have placed a bug on %s. ",PlayerRPName(iTargetID));
			SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage);
this is from the CMD
it plants the FBI bug on a person to hear his chat but instead of making the bug sends the player chat to the whole FBI
I want to make it send the chat that being watched by FBI to the agent who planted the bug himself

Код:
if(PlayerInfo[playerid][pBugged] == 1)
			{
	        	format(string, sizeof(string), "(bug) %s says: %s", sendername, text);
	        	SendClientMessage(playerid, COLOR_LIGHTGREEN, string);

    		}
Reply
#2

I don't get the problem. You want make appear the message for the FBI faction? Or just for the player who planted the bug?
Reply
#3

PHP код:
if(ProxDetectorS(4.0playeridiTargetID))
        {
            new    
szMessage[28 MAX_PLAYER_NAME];
            
PlayerInfo[iTargetID][pBugged] = playerid;
            
format(szMessage,sizeof(szMessage)," You have placed a bug on %s. ",PlayerRPName(iTargetID));
            
SendClientMessage(playeridCOLOR_LIGHTBLUEszMessage);
if(
PlayerInfo[playerid][pBugged] != -1)
            {
                
format(stringsizeof(string), "(bug) %s says: %s"sendernametext);
                
SendClientMessage(PlayerInfo[playerid][pBugged], COLOR_LIGHTGREENstring);
            } 
When you reset the bugged variable you MUST set it at -1.
You want the guy who placed the bug to hear it right? If so, that's what should work.
Reply
#4

thanks, and is it possible to make it like

/listenbug [playerid]

for example, Many players has bug planted on them, and I dont want to get spammed, and I want to listen to each one by this Command (/listenbug)
Any chance to make that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)