Results 1 to 10 of 22

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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

  2. #2
    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(); 

Posting Permissions

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