Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Play poison sound for players near poison victim

- - - - -

  • Please log in to reply
6 replies to this topic

#1
OFFLINE   NRD

NRD

    Newbie

  • Members
  • Pip
  • 8 posts
0
Unknown
I saw this in another topic in a different forum here, so I thought I would make a request for it. My players sometimes get upset when a teammate "steals" their poison kill. In silent mod this has been happening a lot as we cannot tell if our teammate has poisoned someone or not. Would it be possible to add this?

Thanks

#2
OFFLINE   Sol

Sol

    Regular Member

  • Coders
  • PipPipPip
  • 113 posts
28
On a distinguished road
  • LocationPoland
Of course, you can easily add this by yourself.
SOUND_PATH = "wav/......"
function et_Obituary(num_vic, num_killer, meansOfDeath)
local victimteam = tonumber(et.gentity_get(num_vic, "sess.sessionTeam"))
local killerteam = tonumber(et.gentity_get(num_killer, "sess.sessionTeam"))

if victimteam ~= killerteam and killernum ~= 1022 then
  if meansOfDeath == POISON WEAPON ( I DUNNO ID ) then
   et.trap_SendConsoleCommand(et.EXEC_APPEND,string.format("playsound_env %d %s\n",num_vic,SOUND_PATH))
  end
end
end


#3
OFFLINE   BECK

BECK

    Advanced Member

  • Subscriber
  • PipPipPipPip
  • 226 posts
61
Getting Better
  • LocationDenver, CO
okay, gonna ask a n00by question Sol, but where would one "add" that code? Is that a LUA script?

#4
OFFLINE   NRD

NRD

    Newbie

  • Members
  • Pip
  • 8 posts
0
Unknown

okay, gonna ask a n00by question Sol, but where would one "add" that code? Is that a LUA script?


Lol I was wondering the same thing, this was stated in another thread the exact same way. A little more info as to where to put that code would be very helpfull for everyone else who ever stumbles upon this thread looking for answers. Thank you for sharing the code, but it doesn't help most people unless you let us know where to put it!

#5
OFFLINE   Dragonji

Dragonji

    Advanced Member

  • Members
  • PipPipPipPip
  • 514 posts
142
On the road to fame
  • LocationPoland

Is that a LUA script?

Yes, it is Lua.

#6
OFFLINE   Sol

Sol

    Regular Member

  • Coders
  • PipPipPip
  • 113 posts
28
On a distinguished road
  • LocationPoland
Yes, its LUA Script. But you have to first change your sound_path and poison ID weapon also.
Just simply up your script do server's silent folder and add filename to cvar lua_modules "luascript.lua" after map_restart.

#7
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
What about the poison icon over the poisoned player head?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users