Results 1 to 5 of 5

Thread: Voice stream problem

  1. #1
    Private
    Join Date
    Jan 2019
    Posts
    15
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Voice stream problem

    Hey, could you help with it. Game is loading but with keys combination not working.


    PHP Code:
    init()
    {
        
        
    game["menu_ballerina"] = "ballerina";

        
        
    precacheMenu(game["menu_ballerina"]);
        
    precacheHeadIcon("talkingicon");
    }

    ballerina(response)
    {
        if(!
    isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay))
            return;

        
    self.spamdelay true
              
    saytext "";
              
    soundalias "";

        if(
    self.pers["team"] == "allies")
        {
            switch(
    response)
            {
                case 
    "1":
                
    soundalias "ammo";
                
    saytext "Need ammo!";
                break;

                case 
    "2":
                
    soundalias "medic";
                
    saytext "Need medic!";
                break;

               
            }
        }

        
        
    self doQuickMessage(soundaliassaytext);

        
    wait 2;
        
    self.spamdelay undefined;
            
    }  

    doQuickMessage(soundaliassaytext)
    {
    if(
    self.sessionstate != "playing")
    return;

    if(
    isdefined(level.QuickMessageToAll) && level.QuickMessageToAll)
    {
    self.headiconteam "none";
    self.headicon "talkingicon";

    self playSound(soundalias);
    self sayAll(saytext);
    }
    else
    {
    if(
    self.sessionteam == "allies")
    self.headiconteam "allies";
    else if(
    self.sessionteam == "axis")
    self.headiconteam "axis";

    self.headicon "talkingicon";

    self playSound(soundalias);
    self sayTeam(saytext);
    self pingPlayer();
    }


    ...for
    ammo,,sanyo_sounds/ammo.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    ammo,2,sanyo_sounds/ammo2.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    ammo,3,sanyo_sounds/ammo3.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    ammo,4,sanyo_sounds/ammo4.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    ammo,5,sanyo_sounds/ammo5.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp

    medic,,sanyo_sounds/medic.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    medic,2,sanyo_sounds/medic2.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    medic,3,sanyo_sounds/medic3.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    medic,4,sanyo_sounds/medic4.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp
    medic,5,sanyo_sounds/medic5.mp3,1,1,,,,7,3000,voice,streamed,,,,all_mp

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,569
    Thanks
    17
    Thanked 916 Times in 570 Posts
    Check _menus.gsc
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  3. #3
    Private
    Join Date
    Jan 2019
    Posts
    15
    Thanks
    4
    Thanked 2 Times in 2 Posts
    game["menu_ballerina"] = "ballerina";
    precacheMenu(game["menu_ballerina"]);
    i added condition

    else if(menu == game["menu_ballerina"])
    {
    switch(response)
    {
    case "1":
    soundalias = "ammo";
    saytext = "Need ammo!";
    break;

    case "2":
    soundalias = "medic";
    saytext = "Need medic!";
    break;



    default:
    break;
    }
    }

    game open, no reaction

  4. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,569
    Thanks
    17
    Thanked 916 Times in 570 Posts
    No, your menuresponse is caught in _menus.gsc. Look how quickresponses are done there.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  5. The Following User Says Thank You to IzNoGoD For This Useful Post:

    stoiczkow (28th January 2019)

  6. #5
    Private
    Join Date
    Jan 2019
    Posts
    15
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Done!
    Last edited by stoiczkow; 28th January 2019 at 22:18. Reason: braindamage99

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •