AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Precache Global (https://forums.alliedmods.net/showthread.php?t=75459)

AntiBots 08-06-2008 00:12

Precache Global
 
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)
 }



jim_yang 08-06-2008 00:19

Re: Precache Global
 
playsound is not a string

Emp` 08-06-2008 02:44

Re: Precache Global
 
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

AntiBots 08-06-2008 03:39

Re: Precache Global
 
Good :D Thx


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

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