Raised This Month: $ Target: $400
 0% 

Precache Global


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-06-2008 , 00:12   Precache Global
Reply With Quote #1

Hi, I do the next code, It posible to take the sound from de precache?

PHP Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "lalin"
#define AUTHOR "ReymonARG"
#define VERSION "1.0"
new Enable
new playsound
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
// Add your own code here
 
Enable register_cvar("sv_soundconnect","1")
}
public 
precache()
{
 
playsound precache_sound("misc/chicken2.wav")
}
public 
client_putinserver()
{
 if(
get_pcvar_num(Enable) == 1)
 {
  
client_cmd(0"spk %s"playsound)
 }

__________________

Last edited by AntiBots; 08-06-2008 at 00:17. Reason: :D
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-06-2008 , 00:19   Re: Precache Global
Reply With Quote #2

playsound is not a string
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 08-06-2008 , 02:44   Re: Precache Global
Reply With Quote #3

PHP Code:
/* Script generated by Pawn Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "lalin"
#define AUTHOR "ReymonARG"
#define VERSION "1.0"
new Enable
new playsound[] = "misc/chicken2.wav";
public 
plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
// Add your own code here
 
Enable register_cvar("sv_soundconnect","1")
}
public 
precache()
{
 
precache_sound(playsound)
}
public 
client_putinserver()
{
 if(
get_pcvar_num(Enable) == 1)
 {
  
client_cmd(0"spk %s"playsound)
 }

might work, i forget how the spk command works
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-06-2008 , 03:39   Re: Precache Global
Reply With Quote #4

Good Thx
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
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 05:34.


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