• Make a sound play to all players when a certain player joins.
    2 replies, posted
I want to make a certain sound play for all players when a player with a specific steamID joins. I tried using the "Gamemode.PlayerInitialSpawn" in a autorun/server file but it didn't work.
[lua] hook.Add( "PlayerInitialSpawn", "SomeCuntJoined", function( ply ) if ply:SteamID() == "STEAM_0:1:1337" then for k,v in pairs(player.GetAll()) do v:SendLua([[surface.Playsound("sound/supercustomdarkrp/troll.wav")]]) end end end) [/lua]
[QUOTE=Aj;41911667][lua] hook.Add( "PlayerInitialSpawn", "SomeCuntJoined", function( ply ) if ply:SteamID() == "STEAM_0:1:1337" then for k,v in pairs(player.GetAll()) do v:SendLua([[surface.Playsound("sound/supercustomdarkrp/troll.wav")]]) end end end) [/lua][/QUOTE] Thank you.
Sorry, you need to Log In to post a reply to this thread.