Raised This Month: $ Target: $400
 0% 

loading sound custom


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-06-2007 , 17:33   loading sound custom
Reply With Quote #1

I dont understand why this plugin does not work
Code:
new sound[] = {"hl_loading"}

public plugin_init(){
    //bla, bla
}

public client_connect(id){

    client_cmd(id,"mp3 play hl/%s",sound)

}

public plugin_precache(){

precache_sound("hl/hl_loading.mp3")
}
The sound directory is cstrike/sound/hl and the sound is hl_loading.mp3
Any Ideas?
__________________


I hate Spammers....
vl@d is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-06-2007 , 17:55   Re: loading sound custom
Reply With Quote #2

client_cmd(id,"mp3 play sound/hl/%s",sound)
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-06-2007 , 18:22   Re: loading sound custom
Reply With Quote #3

Code:
    new const sound[] = "sound/hl/hl_loading.mp3";     public plugin_init()     {         // bla, bla     }     public client_connect( id )     {         client_cmd( id, "mp3 play %s", sound );     }     public plugin_precache()     {         precache_generic( sound );     }
__________________
Arkshine is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-07-2007 , 05:51   Re: loading sound custom
Reply With Quote #4

thx arkshine & connorr
__________________


I hate Spammers....
vl@d is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-07-2007 , 10:44   Re: loading sound custom
Reply With Quote #5

Yes you'll have errors if you use precache_sound with a mp3, so arkshine is right for that.
But only reason your code didn't work is because you didn't put sound/ in the path.
ConnorMcLeod is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-08-2007 , 04:20   Re: loading sound custom
Reply With Quote #6

btw what is the difference between new sound and new const sound ?
__________________


I hate Spammers....
vl@d is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:05.


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