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();