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 !!!
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 !!!
kevi07 (17th March 2017),kubislav23 (13th August 2016)
I just remember this thing but i didnt tested it, so i dont know if is workingPHP 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
}
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);
Last edited by Wesleyw3zep; 11th December 2016 at 04:47. Reason: sorry my bad i hope i do it good this time ?
dont put waits in there. Make it a thread instead.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
kung foo man (18th March 2017),thOuMta (13th August 2016)
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
kung foo man (18th March 2017)
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
Last edited by Wesleyw3zep; 19th March 2017 at 00:39.
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
sudo apt-get rekt
kung foo man (19th March 2017)
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 percentageSo, 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 percentageCode:gomplayersleft,,,gomsound/playerdiscon.mp3,,,,,,,local,streamed,,,,all_mp,,,,,,local
Last edited by voron00; 19th March 2017 at 07:56.
sudo apt-get rekt