Raised This Month: $ Target: $400
 0% 

sound emiting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-03-2009 , 13:13   sound emiting
Reply With Quote #1

how can i emit walking sound ? for terrorist
DoviuX is offline
Send a message via Skype™ to DoviuX
3Di
Member
Join Date: Sep 2009
Location: #php_title
Old 10-03-2009 , 15:30   Re: sound emiting
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <engine>

#define VERSION    "0.1"

new const SoundHere[ ] = "sound/soundhere.wav";

public 
plugin_init( )
{
    
register_plugin" Footsteps Example "VERSION"3Di" );
    
    
register_forwardFM_PlayerPreThink"PlayerThink");
}

public 
plugin_precache( )
{
    
precache_soundSoundHere );
}

public 
PlayerThinkid )
{
    if( !
is_user_aliveid ) )
        return 
PLUGIN_HANDLED;
    
    new 
CsTeams:CheckTeam cs_get_user_teamid );
    
    new 
ButtonId get_user_buttonid );
    
    if( ( 
ButtonId IN_FORWARD ) || ( ButtonId IN_BACK ) || ( ButtonId IN_MOVELEFT ) || ( ButtonId IN_MOVERIGHT ) )
    {
        switch(
CheckTeam)
        {
            case 
CS_TEAM_T:
            {
                
emit_soundidCHAN_ITEMSoundHere1.0ATTN_NORM0PITCH_HIGH );
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;

3Di is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-03-2009 , 15:43   Re: sound emiting
Reply With Quote #3

Omg big thanks man but if i have multiple sounds what do i have to do ?
DoviuX is offline
Send a message via Skype™ to DoviuX
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-03-2009 , 15:44   Re: sound emiting
Reply With Quote #4

random.
__________________
xPaw is offline
3Di
Member
Join Date: Sep 2009
Location: #php_title
Old 10-03-2009 , 15:53   Re: sound emiting
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <engine>

#define VERSION    "0.1"

new SoundsHere][ ] = 
{
    
"sound/soundhere1.wav""sound/soundhere2.wav""sound/soundhere3.wav"
}

public 
plugin_init( )
{
    
register_plugin"Footsteps Example"VERSION"3Di" );
    
    
register_forwardFM_PlayerPreThink"PlayerThink");
}

public 
plugin_precache( )
{
    
precache_sound"sound/soundhere1.wav" );
    
precache_sound"sound/soundhere2.wav" );
    
precache_sound"sound/soundhere3.wav" );
}

public 
PlayerThinkid )
{
    if( !
is_user_aliveid ) )
        return 
PLUGIN_HANDLED;
    
    new 
CsTeams:CheckTeam cs_get_user_teamid );
    
    new 
ButtonId get_user_buttonid );
    
    if( ( 
ButtonId IN_FORWARD ) || ( ButtonId IN_BACK ) || ( ButtonId IN_MOVELEFT ) || ( ButtonId IN_MOVERIGHT ) )
    {
        switch( 
CheckTeam )
        {
            case 
CS_TEAM_T:
            {
                
emit_soundidCHAN_ITEMSoundsHererandom_num0) ], 1.0ATTN_NORM0PITCH_HIGH );
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;


Last edited by 3Di; 10-03-2009 at 15:56.
3Di is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-03-2009 , 15:57   Re: sound emiting
Reply With Quote #6

ok thx
DoviuX is offline
Send a message via Skype™ to DoviuX
3Di
Member
Join Date: Sep 2009
Location: #php_title
Old 10-03-2009 , 15:58   Re: sound emiting
Reply With Quote #7

Your welcome.
3Di is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-03-2009 , 16:13   Re: sound emiting
Reply With Quote #8

when i walk error in hlds maybe need generic not sound ?

Code:
SV_StartSound: UmbrellaSwarm/Tank/TankWalk4.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk2.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk3.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk1.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk1.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk1.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk3.wav not precached (0)
SV_StartSound: UmbrellaSwarm/Tank/TankWalk3.wav not precached (0)
DoviuX is offline
Send a message via Skype™ to DoviuX
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 10-03-2009 , 16:16   Re: sound emiting
Reply With Quote #9

PHP Code:
public plugin_precache( )
{
    
precache_sound"sound/soundhere1.wav" );
    
precache_sound"sound/soundhere2.wav" );
    
precache_sound"sound/soundhere3.wav" );



PHP Code:
public plugin_precache( )
{
    for(new 
0;sizeof SoundsHere;i++)
         
precache_sound(SoundsHere[i])

__________________
alan_el_more is offline
3Di
Member
Join Date: Sep 2009
Location: #php_title
Old 10-03-2009 , 16:18   Re: sound emiting
Reply With Quote #10

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <engine>

#define VERSION    "0.1"

new SoundsHere][ ] = 
{
    
"UmbrellaSwarm/Tank/TankWalk1.wav""UmbrellaSwarm/Tank/TankWalk2.wav""UmbrellaSwarm/Tank/TankWalk3.wav",
    
"UmbrellaSwarm/Tank/TankWalk4.wav"
}

public 
plugin_init( )
{
    
register_plugin"Footsteps Example"VERSION"3Di" );
    
    
register_forwardFM_PlayerPreThink"PlayerThink");
}

public 
plugin_precache( )
{
    
precache_sound"UmbrellaSwarm/Tank/TankWalk1.wav" );
    
precache_sound"UmbrellaSwarm/Tank/TankWalk2.wav" );
    
precache_sound"UmbrellaSwarm/Tank/TankWalk3.wav" );
    
precache_sound"UmbrellaSwarm/Tank/TankWalk4.wav" );
}

public 
PlayerThinkid )
{
    if( !
is_user_aliveid ) )
        return 
PLUGIN_HANDLED;
    
    new 
CsTeams:CheckTeam cs_get_user_teamid );
    
    new 
ButtonId get_user_buttonid );
    
    if( ( 
ButtonId IN_FORWARD ) || ( ButtonId IN_BACK ) || ( ButtonId IN_MOVELEFT ) || ( ButtonId IN_MOVERIGHT ) )
    {
        switch( 
CheckTeam )
        {
            case 
CS_TEAM_T:
            {
                
emit_soundidCHAN_ITEMSoundsHererandom_num0) ], 1.0ATTN_NORM0PITCH_HIGH );
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;

3Di 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 17:45.


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