AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Loading Sound (https://forums.alliedmods.net/showthread.php?t=99253)

NOA 08-03-2009 04:23

Loading Sound
 
Hello!

Im trying to change this script so i can play wav sound and not mp3!

The sounds are located in half-life.gcf valve/sound/tride not valve/media as it says from begining in the script.

This is the code

Code:

/*
* Play a sound during the connection.
*
* Random code part taken from plugin
* connectsound by White Panther
*
* v1.0
*
*/

#include <amxmodx>
#define Maxsounds 6

// sounds localized in gcf cache (valve/media)
// you can add more song if you want.
new soundlist[Maxsounds][] = {"c0a0_tr_emerg","c0a0_tr_dest","c0a0_tr_haz","c0a0_tr_jobs","c0a0_tr_tourn","c0a0_tr_time"}

public client_connect(id) {
    new i
    i = random_num(0,Maxsounds-1)
    client_cmd(id,"mp3 play tride/%s",soundlist[i])
    return PLUGIN_CONTINUE
}

public plugin_init() {
    register_plugin("Loading Sound","1.0","Amxx User")
    return PLUGIN_CONTINUE
}

There it says

Code:

client_cmd(id,"mp3 play tride/%s",soundlist[i])
I figure that mp3 must remove and replace something with play wav to do, becuase the sounds in valve/tride ("c0a0_tr_haz") is not Mp3 its wav.

How do i change it so it works?

Arkshine 08-03-2009 04:30

Re: Loading Sound
 
Replace mp3 play by spk

NOA 08-03-2009 04:43

Re: Loading Sound
 
Thank you so much for fast replay!

+rep


All times are GMT -4. The time now is 18:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.