Reflex# Posted March 24, 2012 Posted March 24, 2012 On wiki i found only onPlayerWasted I want to do when player win round,play sound Scripting in lua
Kenix Posted March 24, 2012 Posted March 24, 2012 You need use event onClientPlayerWasted because you need play sound but playSound function is client side. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
X-SHADOW Posted March 24, 2012 Posted March 24, 2012 Kenix he want play sound when round is end not when player die My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
Castillo Posted March 24, 2012 Posted March 24, 2012 What game mode are you using? race? if so: you can use 'onPlayerFinish' when a player finishes a race, but not when finish a DM map. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
X-SHADOW Posted March 24, 2012 Posted March 24, 2012 i got what he mean he want play sound when map finsh i think he can use onRaceMapStartChangeing then play sound My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
GanJaRuleZ Posted March 24, 2012 Posted March 24, 2012 Tell us what gamemode ur using . My Projects! No one.
Reflex# Posted March 25, 2012 Author Posted March 25, 2012 Tell us what gamemode ur using . I use Race gamemode. But play only on DM maps.I want when player win round,playing music Scripting in lua
GanJaRuleZ Posted March 25, 2012 Posted March 25, 2012 Use : onClientPlayerWasted playSound In case you want to use for all players instead of "playSound" use playSound3D My Projects! No one.
Reflex# Posted March 25, 2012 Author Posted March 25, 2012 Use : onClientPlayerWasted playSound In case you want to use for all players instead of "playSound" use playSound3D Ok..so i must use only playSound3D or with playSound? Scripting in lua
GanJaRuleZ Posted March 25, 2012 Posted March 25, 2012 playSound - When you want that the sound will play just to the players who died playSound3D - Play the sound in a 3D Radius. My Projects! No one.
drk Posted March 25, 2012 Posted March 25, 2012 Server-side: addEventHandler ( 'onPlayerWasted', root, function ( ammo, killer, weapon ) if ( killer and killer ~= source ) then if ( #getAlivePlayers() == 1 ) then triggerClientEvent ( 'play', source ) end end end ) Client-side: addEvent ( 'play', true ) addEventHandler ( 'play', root, function ( ) playSound ( 'sounds/win.mp3', false ) end ) Not tested. EPT Team Server Development: 0% Learning C++ | C++ is amazing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now