FBI recording bug - 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)
+--- Thread: FBI recording bug (
/showthread.php?tid=606605)
FBI recording bug -
D3vin - 06.05.2016
Код:
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);
}
Re: FBI recording bug -
Dayrion - 06.05.2016
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?
Re: FBI recording bug -
J0sh... - 06.05.2016
PHP код:
if(ProxDetectorS(4.0, playerid, iTargetID))
{
new szMessage[28 + MAX_PLAYER_NAME];
PlayerInfo[iTargetID][pBugged] = playerid;
format(szMessage,sizeof(szMessage)," You have placed a bug on %s. ",PlayerRPName(iTargetID));
SendClientMessage(playerid, COLOR_LIGHTBLUE, szMessage);
if(PlayerInfo[playerid][pBugged] != -1)
{
format(string, sizeof(string), "(bug) %s says: %s", sendername, text);
SendClientMessage(PlayerInfo[playerid][pBugged], COLOR_LIGHTGREEN, string);
}
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.
Re: FBI recording bug -
D3vin - 06.05.2016
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?