SkatCh

Members
  • Content Count

    366
  • Joined

  • Last visited

Posts posted by SkatCh


  1. Databases do not need to be reloaded. You access them directly.

    bro i think you don't undrestand my question just i need simple script to refresh it , because i create an ATM system but when i edit player money from db the player can't see the money ingame but when i close the server the money appear .


  2. guys i need some help here :

    function joinNameCheck(old,new) 
    local account = getAccountName(new) 
            if (isObjectInACLGroup("user."..account, aclGetGroup("Trial Staff"))) then  --> this line 
                      adminLoginMessage(source, getPlayerName(source).." logged in - L1") 
                return 
            elseif (isObjectInACLGroup("user."..account, aclGetGroup("Trained Staff"))) then 
                adminLoginMessage(source, getPlayerName(source).." logged in - L2") 
                return 
            elseif (isObjectInACLGroup("user."..account, aclGetGroup("Trusted Staff"))) then 
                adminLoginMessage(source, getPlayerName(source).." logged in - L3") 
                return 
            elseif (isObjectInACLGroup("user."..account, aclGetGroup("Hight Staff"))) then 
                adminLoginMessage(source, getPlayerName(source).." logged in - L4") 
                return 
            elseif (isObjectInACLGroup("user."..account, aclGetGroup("Head Staff"))) then 
                    adminLoginMessage(source, getPlayerName(source).." logged in - L5") 
                return 
                end 
                end 
    addEventHandler("onPlayerLogin", root, joinNameCheck) 
    

    it's just a part from my script , the problem is when i login i got this warning :

    Bad argument @isObjectInACLGroup ' [Excepted acl-group at argument 2 , got boolean]


  3. i'm sorry bro if i waste your time , i tried the same script this :

    function dxDrawCircle3D( x, y, z, radius, segments, color, width ) 
        segments = segments or 16; -- circle is divided into segments -> higher number = smoother circle = more calculations 
        color = color or tocolor( 255, 255, 0 ); 
        width = width or 1; 
        local segAngle = 360 / segments; 
        local fX, fY, tX, tY; -- drawing line: from - to 
        for i = 1, segments do 
            fX = x + math.cos( math.rad( segAngle * i ) ) * radius; 
            fY = y + math.sin( math.rad( segAngle * i ) ) * radius; 
            tX = x + math.cos( math.rad( segAngle * (i+1) ) ) * radius; 
            tY = y + math.sin( math.rad( segAngle * (i+1) ) ) * radius; 
            dxDrawLine3D( fX, fY, z, tX, tY, z, color, width ); 
        end 
    end 
    

    i changed the seagnle etc but i got an other form not a rectangle , i think it's wrong . because i don't undrestand your last answer .


  4. no it's working fine i already asked to close the topic , just i want to add something ;

    50p you must add this :

    addEventHandler( "onClientRender", root, 
        function( ) 
            for _, marker in pairs( getElementsByType("marker") ) do 
                if getMarkerType( marker ) == "cylinder" then 
                    setElementAlpha( marker, 0 ); -- make the marker invisible 
                    local x,y,z = getElementPosition( marker ); 
                    local radius = getMarkerSize( marker ); 
                    local color = tocolor( getMarkerColor( marker ) ); 
                    dxDrawCircle3D( x, y, z, radius, 24, color ); 
                end 
            end 
        end 
    end <---------------------------------- missing 
    ) 
    


  5. thx bro for help i changed all markers alpha to 0 but i can't see the dxDrawcircle. can you tell me how to create it is this right :

    dxDrawCircle3D(1631.2060546875,1850.658203125,10.8203125,1.5,24,tocolor( 255, 255, 0 ),2)


  6. lol i'm asking how to create it i tried this but didn't work :

      
        function Drop () 
            if getElementData(source,"bag") and getElementData(source,"bag") == true then 
                local data = getElementData(atBag,"num") 
                local data = tonumber(data) 
                local x,y,z = getElementPosition(source) 
                setElementData(source,"bag",false) 
                destroyElement(atBag) 
                destroyElement(marker) 
                destroyElement(bli) 
                destroyElement(marBli) 
                ob = createPickup(x,y,z,3,1210,0) 
                setElementCollisionsEnabled(ob,false) 
                mar = createMarker(x,y,z,"corona",0.9,255,0,0,0) 
                setElementData(mar,"num",data) 
                bl = createBlipAttachedTo(mar,52) 
            end 
        end 
    addCommandHandler ("dropbc" , drop) 
      
    


  7. hi guys please can anyone help me to create a command to drop briefcase like this onPlayerWasted :

    addEventHandler("onPlayerWasted",root, 
        function () 
            if getElementData(source,"bag") and getElementData(source,"bag") == true then 
                local data = getElementData(atBag,"num") 
                local data = tonumber(data) 
                local x,y,z = getElementPosition(source) 
                setElementData(source,"bag",false) 
                destroyElement(atBag) 
                destroyElement(marker) 
                destroyElement(bli) 
                destroyElement(marBli) 
                ob = createPickup(x,y,z,3,1210,0) 
                setElementCollisionsEnabled(ob,false) 
                mar = createMarker(x,y,z,"corona",0.9,255,0,0,0) 
                setElementData(mar,"num",data) 
                bl = createBlipAttachedTo(mar,52) 
            end 
        end 
    ) 
    


  8. hi there please can anyone explane this line to me :

    Resource must have access to function.kickPlayer function.getClientIP and function.getPlayerSerial


  9. hi guys i need some information about Gui position ( Center , right , left) :

    i know how to put it center : (screenWidth / 2) - (windowWidth / 2), (screenHeight / 2) - (windowHeight / 2).

    what about the others .


  10. guys can anyone tell me the riht coordonation to attach this object to the player : object ID:1550 (money Bag) .

    attachElementToBone(element,ped,bone,x,y,z,rx,ry,rz)