static bool GetRadioSoundName(CGameRules *gr, const string &teamName, const int groupId, const int keyId, char **ppSoundName = 0, char **ppSoundText = 0, int *pVariations = 0)
{
	SmartScriptTable radioTable;

	if(!GetTeamRadioTable(gr, teamName, radioTable))
	{
		return false;
	}

	SmartScriptTable groupTable;

	if(!radioTable->GetAt(groupId, groupTable))
	{
		return false;
	}

	SmartScriptTable soundTable;

	if(!groupTable->GetAt(keyId, soundTable))
	{
		return false;
	}

	ScriptAnyValue soundName;
	ScriptAnyValue soundText;
	ScriptAnyValue soundVariations = 1;

	if(!soundTable->GetAtAny(1, soundName) || !soundTable->GetAtAny(2, soundText))
	{
		return false;
	}

	soundTable->GetAtAny(3, soundVariations);

	if(pVariations)
	{
		soundVariations.CopyTo(*pVariations);
	}

	if(ppSoundName)
	{
		if(!soundName.CopyTo(*ppSoundName))
		{
			return false;
		}
	}

	if(ppSoundText)
	{
		if(!soundText.CopyTo(*ppSoundText))
		{
			return false;
		}
	}

	return true;
}