SA-MP Forums Archive
Microphone help... - 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: Microphone help... (/showthread.php?tid=70818)



Microphone help... - introzen - 27.03.2009

I want some help here.... How to make commands like this:

/putmic = Will place a microphone on the ground and send everything that players in 15.0 radius says to the player that typed /putmic
/mic <on/off> = Will hide/show the text that comes from the microphone

Can someone help me please? :P


Re: Microphone help... - MenaceX^ - 27.03.2009

What have you done already?


Re: Microphone help... - introzen - 27.03.2009

I made something but deleted it, cuse i didn't think it would work...

pawn Код:
new MicPos[][3] =
{
{X,Y,Z}
};

dcmd_putmic(playerid,params[])
{
#pragma unused params
GetPlayerPos(playerid,X,Y,Z);
MicPos = X,Y,Z;
}



Re: Microphone help... - ICECOLDKILLAK8 - 27.03.2009

pawn Код:
// Top Of Script
new MicPos[][3] =
{
{X,Y,Z}
};

// DCMD Command
GetPlayerPos(playerid,X,Y,Z);
MicPos[0][0] = X;
MicPos[0][1] = Y;
MicPos[0][2] = Z;

// In OnPlayerText or w/e
if(PlayerToPoint(15.0, playerid, MicPos[0][0], MicPos[0][1], MicPos[0][2]))
{
  // Do w/e
  return 1;
}
Should work


Re: Microphone help... - introzen - 27.03.2009

Quote:
Originally Posted by JeNkStAX
pawn Код:
// Top Of Script
new MicPos[][3] =
{
{X,Y,Z}
};

// DCMD Command
GetPlayerPos(playerid,X,Y,Z);
MicPos[0][0] = X;
MicPos[0][1] = Y;
MicPos[0][2] = Z;

// In OnPlayerText or w/e
if(PlayerToPoint(15.0, playerid, MicPos[0][0], MicPos[0][1], MicPos[0][2]))
{
  // Do w/e
  return 1;
}
Should work
How to make like the OnPlayerText sends everything that everyone says in a 15.0 radius around the mic to the Person who typed /putmic ?