AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help [Sounds for take and kill] (https://forums.alliedmods.net/showthread.php?t=117330)

MouseSplash! 01-31-2010 02:29

Help [Sounds for take and kill]
 
PHP Code:

public FwdTakeDamage(victiminflictorattackerFloat:damagedamage_bits)
{  
    switch(
get_user_team(attacker))
    {
        case 
1:
        {
            
SoundsTake[victim] = 1
        
}
        case 
2:
        {
            
SoundsTake[victim] = 1
        
}
    }
    return 
HAM_HANDLED
}


public 
fw_Killed(victimattackershouldgib)
{
    if(
get_user_team(attacker) == 1
    {
    
SoundsKill[victim] = 1    
    
}
    return 
HAM_HANDLED
}

public 
Fwd_EmitSound(idchannel, const sample[], Float:volumeFloat:attnflagspitch)
{
    if(
SoundsKill[id])
    {
        switch (
random_num(12))
        {
            case 
1engfunc(EngFunc_EmitSoundidchanneldeadct1volumeattnflagspitch)
            case 
2engfunc(EngFunc_EmitSoundidchanneldeadct2volumeattnflagspitch)
        }
    }
    
    if(
SoundsTake[id])
    {
        switch(
get_user_team(id))
        {
            case 
1:
            {
                switch (
random_num(13))
                {
                    case 
1engfunc(EngFunc_EmitSoundidchanneltaket1volumeattnflagspitch)
                    case 
2engfunc(EngFunc_EmitSoundidchanneltaket2volumeattnflagspitch)
                    case 
3engfunc(EngFunc_EmitSoundidchanneltaket3volumeattnflagspitch)
                }
            }
            
            case 
2:
            {
                switch (
random_num(13))
                {
                    case 
1engfunc(EngFunc_EmitSoundidchanneltakect1volumeattnflagspitch)
                    case 
2engfunc(EngFunc_EmitSoundidchanneltakect2volumeattnflagspitch)
                    case 
3engfunc(EngFunc_EmitSoundidchanneltakect3volumeattnflagspitch)
                }
            }
        }
    }
    return 
FMRES_IGNORED;



wrecked_ 01-31-2010 03:02

Re: Help [Sounds for take and kill]
 
The problem is?

MouseSplash! 01-31-2010 03:04

Re: Help [Sounds for take and kill]
 
Quote:

Originally Posted by wrecked_ (Post 1073805)
The problem is?

dont work the sounds


All times are GMT -4. The time now is 07:18.

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