Jump to content

Admin sounds


#Whit3^

Recommended Posts

Server

function stfu (player, command) 
 if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then 
 outputChatBox( "Sounds StartedBy "..getPlayerName(player).." :#FF8000  Shut The **** UP!", root, 255, 255, 255, true ) 
 triggerClientEvent("stfu", root) 
end 
addCommandHandler("stfu", stfu) 

Client

addEvent( "stfu", true ) 
addEventHandler( "stfu", root, function() 
  local sound = playSound("sounds/stfu.mp3") 
end ) 

When I do the command the music doesn't start

Anyone can help me pls ?

p.s Admin Sounds :D

Link to comment

-- Server Side --

function stfu ( player ) 
     if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then  
        outputChatBox( "Sounds StartedBy "..getPlayerName(player).." :#FF8000  Shut The **** UP!", root, 255, 255, 255, true ) 
        triggerClientEvent("stfu", root) 
    end 
end 
addCommandHandler("stfu", stfu) 

-- Client Side --

addEvent( "stfu", true ) 
addEventHandler( "stfu", root,  
function( ) 
        if isElement ( sound ) then 
                destroyElement ( sound ) 
        end 
       sound = playSound("sounds/stfu.mp3") 
end 
 ) 
Link to comment
-- Server Side --

function stfu ( player ) 
     if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then  
        outputChatBox( "Sounds StartedBy "..getPlayerName(player).." :#FF8000  Shut The **** UP!", root, 255, 255, 255, true ) 
        triggerClientEvent("stfu", root) 
    end 
end 
addCommandHandler("stfu", stfu) 

-- Client Side --

addEvent( "stfu", true ) 
addEventHandler( "stfu", root,  
function( ) 
        if isElement ( sound ) then 
                destroyElement ( sound ) 
        end 
       sound = playSound("sounds/stfu.mp3") 
end 
 ) 

Work Perfectly Thanks Bro

And if I want a command that I turn on and off the ability to make this command?

For Example /revokesounds

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...