Jump to content

only admin can use this command


Recommended Posts

Hello lads I maked a script that block a command and only admins can use it but it's not working it's server side for superman

Here's my code

  
  
function fly(source) 
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Fondateur" ) ) then   
        triggerEvent ( "superman", getRootElement())   
    else 
        outputChatBox("fail",source) 
    end 
end 
  
addCommandHandler("fly",fly) 

Link to comment
Wrong solution by @ mihayy5

Anyways lets come on point? Are there any errors in /debugscript 3 when you restart or do this command? If so please, tell.

Is superman event added even?

I don't think so

If the event is not added how do you expect the script to work ?

Link to comment
Wrong solution by @ mihayy5

Anyways lets come on point? Are there any errors in /debugscript 3 when you restart or do this command? If so please, tell.

Is superman event added even?

I don't think so

If the event is not added how do you expect the script to work ?

well i don't know how to add event and where :/

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