AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pev_flTimeStepSound problem (https://forums.alliedmods.net/showthread.php?t=62880)

Exolent[jNr] 11-06-2007 15:39

pev_flTimeStepSound problem
 
i use this coding to make only cts have footsteps, but it still takes away ct's footsteps.

heres what i got:

Code:

public fwdPlayerPreThink(id)
{
    if(!is_user_alive(id))
          return FMRES_IGNORED;
   
    static stepSound;
    if(get_user_team(id) == 2)
    {
          stepSound = 400;
    }
    else
    {
          stepSound = 999;
    }
    set_pev(id, pev_flTimeStepSound, stepSound);
    return FMRES_IGNORED;
}

but it doesnt seem to work.

ive tried a lot of stuff to make it work but it wont.

can someone give me a script of how they would do it?

VEN 11-06-2007 15:48

Re: pev_flTimeStepSound problem
 
I'd do it like so:
Code:
public fwdPlayerPreThink(id) {      if(is_user_alive(id) && get_user_team(id) != 2)           set_pev(id, pev_flTimeStepSound, 999) }
If this wouldn't work then i'd say that your public function is never called or something else...

Exolent[jNr] 11-06-2007 16:22

Re: pev_flTimeStepSound problem
 
is the pev_flTimeStepSound defaulted at every prethink?

VEN 11-07-2007 09:46

Re: pev_flTimeStepSound problem
 
Speaking in your terms - yes.

Exolent[jNr] 11-11-2007 16:06

Re: pev_flTimeStepSound problem
 
so then it wouldnt be necessary to set it at 400 if it will default back to 400 on its own?

VEN 11-12-2007 02:01

Re: pev_flTimeStepSound problem
 
Right.


All times are GMT -4. The time now is 01:17.

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