Jump to content

help


joedajoester

Recommended Posts

Posted

Hi i have a question, for scripting would this be right for using something like this....

function ( thePlayer ) 
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
givePedJetPack ( thePlayer ) 
  else 
removePedJetPack ( thePlayer ) 
 end 
  end 

I used this wiki page example 1

Thanks

Also im on vacation so i have been inactive for a while :cry: and i missed the mta 1.2 beta test saturday and i didnt even get to try out mta 1.2!! I missed so much back home like the north Korea dictators death and mta 1.2 :(

Posted
function jetpack( thePlayer ) 
    if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then 
        givePedJetPack ( thePlayer ) 
    else 
        removePedJetPack ( thePlayer ) 
    end 
end 

Posted
function jetpack( thePlayer ) 
    if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then 
        givePedJetPack ( thePlayer ) 
    else 
        removePedJetPack ( thePlayer ) 
    end 
end 

this still wrong

it's should be

function jetpack( thePlayer ) 
     if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then 
          if not doesPedHaveJetPack ( thePlayer ) then    
               givePedJetPack ( thePlayer ) 
          else 
               removePedJetPack ( thePlayer ) 
          end 
     end 
end 

Posted

Im just asking if the way the else and other stuff, is it placed correctly. Im not worrying about if the if isobjectinaclgroup is typed correctly, im asking if the way the else and ends are placed correctly.

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