Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Posts posted by 1LoL1

  1. Hello guys i need help with gate open open how to make it open for one acl group can somone add it on this gate system
    local markerName = createMarker(411.52252197266, 2533.6247558594, 19.1484375, "cylinder", 1.0, 255,351,512, 255) 
    local gateName = createObject(1553, 412, 2533.8000488281, 19.299999237061, 0, 0, 90) 
    local state = false 
      
    function markerHitFunction() 
     if (state) then 
      moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) 
     else 
      moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates 
     end 
     if (moveGate) then 
      state = not state; 
     end 
    end 
          
    addEventHandler("onMarkerHit", markerName, markerHitFunction) 
    

    function markerHitFunction(source) 
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then 
        if (state) then 
            moveGate = moveObject(gateName, 3000, 411.89999389648, 2535.8000488281, 19.299999237061) 
        else 
            moveGate = moveObject(gateName, 3000, 412, 2533.8000488281, 19.299999237061) -- Original x, y, z coordinates 
        end 
        if (moveGate) then 
            state = not state; 
            end 
        end 
    end   
    addEventHandler("onMarkerHit", markerName, markerHitFunction) 
    

  2. well you can check the group using getAccountData, for example if your group system records the clan in an accountdata called "dayzclan" you can use:
    local playerclan = getAccountData(source,"dayzclan") 
      
    

    You are wrong here.

    Try this:

    local acc = getPlayerAccount(source) 
    local playerclan = getAccountData(acc, "dayzclan") 
      
    

  3. - Change the cords for the crosshair issue solved..

    Download the resource and you will see that its not so easy as you think, Its more complicated. If i change i crosshairs position that will not change the shooting direction..

    now my only question is: I want to set the projectiles direction to the turrets direction. Whats the problem in my script?

    function shootProjectile()    
    local veh =getPedOccupiedVehicle(localPlayer)    
     if(veh) and getVehicleModel(veh) == 601then        
    local tx, ty = getVehicleTurretPosition (veh)         
    createProjectile(veh, 19, tx,ty,2)    endend 
      
    

    function shootProjectile()   
    local veh = getPedOccupiedVehicle(localPlayer)   
    if(veh) and getVehicleModel(veh) == 601 then       
    local tx, ty = getVehicleTurretPosition (veh)         
    createProjectile(veh, 19, tx,ty,2)     
         end 
    end 
    

  4. Hello!

    I tried to disable 1 tab from tab gui with this code

    guiSetProperty(tab, "Disabled", "True") 
    

    It didnt work i dont know why.

    Here is image http://prntscr.com/aklnpv

    i want to disable tab2 but so tab1 and tab3 would be still available, i saw this on admin panel but seems that i cant do that. :D

    Thanks for help.

    Try this:

    guiSetEnabled(tab, false) 
    

  5. This is for team not admin :o

    he said "(theTeamYouWant)" he can simply rename that team as "Staff" or "Admins" and it will be only for the admins.

    Again i say this is for team.... not admin in acl.xml. 100% he don't want for team.. but for "Admin" in acl.xml.

  6.   
    if getPlayerTeam(theElementHere) == getTeamFromName(theTeamYouWant) then 
    --[[your code here]]-- 
    end --[[add this because we use then in 3rd line]]-- 
      
    

    This is for team not admin :o

    Try this:

    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then 
    

  7. addCommandHandler("chat", 
    function (thePlayer, ... ) 
        if isPlayerMuted (thePlayer) then 
            outputChatBox("You are muted!!!", thePlayer, 255, 0, 0) 
            return 
    end 
        local message = table.concat ({ ... },"") 
            for i, player in ipairs(getElementsByType("player")) do 
                if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then 
                    outputChatBox("AdminChat: "..string.gsub(getPlayerName(thePlayer), "#%x%x%x%x%x%x", "")..": ".. message, player, 255, 255, 255, true ) 
                end 
            end 
        else 
            outputChatBox("You don't have Admin Rights !!!", thePlayer, 255, 0, 0, true ) 
        end 
    end) 
    

  8. You are idiot? i already posted link..

    here put in server-side this:

    function onResourceStart ( ) 
        local players = getElementsByType ( "player" ) -- Store all the players in the server into a table 
        for key, player in ipairs ( players ) do       -- for all the players in the table 
            setPlayerNametagShowing ( player, false )  -- turn off their nametag 
        end 
    end 
    addEventHandler ( "onResourceStart", resourceRoot, onResourceStart ) 
      
    function onPlayerJoin ( ) 
          -- Whoever joins the server should also have their nametags deactivated 
        setPlayerNametagShowing ( source, false ) 
    end 
    addEventHandler ( "onPlayerJoin", root, onPlayerJoin ) 
    

×
×
  • Create New...