Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Sound when the player connect and log in to server script.

  1. #11
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    oke i understand so if i paste this code

    PHP Code:
    gomplayersleft,,,gomsound/playerdiscon.mp3,,,,,,,local,streamed,,,,all_mp,,,,,,local 
    in iw_multiplayer.csv it will be ok?

    and where can i paste that @ the begin of the csv o

  2. The Following User Says Thank You to Wesleyw3zep For This Useful Post:

    kubislav23 (20th March 2017)

  3. #12
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    No, if you want to use iw_multiplayer.csv, you should use:
    PHP Code:
    gomplayersleft,,gomsound/playerdiscon.mp3,,,,,,,,local,streamed,,,,all_mp,,,,,,local 
    And if you want to use it with your soundalias file with the columns you posted you should use:
    PHP Code:
    gomplayersleft,,,gomsound/playerdiscon.mp3,,,,,,,local,streamed,,,,all_mp,,,,,,local 
    sudo apt-get rekt

  4. #13
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    ok ok Thank you!

    i will try this now. ( just to get you a idea do u know the extreme mod @ cod2) ? thats the thing what i want when someone joins and leaves the server you will hear that sound everybody will hear that sound. you know what i mean?

  5. #14
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    In the game type script (tdm.gsc, dm.gsc, sd.gsc, ...), use playSoundOnPlayers(sound, team) on Callback_PlayerConnect() and Callback_PlayerDisconnect()
    set logfile 2

  6. #15
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by guiismiti View Post
    In the game type script (tdm.gsc, dm.gsc, sd.gsc, ...), use playSoundOnPlayers(sound, team) on Callback_PlayerConnect() and Callback_PlayerDisconnect()
    well this is my player_connect

    PHP Code:
    Callback_PlayerConnect()
    {
        
    thread dummy();

        
    self.statusicon "hud_status_connecting";
        
    self waittill("begin");
        
    self.statusicon "";

        
    level notify("connected"self);
        
    self iprintlnbold("You are connected to unionsqd-gaming public SD"); //put your message here 
        
    self playlocalsound("playercon.mp3"); //put your sound here 
        
    if(!isdefined(self.pers["team"]) && !level.splitscreen)
            
    iprintln(&"MP_CONNECTED"self.name);
        
    self playlocalsound("playercon.mp3"); //put your sound here 
        
    lpselfnum self getEntityNumber();
        
    lpselfguid self getGuid();
        
    logPrint("J;" lpselfguid ";" lpselfnum ";" self.name "\n");

        if(
    game["state"] == "intermission")
        {
            
    spawnIntermission();
            return;
        }

        
    level endon("intermission");

        
    // WORM
        
    self thread maps\mp\gametypes\_wormsmod::Worms_Mod_PlayerConnect_Init(); 
    and this is my callback_playerdisconnect

    PHP Code:
    Callback_PlayerDisconnect()
    {
        if(!
    level.splitscreen)
            
    iprintln(&"MP_DISCONNECTED"self);
        
    self playlocalsound("playerdiscon.mp3"); //put your sound here 
        
    if(isdefined(self.pers["team"]))
        {
            if(
    self.pers["team"] == "allies")
                
    setplayerteamrank(self00);
            else if(
    self.pers["team"] == "axis")
                
    setplayerteamrank(self10);
            else if(
    self.pers["team"] == "spectator")
                
    setplayerteamrank(self20);
        }

        
    lpselfnum self getEntityNumber();
        
    lpselfguid self getGuid();
        
    logPrint("Q;" lpselfguid ";" lpselfnum ";" self.name "\n");

        if(
    game["matchstarted"])
            
    level thread updateTeamStatus(); 

  7. #16
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    read what I posted and try doing it as I said
    set logfile 2

  8. #17
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Like this?

    PHP Code:
    Callback_PlayerConnect()
    {
        
    thread dummy();

        
    self.statusicon "hud_status_connecting";
        
    self waittill("begin");
        
    self.statusicon "";

        
    level notify("connected"self);
        
    self iprintlnbold("You are connected to unionsqd-gaming public SD"); //put your message here 
        
    playSoundOnPlayers(soundteam)("playercon.mp3"); //put your sound here 
        
    if(!isdefined(self.pers["team"]) && !level.splitscreen)
            
    iprintln(&"MP_CONNECTED"self.name);
        
    self playlocalsound("playercon.mp3"); //put your sound here 
        
    lpselfnum self getEntityNumber();
        
    lpselfguid self getGuid();
        
    logPrint("J;" lpselfguid ";" lpselfnum ";" self.name "\n");

        if(
    game["state"] == "intermission")
        {
            
    spawnIntermission();
            return;
        }

        
    level endon("intermission");

        
    // WORM
        
    self thread maps\mp\gametypes\_wormsmod::Worms_Mod_PlayerConnect_Init(); 
    PHP Code:
    Callback_PlayerDisconnect()
    {
        if(!
    level.splitscreen)
            
    iprintln(&"MP_DISCONNECTED"self);
        
    self playlocalsound("playerdiscon.mp3"); //put your sound here 
        
    if(isdefined(self.pers["team"]))
        {
            if(
    self.pers["team"] == "allies")
                
    setplayerteamrank(self00);
            else if(
    self.pers["team"] == "axis")
                
    setplayerteamrank(self10);
            else if(
    self.pers["team"] == "spectator")
                
    setplayerteamrank(self20);
        }

        
    lpselfnum self getEntityNumber();
        
    lpselfguid self getGuid();
        
    logPrint("Q;" lpselfguid ";" lpselfnum ";" self.name "\n");

        if(
    game["matchstarted"])
            
    level thread updateTeamStatus(); 

  9. #18
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Instead of
    Code:
    playSoundOnPlayers(sound, team)("playercon.mp3");
    use
    Code:
    playSoundOnPlayers("playercon.mp3", team);
    and delete this:
    Code:
    self playlocalsound("playercon.mp3");
    But also, you need to add your sound to a soundaliases table and use the alias instead of the file name.

    It will help you if you get a mod and check how it is done.
    Last edited by guiismiti; 30th March 2017 at 01:02.
    set logfile 2

  10. #19
    Private Wesleyw3zep's Avatar
    Join Date
    Feb 2016
    Posts
    38
    Thanks
    1
    Thanked 4 Times in 4 Posts
    So what you say to me is that i cant use the.multiplayer soundaliases? Pff this is harder than i thought

  11. #20
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Ofcourse you can use that one. But you need to use that syntax. Just copy a line that plays a sound to all players and edit it

Posting Permissions

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