Raised This Month: $ Target: $400
 0% 

[HELP] Cvar Location


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-26-2017 , 03:01   [HELP] Cvar Location
Reply With Quote #1

Hi Friends

i wan't your help anyone add cvar for sound location like i wan't file location sound/myfolder/my.wav

this location change by cvar

Example :

amx_sound_location "sound/myfolder/mysound.wav"


PHP Code:
#include <amxmodx> 
#include <amxmisc> 

#define PLUGIN "Welcome Message" 
#define VERSION "1.0" 
#define AUTHOR "Sanjay" 

new welcome_sound[] = "sound/pkk_welcome.wav" 

public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR


public 
plugin_precache() 

    
precache_sound(welcome_sound
    


public 
client_putinserver(id

    
set_task(1.0"welcome"id


public 
welcome(id

    
client_cmd(id"spk %s"welcome_sound

Sorry For My Bad English
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 08:34   Re: [HELP] Cvar Location
Reply With Quote #2

You can't add a cvar for a sound.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-26-2017 , 09:09   Re: [HELP] Cvar Location
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
You can't add a cvar for a sound.
can u add one .ini file like knifeitupmultisound??
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-26-2017 , 09:12   Re: [HELP] Cvar Location
Reply With Quote #4

Try thisnot confirmed if it works or not it should work

PHP Code:
#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Welcome Message"  
#define VERSION "1.0"  
#define AUTHOR "Sanjay"  

 
new welcome_sound;
//new welcome_sound[] = "sound/pkk_welcome.wav"  

public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)
    
welcome_sound register_cvar("amx_sound_location","");
}  

/*public plugin_precache()  
{  
   precache_sound(welcome_sound)     
}  */

public client_putinserver(id)  
{  
    
set_task(1.0"welcome"id)  
}  

public 
welcome(id)  
{  
    
client_cmd(id"spk %s"welcome_sound)  

__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-26-2017 , 09:15   Re: [HELP] Cvar Location
Reply With Quote #5

Quote:
Originally Posted by Sanjay Singh View Post
Try thisnot confirmed if it works or not it should work

PHP Code:
#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Welcome Message"  
#define VERSION "1.0"  
#define AUTHOR "Sanjay"  

 
new welcome_sound;
//new welcome_sound[] = "sound/pkk_welcome.wav"  

public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)
    
welcome_sound register_cvar("amx_sound_location","");
}  

/*public plugin_precache()  
{  
   precache_sound(welcome_sound)     
}  */

public client_putinserver(id)  
{  
    
set_task(1.0"welcome"id)  
}  

public 
welcome(id)  
{  
    
client_cmd(id"spk %s"welcome_sound)  

Jeez Louise Papa-Cheese
__________________
Relaxing is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 10:45   Re: [HELP] Cvar Location
Reply With Quote #6

@Sanjay - you have no clue what you're doing or what he wants, do you? I already said it's not possible to use cvars for files that need to be precached.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 02-27-2017 , 04:12   Re: [HELP] Cvar Location
Reply With Quote #7

Quote:
Originally Posted by Sanjay Singh View Post
Try thisnot confirmed if it works or not it should work

PHP Code:
#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Welcome Message"  
#define VERSION "1.0"  
#define AUTHOR "Sanjay"  

 
new welcome_sound;
//new welcome_sound[] = "sound/pkk_welcome.wav"  

public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)
    
welcome_sound register_cvar("amx_sound_location","");
}  

/*public plugin_precache()  
{  
   precache_sound(welcome_sound)     
}  */

public client_putinserver(id)  
{  
    
set_task(1.0"welcome"id)  
}  

public 
welcome(id)  
{  
    
client_cmd(id"spk %s"welcome_sound)  

Not Working
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-27-2017 , 08:59   Re: [HELP] Cvar Location
Reply With Quote #8

I don't see which part of that plugin you expect to work. It does absolutely nothing. Stop posting garbage codes.
__________________

Last edited by OciXCrom; 02-27-2017 at 08:59.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-27-2017 , 12:24   Re: [HELP] Cvar Location
Reply With Quote #9

Why are your trying to change the sounds file? Can't you use a single one ?
__________________
Relaxing is offline
Lawnmoverman
Member
Join Date: Jan 2017
Old 02-28-2017 , 17:13   Re: [HELP] Cvar Location
Reply With Quote #10

Precache your sound in vox folder. And then use spk without cvar but directly with sound name.
__________________


www.nozgaming.eu | cs.nozgaming.eu
Lawnmoverman 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 18:20.


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