Jump to content

KelogsLV

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by KelogsLV

  1. KelogsLV

    BoneAttach

    function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") else setElementPosition(element,getElementPosition(ped)) end end end addEventHandler("onClientPreRender",root,putAttachedElementsOnBones) 27. and 28. [Expected number, got NaN]
  2. function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") else setElementPosition(element,getElementPosition(ped)) end end end addEventHandler("onClientPreRender",root,putAttachedElementsOnBones) 27. and 28. [Expected number, got NaN]
  3. Yes, i did, and now it is working But can you help me please whit the second error?
  4. setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY Whats is wrong whit these two collums? Warning : ([Expected number, got NaN])
  5. WARNING: [DayZ-MTA]\login\server.lua:27: Access denied @ 'addAccount'
  6. nothing only warnings
  7. KelogsLV

    Help please

    When i run the script, it is not working and i can't close the Admin Panel function healnearbyplrs() lp = getLocalPlayer() for _, plr in ipairs(getElementsByType("player"))do if getElementData(plr,"duty") == true then local x,y,z = getElementPosition(plr) local cx,cy,cz = getElementPosition(getLocalPlayer()) if getDistanceBetweenPoints3D(x,y,z, cx,cy,cz) <= 10 then setElementData(getLocalPlayer(),"bleeding",0) setElementData(getLocalPlayer(),"cold",false) setElementData(getLocalPlayer(),"pain",false) setElementData(getLocalPlayer(),"brokenbone",false) setElementData(getLocalPlayer(),"blood",2400000) setElementData(getLocalPlayer(),"thirst",100) setElementData(getLocalPlayer(),"food",100) setPedCanBeKnockedOffBike(plr,false) end end end end addEventHandler("onClientRender", getRootElement(), healnearbyplrs) function healnearbyplrs() lp = getLocalPlayer() if getElementData(lp, 'duty') then return end for _, plr in ipairs(getElementsByType("player"))do if getElementData(plr,"xmode") == true then local x,y,z = getElementPosition(plr) local cx,cy,cz = getElementPosition(getLocalPlayer()) if getDistanceBetweenPoints3D(x,y,z, cx,cy,cz) == 0 then setElementData(getLocalPlayer(),"bleeding",0) setElementData(getLocalPlayer(),"cold",false) setElementData(getLocalPlayer(),"pain",false) setElementData(getLocalPlayer(),"brokenbone",false) --setElementData(getLocalPlayer(),"blood",25000) setElementData(getLocalPlayer(),"thirst",100) setElementData(getLocalPlayer(),"food",100) end end end end addEventHandler("onClientRender", getRootElement(), healnearbyplrs) addEventHandler("onClientRender", root, function() local screenW, screenH = guiGetScreenSize() dxDrawText(""..getStaffOnDuty(), 10, (screenH - 10) , (10) + 331, ( (screenH - 20) / 1) + 20, tocolor(255, 255, 255, 255), .80, "clear", "left", "top", false, false, false, true, false) end ) function getStaffOnDuty() theTableMembersOnline = "" for i, player in ipairs(getElementsByType ( "player" )) do if getElementData(player, "duty") == true then theTableMembersOnline = theTableMembersOnline .. ", " .. getPlayerName(player) end end if theTableMembersOnline == "" then return "" else return "Staff #FF0000On Duty#FFFFFF: " .. theTableMembersOnline end end function showStaffOnDuty() players = getElementsByType("player") for _, thePlayer in ipairs(players)do -- if thePlayer ~= getLocalPlayer() and getElementData(thePlayer, "duty") == true then local x,y,z = getPedBonePosition(thePlayer,5) local cx,cy,cz = getElementPosition(getLocalPlayer()) if getDistanceBetweenPoints3D(x,y,z, cx,cy,cz) <= 100 then sX, sY = getScreenFromWorldPosition(x,y,z) if(sX and sY )then local plrName = getPlayerName(thePlayer) local namelength = dxGetTextWidth(plrName, 2) local NS = "NO SHOOTING!" local NSc = "••••" color = tocolor(getPlayerNametagColor(thePlayer)) size = 2 dist = getDistanceBetweenPoints3D(x,y,z, cx,cy,cz) dxDrawText(plrName, sX , sY- 70, sX, sY , color, size- (dist / 43) , "default","center","top") dxDrawText(NS, sX , sY - 40 , sX, sY, color, size- (dist / 43), "default","center","top") dxDrawText(NSc, sX-140 , sY -45, sX, sY, popoco, size- (dist / 43), "default","left","top") dxDrawText(NSc, sX-140, sY -35 , sX, sY, popoco2, size- (dist / 43), "default","left","top") dxDrawText(NSc, sX+95, sY-45 , sX, sY, popoco2, size- (dist / 43), "default","left","top") dxDrawText(NSc, sX+95, sY-35 , sX, sY, popoco, size- (dist / 43), "default","left","top") end end end end end addEventHandler("onClientRender", getRootElement(), showStaffOnDuty) popo = true function chc() if popo == true then popoco =tocolor(255,0,0,255) popoco2 =tocolor(0,0,255,255) popo = false else popoco =tocolor(0,0,255,255) popoco2 =tocolor(255,0,0,255) popo = true end end setTimer(chc,700,0) function noStaffDamage ( attacker ) if (getTeamName (getPlayerTeam(source))) == ("Staff") and getElementData(source, 'duty') then if attacker then triggerServerEvent("onStaffDamaged", root, attacker) --for DONT ANNOY STAFF MESSAGE end cancelEvent() end end addEvent("onClientPlayerDamage", true) addEventHandler ("onClientPlayerDamage", getRootElement(), noStaffDamage) teamAdmins = getTeamFromName('Staff') players = getTeamFromName('Players') for i,p in ipairs(getElementsByType'player')do setPlayerTeam(p,players) end ------------------------------------------------------------------------------------------------------------- function warn(attacker) if getElementData(attacker, "duty") == true then return else outputChatBox("PLEASE REFRAIN FROM ANNOYING THE STAFF ON DUTY!", attacker, 255,0,0,false) -- setElementData(attacker, "brokenbone", true)p -- setControlState("jump", true) -- setElementData(attacker, "pain", true) -- setElementVelocity(attacker, 0, 0, .5 ) setPedAnimation(attacker, "ped", "cower", true) end end addEvent("onStaffDamaged", true) addEventHandler("onStaffDamaged", root, warn) ------------------------------------------------------------------------------------------------------------- addEventHandler("kilLDayZPlayer", root, function () if getElementData(source,'duty') then cancelEvent() end end ) ------------------------------------------------------------------------------------------------------------- addEventHandler("onPlayerQuit",root, function () setAccountData(getPlayerAccount(source), "aduty", false ) end) addEventHandler("onPlayerCommand",root, function (cmd) if cmd == 'admin' then if not getElementData(source,'duty') then cancelEvent() end end end ) ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- function aonduty(player) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then local r,g,b = getTeamColor(teamAdmins) local name = getPlayerName ( player ) if getAccountData(getPlayerAccount(player), "aduty") == true then setPlayerTeam ( player, teamAdmins ) --outputChatBox("#"..name.." is now #00FF00On Duty", getRootElement(), r,g,b, true) setElementData ( player, "duty", true ) setElementData ( player, "advadmin", true ) setAccountData(getPlayerAccount(player), "aduty", false ) else --outputChatBox("#"..name.." is Off Duty", getRootElement(), r,g,b, true) setElementData ( player, "duty", false ) setElementData ( player, "advadmin", false ) --setPlayerTeam ( player, players ) setAccountData(getPlayerAccount(player), "aduty", true ) end end end addCommandHandler("duty",aonduty) --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- toggle = true function aonduty(source) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then local r,g,b = getTeamColor(teamAdmins) local name = getPlayerName ( source ) if not (getElementData(source, "tempodosexo") == true) then if toggle == false then setPlayerTeam ( source, teamAdmins ) outputChatBox("#"..name.." is now #00FF00On Duty", getRootElement(), r,g,b, true) setElementData ( source, "duty", true ) toggle = true else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then outputChatBox("#"..name.." is Off Duty", getRootElement(), r,g,b, true) setElementData ( source, "duty", false ) --setPlayerTeam ( source, players ) toggle = false end end else if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then if not (getElementData ( source, "duty") == false) then outputChatBox("#"..name.." is Off Duty", getRootElement(), r,g,b, true) setElementData ( source, "duty", false ) --setPlayerTeam ( source, players ) end end end end end addCommandHandler("duty",aonduty) --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------- function aonduty(player) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup("SuperModerator")) then local r,g,b = getTeamColor(teamAdmins) local name = getPlayerName ( player ) if getAccountData(getPlayerAccount(player), "aduty") == true then setPlayerTeam ( player, teamAdmins ) outputChatBox("#"..name.." is now #00FF00On Duty", getRootElement(), r,g,b, true) setElementData ( player, "duty", true ) setElementData ( player, "advadmin", true ) setAccountData(getPlayerAccount(player), "aduty", false ) else outputChatBox("#"..name.." is Off Duty", getRootElement(), r,g,b, true) setElementData ( player, "duty", false ) setElementData ( player, "advadmin", false ) --setPlayerTeam ( player, players ) setAccountData(getPlayerAccount(player), "aduty", true ) end end end addCommandHandler("duty",aonduty)
  8. ERROR: [DayZ-MTA]/DayZ/pickups.lua:700: attempt to index global 'pickupPositions' (a nil value) SCRIPT ERROR: [DayZ-MTA]/DayZ/vehicle_spawns.lua:5: '=' expected near 'pickupSpawns' ERROR: Loading script failed: [DayZ-MTA]/DayZ/vehicle_spawns.lua:5: '=' expected near 'pickupSpawns' here is Vehicle_spawn.lua hunterSpawns = gameplayVariables["hunterspawns"] gameplayVariables["dodospawns"] pickupSpawns = gameplayVariables["pickupspawns"] gameplayVariables["freewayspawns"] gameplayVariables["quadspawns"] gameplayVariables["kartspawns"] patriotSpawns = gameplayVariables["patriotspawns"] nrgSpawns = gameplayVariables["nrgspawns"] infernusSpanws = gameplayVariables["infernusspawns"] sanchezSpanws = gameplayVariables["sanchezspawns"] barracksSpawns = gameplayVariables["barracksspawns"] coachSpawns = gameplayVariables["coachspawns"] fisherBootSpawns = gameplayVariables["fisherboatspawns"] bikeSpawns = gameplayVariables["bikespawns"] maverikSpawns = gameplayVariables["maverickspawns"] tentSpawns = gameplayVariables["tentsspawns"] heliCrashSites = gameplayVariables["helicrashsides"] hospitalPacks = { {-2670.87890625,636.8984375,14.453125}, {-2637.0556640625,635.03125,14.453125}, {-1515.669921875,2519.166015625,56.0703125}, {-1513.888671875,2519.5908203125,56.064819335938}, {-1528.8955078125,2516.724609375,55.986171722412}, {2022.1650390625,-1402.6806640625,17.18045425415}, {2042.7001953125,-1409.4775390625,17.1640625}, {-316.5478515625,1051.6494140625,20.340259552002}, {-337.9541015625,1049.490234375,19.739168167114}, {-331.5849609375,1046.037109375,26.012474060059}, {-307.0419921875,1045.27734375,26.012474060059}, {1171.490234375,-1310.560546875,13.986573219299}, {1171.609375,-1306.556640625,13.996350288391}, {1158.5048828125,-1326.333984375,31.503561019897}, {1159.80078125,-1323.9013671875,31.498970031738}, {1238.7119140625,328.2431640625,19.7555103302}, {1229.365234375,311.1435546875,24.7578125}, {-2204.07421875,-2309.58203125,31.375}, {1615.939453125,1818.0537109375,10.8203125}, {1601.9443359375,1816.736328125,10.8203125}, {1590.0166015625,1792.0234375,30.46875}, {1607.3232421875,1776.7412109375,37.3125}, {2107.7626953125,926.16015625,10.8203125}, {2116.12890625,925.7705078125,10.9609375}, {2122.1865234375,925.3193359375,10.8203125}, } patrolPoints = { {-1603.2197265625,-2712.736328125,48.9453125}, {2465.748046875,-2215.55859375,13.546875}, {2473.439453125,-2215.56640625,13.546875}, {2480.0732421875,-2216.140625,13.546875}, {2487.24609375,-2215.5966796875,13.546875}, {2494.1005859375,-2215.5859375,13.546875}, {-1686.6728515625,408.9970703125,7.3984375}, {-1682.34375,412.9384765625,7.3984375}, {-1680.0263671875,402.3642578125,7.3984375}, {-1675.84375,406.4677734375,7.3984375}, {-1670.5615234375,411.8359375,7.3984375}, {-1666.2392578125,416.2509765625,7.3984375}, {-1672.7939453125,422.81640625,7.3984375}, {-1677.20703125,418.46484375,7.3984375}, {-2410.7021484375,969.9091796875,45.4609375}, {-2410.744140625,975.220703125,45.4609375}, {-2410.837890625,980.5302734375,45.4609375}, {-1329.3046875,2668.5126953125,50.46875}, {-1328.7314453125,2673.90625,50.0625}, {-1327.0185546875,2679.3876953125,50.46875}, {-1327.3798828125,2684.62890625,50.0625}, {1940.7099609375,-1778.5244140625,13.390598297119}, {1940.6552734375,-1774.908203125,13.390598297119}, {1940.630859375,-1771.728515625,13.390598297119}, {1940.7080078125,-1767.3837890625,13.390598297119}, {-1477.921875,1868.138671875,32.639846801758}, {-1466.1552734375,1869.0048828125,32.6328125}, {-1464.5224609375,1861.3828125,32.639846801758}, {-1477.4599609375,1860.5205078125,32.6328125}, {-735.9208984375,2744.0087890625,47.2265625}, {-739.0439453125,2744.2421875,47.165451049805}, {377.6953125,2601.1083984375,16.484375}, {624.5263671875,1676.25390625,6.9921875}, {620.2958984375,1681.2431640625,6.9921875}, {616.248046875,1686.4169921875,7.1875}, {612.783203125,1691.1650390625,7.1875}, {609.2060546875,1696.201171875,7.1875}, {605.8505859375,1700.978515625,7.1875}, {602.27734375,1706.3603515625,7.1875}, {2141.037109375,2742.734375,10.960174560547}, {2142.3115234375,2752.6982421875,10.96019744873}, {2147.9521484375,2752.3203125,10.8203125}, {2152.60546875,2751.953125,10.8203125}, {2152.984375,2743.85546875,10.8203125}, {2147.75,2743.7392578125,10.8203125}, {-97.6298828125,-1175.0283203125,2.4990689754486}, {-90.74609375,-1177.853515625,2.2021217346191}, {-84.75390625,-1163.853515625,2.3359375}, {-91.5771484375,-1160.5732421875,2.4453125}, {-1606.525390625,-2717.2138671875,48.9453125}, {-1609.7109375,-2721.544921875,48.9453125}, {-1599.83203125,-2708.302734375,48.9453125}, {-2246.314453125,-2558.8212890625,32.0703125}, {-2241.3125,-2561.3662109375,32.0703125}, {-1132.2880859375,-135.0986328125,14.14396572113}, {-1153.529296875,-156.373046875,14.1484375}, {-1142.826171875,-145.67578125,14.14396572113}, {655.611328125,-557.9912109375,16.501491546631}, {655.6572265625,-572.1728515625,16.501491546631}, {1601.791015625,2203.90625,11.060997009277}, {1596.806640625,2203.4345703125,10.8203125}, {1590.197265625,2203.4853515625,10.8203125}, {1589.4775390625,2195.43359375,10.8203125}, {1596.125,2194.294921875,10.8203125}, {1601.6591796875,2194.3369140625,10.8203125}, {2206.8466796875,2470.47265625,10.8203125}, {2206.94140625,2474.75,10.8203125}, {2206.9267578125,2478.86328125,10.8203125}, {2198.06640625,2480.6953125,10.8203125}, {2197.541015625,2475.791015625,10.995170593262}, {2197.609375,2471.9169921875,10.995170593262}, {2120.8251953125,915.4833984375,10.8203125}, {2115.1181640625,915.44140625,10.8203125}, {2109.076171875,915.4228515625,10.8203125}, {2109.22265625,924.8779296875,10.9609375}, {2114.9404296875,924.8857421875,10.9609375}, {2119.5126953125,925.2861328125,10.9609375}, {2645.7197265625,1112.7802734375,10.8203125}, {2639.984375,1112.56640625,10.8203125}, {2634.828125,1112.3466796875,10.9609375}, {2634.1826171875,1101.9482421875,10.8203125}, {2636.7509765625,1101.6748046875,10.8203125}, {2643.5126953125,1101.81640625,10.8203125}, {2209.576171875,2469.8251953125,10.8203125}, {2208.8310546875,2475.09375,10.8203125}, {1005.078125,-901.7490234375,42.216625213623}, {993.025390625,-902.474609375,42.222496032715}, } lootItems = { ["helicrashsides"] = { {"Night Vision Goggles",368,1,90,10}, {"M136 Rocket Launcher",359,1,90,0}, {"Heat-Seeking RPG",360,1,90,0}, {"Box of Matches",328,0.4,90,2}, {"G13",346,1,90,10}, {"M9 SD",347,1,90,7}, {"Winchester 1866",349,1,90,6}, {"PPK",352,1,90,5.5}, {"Hunting Knife",335,1,90,4}, {"Firefighter Axe",339,1,90,3}, {"Pizza",1582,1,0,2}, {"Rotten Meat",2804,0.5,90,12}, {"Soda Bottle",2647,1,0,2}, {"Empty Gas Canister",1650,1,0,2}, {"Roadflare",324,1,90,2}, {"Milk",2856,1,0,1}, {"Painkiller",2709,0.5,0,4}, {"Empty Soda Cans",2673,0.5,0,2}, {"Scruffy Burgers",2675,0.5,0,3}, {"Grenade",342,1,0,4}, {"Parachute",342,1,0,80}, {"Sawn-Off Shotgun",350,1,90,5}, {"SPAZ-12 Combat Shotgun",351,1,90,4}, {"MP5A5",353,1,90,6}, {"Watch",2710,1,0,4}, {"Heat Pack",1576,1,0,3}, {"Wire Fence",933,0.25,0,1}, {"Lee Enfield",357,1,90,6}, {"Alice Pack",3026,1,0,4}, {"Night Vision Goggles",368,1,90,1.5}, {"Tire",1073,1,0,2}, {"Morphine",1579,1,0,4}, {"Camouflage Clothing",1577,1,0,4.5}, {"Civilian Clothing",1577,1,0,3}, --{"TEC-9",372,1,90,4}, {"AK-47",355,1,90,7}, {"GPS",2976,0.15,0,3}, {"Map",1277,0.8,90,7}, {"Toolbox",2969,0.5,0,1}, {"Engine",929,0.3,0,2}, {"Tent",1279,1,0,4.5}, {"Ghillie Suit",1577,1,0,0.5}, {"M4A1 CCO SD",356,1,90,1}, {"DMR",358,1,90,1.5}, {"Infrared Goggles",369,1,90,3}, {"Assault Pack (ACU)",3026,0.5,0,5}, {"Coyote Backpack",3026,1.3,0,2}, --{"Thermal GPS",2976,0.2,0,3}, --{"GPS Jammer",2976,0.2,0,4}, }, ["hospital"] = { {"Medic Kit",2891,0.7,0}, {"Heat Pack",1576,1,0}, {"Bandage",1578,0.5,0}, {"Antidot",1919,2.1,0}, {"Blood Bag",1580,1,0}, {"Morphine",1579,1,0}, {"Blood Bag",1580,1,0}, {"Medic Kit",2891,0.7,0}, {"Blood Bag",1580,1,0}, {"Painkiller",1580,1,0}, }, } vehicleAddonsInfo = { {422,4,1}, {470,4,1}, --NewCar {411,4,1}, -- infernus {522,4,1}, -- nrg {593,3,1}, -- Dodo {463,2,1}, -- FreeWay {471,4,1}, -- Quad {571,4,1}, -- Kart --NewCar {468,2,1}, {433,6,1}, {437,6,1}, {509,0,0}, {487,0,1}, {497,0,1}, {453,0,1}, } function getVehicleAddonInfos (id) for i,veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2],veh[3] end end end function createHeliCrashSite() if cargoCol then destroyElement(getElementData(cargoCol,"parent"))
  9. [arrowTable = {} addCommandHandler("aduty", function(player) local duty = getElementData(player, "duty") or 0 if duty == 0 then if not isElement(arrowTable[player]) then arrowTable[player] = createMarker(0, 0, 0, "arrow", 0.75, 255, 0, 0, 175) addEventHandler("onClientRender",createText) end attachElements(arrowTable[player], player, 0, 0, 2) else if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end end) addEventHandler("onPlayerQuit", root, function() if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end) local screenX, screenY = guiGetScreenSize () function leaderText(marker) local xm,ym,zm = getElementPosition(marker) local x,y = getScreenFromWorldPosition(xm,ym,zm+0.2) local camX,camY,camZ = getCameraMatrix() if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xm,ym,zm) <= 20) then dxDrawText ("Hello", x,y,x,y, tocolor (255,0, 0, 255) , ( screenX / 1440 ) * 2 , "default-bold" , "center" , "center" , false , true , false ) end end function greetingCommand ( playerSource, commandName ) triggerClientEvent ( playerSource, "onGreeting", playerSource, "Hello World!" ) end addCommandHandler ( "greet", greetingCommand ) how to get LUA highlight syntex ?
  10. Then it was my mistake
  11. Found where to correct it [DayZ-MTA]/Dayz/Tools/jq.server.lua I dont like that -ffs-sniper Dayz gamemode, better to find one chinesse and translate it, cause that -ffs-sniper gamemode you can't edit it (change weapon names, weather, car spawn utc), but chinesse gamemode you can edit how ever you want
  12. KelogsLV

    Dayz

    I found where to delete it. It can be found in surviorsystem_client.lua Thanks for helping
  13. KelogsLV

    Dayz

    I deleted it from meta.xml and dayz/images restarted all server, but still it pops up, HOW?
  14. Now it working, i copied your script, and now its working, tnx mate
  15. addEventHandler ( "onClientRender", root, function ( ) if ( getDistanceBetweenPoints3D ( 0, 0, 3, getElementPosition ( localPlayer ) ) ) < 50 then local coords = { getScreenFromWorldPosition ( 0, 0, 3 ) } if coords[1] and coords[2] then dxDrawText ( "Hello !", coords[1], coords[2], coords[1], coords[2], tocolor(255,255,255), 1, "default-bold" ) end end end ) like this?
  16. KelogsLV

    Dayz

    i just want to delete that photo and when i delete it the dayz gamemode stops
  17. Hello guys, when i put the script in my server resource, i can't start it. Here is my client.lua or maybee the problem is in Meta.xml local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 720 local x, y = (screenW/resW), (screenH/resH) function HudGtaV ( ) dxDrawImage(x*1145, y*110, x*100, y*50, "img/"..getPedWeapon(getLocalPlayer())..".png") showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) dxDrawBorderedText("".. showammo2 ,x*1150, y*75, x*1205, y*40,tocolor(255, 255, 255,255),1.0,"pricedown","right","top",false,false,false) dxDrawBorderedText("".. showammo1 ,x*1212, y*75, x*750, y*40,tocolor(190, 190, 190,255),1.0,"pricedown","left","top",false,false,false) local altura = 25 local imageL, imageA = 25,25 -------------------------------------------- end function toggleRadar() if isVisible then addEventHandler("onClientRender", root, HudGtaV) else removeEventHandler("onClientRender", root, HudGtaV) end isVisible = not isVisible end bindKey ("F11", "down", toggleRadar) local hudTable = { "ammo", "clock", "health", "weapon", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientRender", root, HudGtaV) addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end ) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end
  18. KelogsLV

    Dayz

    Hello all People who make dayz gamemodes or server can you please say me how to delete the photo "You are Dead" from dayz gamemode?
  19. Every dayz Gamemode,it is in the same place, i can't place all gamemode in the topic. Im Hopping, that someone who makes dayz gamemodes, can help me
  20. anyone can say where i can find it please?
  21. Hello all! I need help, i made by myself Onduty script for MTA:dayz, and i need some help whit it When i write /aduty it shows me the arrow, but how can i get the TEXT at that Arrow arrowTable = {} addCommandHandler("aduty", function(player) local duty = getElementData(player, "duty") or 0 if duty == 0 then if not isElement(arrowTable[player]) then arrowTable[player] = createMarker(0, 0, 0, "arrow", 0.75, 255, 0, 0, 175) end attachElements(arrowTable[player], player, 0, 0, 2) else if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end end) addEventHandler("onPlayerQuit", root, function() if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil end end)
×
×
  • Create New...