AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   plz help with this (https://forums.alliedmods.net/showthread.php?t=100785)

Zapdos1 08-17-2009 22:21

plz help with this
 
PHP Code:

new const example_sound[] = "misc/example/sound.wav"
new const example_model[] = "models/example/model.mdl"

public plugin_precache()
    
    
precache_sound(example_sound)
    
engfunc(EngFunc_PrecacheModelexample_model)

//...
        
case 1:
        {
            
client_cmd(id"spk ^"%s^""example_sound)  
            
cs_set_user_model(id"example_model")
        } 

plz, help.
when i selected a menu option, i can't hear the sound, and the model
didn't set.
plz help
sorry for my english

fysiks 08-17-2009 23:45

Re: plz help with this
 
I believe it should be like this for the model, I don't know much about the sound.:

Code:
new const example_sound[] = "misc/example/sound.wav" new const example_model[] = "models/example/example.mdl" public plugin_precache()         precache_sound(example_sound)     engfunc(EngFunc_PrecacheModel, example_model) //...         case 1:         {             client_cmd(id, "spk ^"%s^"", example_sound)               cs_set_user_model(id, "example")         }

Alucard^ 08-18-2009 05:38

Re: plz help with this
 
You tested with:

PHP Code:

client_cmd(id"spk %s"example_sound

?

I am not sure becouse i dont remember what is ^"%s^" but for example:

PHP Code:

#define BLOCK_SOUND "/items/medshotno1.wav"

//...

client_cmd(id"spk %s"BLOCK_SOUND

This work perfect for me, but dont know.. maybe with "const" is different.

Zapdos1 08-18-2009 17:36

Re: plz help with this
 
thanks fysiks, the problem was solved

@Alucard^

still hear the sound.
thanks anyway

sorry, for my bad english


All times are GMT -4. The time now is 15:04.

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