Hi guys
Can anyone tell me the way or the script that play a sound when the player log in.
like : "Welcome to X mod" when the player log in.
If anyone help or give his thoughts that would be great !!!
Printable View
Hi guys
Can anyone tell me the way or the script that play a sound when the player log in.
like : "Welcome to X mod" when the player log in.
If anyone help or give his thoughts that would be great !!!
I just remember this thing but i didnt tested it, so i dont know if is working :)PHP Code:
Callback_PlayerConnect()
{
level notify("connected", self);
if(!level.splitscreen)
iprintln(&"MP_CONNECTED", self.name);
self iprintlnbold("Welcome to X mod"); //put your message here
wait(0.5);
self playlocalsound("YOUR_WELCOME_SOUND"); //put your sound here
}
dont put waits in there. Make it a thread instead.
Callback_PlayerConnect()
{
thread dummy();
self.statusicon = "hud_status_connecting";
self waittill("begin");
self.statusicon = "";
level notify("connected", self);
if(!level.splitscreen)
iprintln(&"MP_CONNECTED", self.name);
self iprintlnbold("^3Welcome to unionsqd-gaming "); //put your message here
self playlocalsound("us_welcome.mp3"); //put your sound here
//PAM TEMP!
self.pers["dvarenforcement"] = 1;
//self setclientcvar("hud_enable", 1);
well i did this,
Callback_PlayerConnect()
{
thread dummy();
self.statusicon = "hud_status_connecting";
self waittill("begin");
self.statusicon = "";
level notify("connected", self);
if(!level.splitscreen)
iprintln(&"MP_CONNECTED", self.name);
self iprintlnbold("^5w^6w^7w^3.^1unionsqd-gaming^3.^7c^6o^5m"); //put your message here
self playlocalsound("us_welcome.mp3"); //put your sound here
//self setclientcvar("hud_enable", 1);
if(!isdefined(self.pers["team"]) && !level.splitscreen)
iprintln(&"MP_CONNECTED", self.name);
lpselfnum = self getEntityNumber();
lpselfguid = self getGuid();
logPrint("J;" + lpselfguid + ";" + lpselfnum + ";" + self.name + "\n");
but i hear no sound only see the text
ok so in the map sound i made a map called ''Gomsound'' inside that map are the 2 mp3's called ''playercon & playerdiscon.mp3
#Gomannouncer,,,,,,,,,,,,
gomplayersleft,,,gomsound/playerdiscon.mp3,1,1,,,,1000000,,auto,streamed
gomplayersjoined,,,gomsound/playercon.mp3,1,1,,,,1000000,,auto,streamed
does not work :(
auto is a 3d channel, it cannot be used to play a local sound, use something like (but make sure it matches your soundalias columns):
PHP Code:
gomplayersleft,,gomsound/playerdiscon.mp3,,,,,,,,local,streamed,,,,all_mp,,,,,,local
so like this ??PHP Code:
name,sequence,probability,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
hill400_assault_gr5_letsgoget,,,Voiceovers/US/400Assault/hill400assault_gr5_sc03_01_t1.wav,1,1,,,,1000000,,auto,streamed
soviet_victory_light01,,,music/downtownsniper_victory_GRFINAL.mp3,1,1,,,,1000000,,auto,streamed
ridge88_main_music,,,music/88ridge_approaching_ridge2_GRFINAL.mp3,1,1,,,,1000000,,auto,streamed
gomplayersleft,,gomsound/playerdiscon.mp3,,,,,,,,local,streamed,,,,all_mp,,,,,,local
Your colums is different than in stock iw_multiplayer.csv so adding that just like that won't work.
Stock colums are:And your colums are:Code:name,sequence,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
So, the alias for your colums should be:Code:name,sequence,probability,file,vol_min,vol_max,vol_mod,pitch_min,pitch_max,dist_min,dist_max,channel,type,loop,masterslave,loadspec,subtitle,compression,secondaryaliasname,volumefalloffcurve,startdelay,speakermap,reverb,lfe percentage
Code:gomplayersleft,,,gomsound/playerdiscon.mp3,,,,,,,local,streamed,,,,all_mp,,,,,,local