Jump to content

help with jatpack


TroyBoy

Recommended Posts

i have problem with this command:

addCommandHandler ( "jetpack", 
    function ( theplayer ) 
    local playerTeam = getPlayerTeam ( source ) 
            if (not playerTeam) then return end 
            local name = getTeamName ( playerTeam ) 
            if (name == "Owner" or name == "Admin") then 
            local px, py, pz = getElementPosition ( source ) 
            createPickup ( px, py, pz, "3", "370", "30000" ) 
            end 
         end 
)                

when i do this command its dont do nothing and if you can do this command for the only one that do this command can take and see this jetpack and not others ty

Link to comment
addCommandHandler ( "jetpack", 
    function () 
          local playerTeam = getPlayerTeam ( source ) 
            if not playerTeam then return end 
                  local name = getTeamName ( playerTeam ) 
                      if name == "Owner" or name == "Admin" then 
                      local px, py, pz = getElementPosition ( source ) 
                      createPickup ( px, py, pz, "3", "370", "30000" ) 
               end 
      end 
)                

You have to be a team member. If not, function return end.

Next time use lua code tags.

Link to comment

Server

addCommandHandler ( "jetpack", 
    function ( player ) 
        local playerTeam = getPlayerTeam ( player ) 
        if not playerTeam then  
            return  
        end 
        local name = getTeamName ( playerTeam ) 
        if name == "Owner" or name == "Admin" then 
            local px, py, pz = getElementPosition ( player ) 
            createPickup ( px, py, pz, 3, 370, 30000 ) 
        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...