Raised This Month: $51 Target: $400
 12% 

Add Music Block


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Serkan Kischa
Member
Join Date: Dec 2012
Old 01-17-2013 , 12:27   Add Music Block
Reply With Quote #1

Hey Guys, i want to add Music block to my blockmaker but i dont know exactly how please help me, i just have this:

Quote:
##musicBlock##

new Float:gfmusicNextUse[33];
new Float:gfmusicTimeOut[33];

#########

register_cvar("bm_musiccooldown", "20.0");
register_cvar("bm_musictime", "20.0");

########

ActionMusic(id, ent)
{
if (halflife_time() >= gfMuzaTimeOut[id])
{
new Float:fTime = halflife_time();
new Float:flPropertie1, Float:flPropertie2;

pev( ent, pev_fuser1, flPropertie1 );
pev( ent, pev_fuser2, flPropertie2 );

new Float:fTimeout = get_cvar_float("bm_musictime");

gfMuzaTimeOut[id] = fTime + fTimeout;
gfMuzaNextUse[id] = fTime + fTimeout + get_cvar_float("bm_musiccooldown");
{
switch(random_num(0,10))
{
case 0:
emit_sound(id, CHAN_STREAM, gsz1, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 1:
emit_sound(id, CHAN_STREAM, gsz2, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 2:
emit_sound(id, CHAN_STREAM, gsz3, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 3:
emit_sound(id, CHAN_STREAM, gsz4, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 4:
emit_sound(id, CHAN_STREAM, gsz5, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 5:
emit_sound(id, CHAN_STREAM, gsz6, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 6:
emit_sound(id, CHAN_STREAM, gsz7, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 7:
emit_sound(id, CHAN_STREAM, gsz8, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 8:
emit_sound(id, CHAN_STREAM, gsz9, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 9:
emit_sound(id, CHAN_STREAM, gsz10, 0.8, ATTN_NORM, 0, PITCH_NORM);
case 10:
emit_sound(id, CHAN_STREAM, gsz11, 0.8, ATTN_NORM, 0, PITCH_NORM);
}
}
}
}

Last edited by Serkan Kischa; 01-17-2013 at 12:27.
Serkan Kischa is offline
Serkan Kischa
Member
Join Date: Dec 2012
Old 01-18-2013 , 19:24   Re: Add Music Block
Reply With Quote #2

Quote:
Originally Posted by Serkan Kischa View Post
Hey Guys, i want to add Music block to my blockmaker but i dont know exactly how please help me, i just have this:
blabla forgot all i said, i have Music Block now worked with 1 sound, then i added 4 sounds, and the sounds only works for ppl who put the .mp3 files into the cstrike folder, they dont download it when they join they server (when it was only 1 sound they downloaded it). So its something wrong with the precache? Please help me.
Sry for my bad English!!
Serkan Kischa is offline
Tatsuo
Member
Join Date: Dec 2017
Location: Secret
Old 12-30-2017 , 08:17   Re: Add Music Block
Reply With Quote #3

I want to add music block too, but i dont know how
Tatsuo is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 12-30-2017 , 08:39   Re: Add Music Block
Reply With Quote #4

try to convert the mp3 files to wav
Adomaz1 is offline
Tatsuo
Member
Join Date: Dec 2017
Location: Secret
Old 12-30-2017 , 08:45   Re: Add Music Block
Reply With Quote #5

Quote:
Originally Posted by Adomaz1 View Post
try to convert the mp3 files to wav
And this dont work too
Tatsuo is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 12-30-2017 , 08:58   Re: Add Music Block
Reply With Quote #6

how did you precache it
Adomaz1 is offline
Old 12-30-2017, 09:05
Tatsuo
This message has been deleted by Tatsuo.
Old 12-30-2017, 09:40
Tatsuo
This message has been deleted by Tatsuo.
Tatsuo
Member
Join Date: Dec 2017
Location: Secret
Old 12-30-2017 , 09:40   Re: Add Music Block
Reply With Quote #7

Quote:
Originally Posted by Adomaz1 View Post
how did you precache it
This?
precache_sound(gsz1);
precache_sound(gsz2);
precache_sound(gsz3);
precache_sound(gsz4);
precache_sound(gsz5);
precache_sound(gsz6);
precache_sound(gsz7);
precache_sound(gsz;
precache_sound(gsz9);
precache_sound(gsz10);
precache_sound(gsz11);
Tatsuo is offline
Adomaz1
Senior Member
Join Date: Feb 2014
Old 12-30-2017 , 10:09   Re: Add Music Block
Reply With Quote #8

just show the full code

//

sorry, i don't know how =/

Last edited by Adomaz1; 12-30-2017 at 10:45. Reason: sorry, i don't know how =/
Adomaz1 is offline
Tatsuo
Member
Join Date: Dec 2017
Location: Secret
Old 12-30-2017 , 10:30   Re: Add Music Block
Reply With Quote #9

Quote:
Originally Posted by Adomaz1 View Post
just show the full code
he is very long, I give u link for sma file Immediately say this is not my plugin
link: https://yadi.sk/d/qY10Dwb33R6grW
Tatsuo is offline
Reply



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 13:11.


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