Raised This Month: $ Target: $400
 0% 

help wid... half-life original sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-15-2005 , 19:55  
Reply With Quote #1

okey... this is the code...
Code:
#include <amxmodx> #define MAXSOUNDS 2 new soundlist[MAXSOUNDS][] = {"Prologue","Nightwish"} new i public precache() {     i = random_num(0,MAXSOUNDS-1)     if (i == 0) {         precache_sound("mp3/Prologue.mp3")     }     if (i == 1) {         precache_sound("mp3/Nightwish.mp3")     } } public client_connect(id) {     client_cmd(id,"mp3 play mp3/%s",soundlist[i])     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("ConnectSound","1.0","[ --<-@ ]") }
if i put this in plugin_precache()
Code:
i = random_num(0,MAXSOUNDS-1)
"i" would be assigned the same number in client_connect() that it had from plugin_precache() so it plays the same song as precached? right?


and there another way to make the plugin play the sounds when the user is dling stuff... so if i do like this...
Code:
#include <amxmodx> #define MAXSOUNDS 2 new soundlist[MAXSOUNDS][] = {"Prologue","Nightwish"} public precache() {     new i     i = random_num(0,MAXSOUNDS-1)     {         if (i == 0) {             precache_sound("mp3/Prologue.mp3")         }         if (i == 1) {             precache_sound("mp3/Nightwish.mp3")         }     }     client_cmd(id,"mp3 play mp3/%s",soundlist[i]) } public plugin_init() {     register_plugin("ConnectSound","1.0","[ --<-@ ]") }
would the user hear the sound when they are downloading? would that work?
[ --<-@ ] Black Rose 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 23:37.


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