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
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.
X-SHADOW Posted March 24, 2012 Posted March 24, 2012 Kenix he want play sound when round is end not when player die
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.
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
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
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
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?
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.
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.
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