Ok, now another dilemma. For some reason, this doesn't work either. Here is the code:
//This is the radio stuff
if(strstr(%text, ", over") > -1)//This checks to see if it's actually in the sentence
{ //^That makes it so I know there's ", over" in the sentence
if(getSubStr(%text, strlen(%text) - strlen(", over"), strlen(%text)) $= ", over")
{
InitContainerRadiusSearch(%speakerpos,$Survival::ChatRange, $TypeMasks::FxBrickAlwaysObjectType);
while((%Dah = ContainerSearchNext()) != 0)
{
if(%Dah.getDatablock().getName $= "RadioBrick" && isObject(%Dah.attachment))
{
%DahPos = %Dah.getTransform(); //I use this later for more protection on double messaging
MessageRadio(%Cprefix,%Cname,%Csuffix,%text,%Dahpos);
}
}
}
}
And here is the MessageRadio function:
function MessageRadio(%Cprefix,%Cname,%Csuffix,%text,%Dahpos)
{
echo("LOLOLOLOLOLOLOLOL");
for(%i=0;%i<BrickRadioSet.getCount();%i++)
{
%oRadio = BrickRadioSet.getObject(%i);
%oRadioPos = %oRadio.getTransform();
echo("Radio "@ %i @": "@ %oRadioPos);
if(%oRadioPos != %Dahpos)
{
InitcontainerRadiusSearch(%oRadioPos, $Survival::ChatRange, $Typemasks::PlayerObjectType);
while((%Raggle = ContainerSearchNext()) != 0)
{
messageClient(%Raggle.client,"","\c5[Local] \c7"@ %Cprefix @"\c3"@ %Cname @"\c7"@ %Csuffix @"\c6: "@ %text);
}
}
}
}
For some reason, the message Radio function does not activate...