Jump to content

Help with Sound Script


Thresh

Recommended Posts

How can I make this command only for acl group admin and donator?

function helloCommand ( playerSource, commandName ) 
  
    local theTriggerer = getPlayerName ( playerSource ) 
    triggerClientEvent ( "onHello", getRootElement() ) 
    outputChatBox ( theTriggerer .. " #ffffffstarted sound #ff8c00Hello Man#ffffff!", getRootElement(), 255, 255, 255, true ) 
end 

Link to comment
function helloCommand ( playerSource, commandName ) 
    local accPlayer = getPlayerAccount(playerSource) 
    local accName = getAccountName(accPlayer) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Donator" ) ) then 
        local theTriggerer = getPlayerName ( playerSource ) 
        triggerClientEvent ( "onHello", getRootElement() ) 
        outputChatBox ( theTriggerer .. " #ffffffstarted sound #ff8c00Hello Man#ffffff!", getRootElement(), 255, 255, 255, true ) 
    end 
end 

Edited by Guest
Link to comment

It's still dont start the sound or show the text if i use that :/

function helloCommand ( playerSource, commandName ) 
  
    local accPlayer = getPlayerAccount(playerSource) 
    local accName = getAccountName(accName) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( "Donator" ) ) then 
        local theTriggerer = getPlayerName ( playerSource ) 
        triggerClientEvent ( "onHello", getRootElement() ) 
        outputChatBox ( theTriggerer .. " #ffffffstarted sound #ff8c00Hello Man#ffffff!", getRootElement(), 255, 255, 255, true ) 
    end 
end 

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...