greentumbleweed

Members
  • Content Count

    62
  • Joined

  • Last visited

Community Reputation

0 Neutral

About greentumbleweed

  • Rank
    Snitch

Details

  • Gang
    none

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. local weap = {shot=false,timer=false} addEventHandler("onClientPlayerWeaponFire", localPlayer, function() local rot = getPedCameraRotation(localPlayer) if (isTimer(weap.timer)) then killTimer(weap.timer); end if (not weap.shot) then setPedCameraRotation(localPlayer, -(rot-0.9)) weap.shot = true weap.timer = setTimer(setPedCameraRotation, 100, 1, localPlayer, -(rot+0.09)) else setPedCameraRotation(localPlayer, -(rot+0.9)) weap.shot = false weap.timer = setTimer(setPedCameraRotation, 100, 1, localPlayer, -(rot-0.09)) end end) how can i make the snap of rotation a bit smoother less fast yet still function properly? also is there a way to make vertical recoil with setPedCameraRotation?
  2. i dont understand when i export the repositioned original ped and import it back it loses its Envelop weights and everything is jacked
  3. the sun is making my custom objects dark when i can see it
  4. well that function is fine it would have to be my showInventory function but idk ive been trying this for a week now and i cant get it to work correctly do you have any idea about the first* error? function getMySlots() getPlayerCurrentSlots() getPlayerMaxAviableSlots() end function refreshNewInventory() if not getElementData ( localPlayer, "dayz:new_inv") then return end myInventory = exports.dayz:getMyInventory() lootInventory = exports.dayz:getLootInventory() mySlots = exports.dayz:getMySlots() lootSlots = exports.dayz:getLootSlots() if myInvOffset+itemQuant > #myInventory then if #myInventory > itemQuant then myInvOffset = #myInventory-itemQuant else myInvOffset = 0 end end if lootInventory then if lootInvOffset+itemQuant > #lootInventory then if #lootInventory > itemQuant then lootInvOffset = #lootInventory-itemQuant else lootInvOffset = 0 end end end local sack = exports.dayz:getPlayerSackName() or "Pocket" sackText = sack.." ("..mySlots[1].."/"..mySlots[2]..")" lootName = (getElementData(getLocalPlayer(),"lootname") or "Loot").." ("..lootSlots[1].."/"..lootSlots[2]..")" selectedFood = nil selectedMedicine = nil selectedSpec = nil selectedItemInMyInventory = nil selectedItemInLootInventory = nil selectingMainWeapon = false refreshFoodBoxes() refreshMedicineBoxes() refreshToolsBoxes() refreshPrimaryWeapons() refreshSecondaryWeapons() selectedVest = getElementData (localPlayer,"clothBody") if selectedVest == 0 then selectedVest = false end selectedHelmet = getElementData (localPlayer,"clothHead") if selectedHelmet == 0 then selectedHelmet = false end if sack then selectedSack = sack else selectedSack = nil end end
  5. <export function="setMiddleVisible" type="client" /> <export function="getRadioButtonsCoords" type="client" /> <export function="showNewInventory" type="client" /> <export function="hideNewInventory" type="client" /> <export function="refreshNewInventory" type="client" />
  6. this gave me the exact same error exports.new_inv: works fine in other gm somewhere there is a string not being found and im not very good with exporting functions and strings tbh
  7. line 30: attemt to index upvalue 'myslots' (a nil value) line 15: failed to call 'new_inv:showNewInventory' [string"?"] these are my errors, im trying to merge this dx inventory to my own heres the rest of the code, if anyone could help i would be so thankful because im lost 1st error.......... function getMySlots() getPlayerCurrentSlots() getPlayerMaxAviableSlots() end function refreshNewInventory() if not getElementData ( localPlayer, "dayz:new_inv") then return end myInventory = exports.dayz:getMyInventory() lootInventory = exports.dayz:getLootInventory() mySlots = exports.dayz:getMySlots() lootSlots = exports.dayz:getLootSlots() if myInvOffset+itemQuant > #myInventory then if #myInventory > itemQuant then myInvOffset = #myInventory-itemQuant else myInvOffset = 0 end end if lootInventory then if lootInvOffset+itemQuant > #lootInventory then if #lootInventory > itemQuant then lootInvOffset = #lootInventory-itemQuant else lootInvOffset = 0 end end end local sack = exports.dayz:getPlayerSackName() or "Pocket" sackText = sack.." ("..mySlots[1].."/"..mySlots[2]..")" lootName = (getElementData(getLocalPlayer(),"lootname") or "Loot").." ("..lootSlots[1].."/"..lootSlots[2]..")" selectedFood = nil selectedMedicine = nil selectedSpec = nil selectedItemInMyInventory = nil selectedItemInLootInventory = nil selectingMainWeapon = false refreshFoodBoxes() refreshMedicineBoxes() refreshToolsBoxes() refreshPrimaryWeapons() refreshSecondaryWeapons() selectedVest = getElementData (localPlayer,"clothBody") if selectedVest == 0 then selectedVest = false end selectedHelmet = getElementData (localPlayer,"clothHead") if selectedHelmet == 0 then selectedHelmet = false end if sack then selectedSack = sack else selectedSack = nil end end 2nd error....... function showInventory(key,keyState) hideRightClickInventoryMenu() -- guiSetVisible(InfoWindow,false) local col = getElementData(getLocalPlayer(),"currentCol") local gearName = getElementData(getLocalPlayer(),"lootname") refreshLoot(col,gearName) if getElementData(getLocalPlayer(),"logedin") and keyState == "down" then local x, top, bottom = exports.new_inv:getRadioButtonsCoords() if getElementData ( localPlayer, "dayz:new_inv") then guiRadioButtonSetSelected ( inventoryOnButton, true ) guiSetVisible(topChangeButtonsParent,not guiGetVisible(topChangeButtonsParent)) guiSetPosition(topChangeButtonsParent,x,top,false) guiSetPosition(bottomChangeButtonsParent,x,bottom,false) guiSetVisible(bottomChangeButtonsParent,not guiGetVisible(bottomChangeButtonsParent)) local show = exports.new_inv:showNewInventory() if show then onClientOpenInventoryStopMenu () end showCursor(show) return else guiRadioButtonSetSelected ( inventoryOffButton, true ) guiSetVisible(topChangeButtonsParent,false) end if guiGetVisible(inventoryWindows) then guiSetVisible(inventoryWindows,false) guiSetVisible(CraftWindow,false) showCursor(false) guiSetVisible(bottomChangeButtonsParent,false) else guiSetVisible(inventoryWindows,true) showCursor(true) guiSetPosition(bottomChangeButtonsParent,0.14*sW+0.72*sW,0.18*sH+0.63*sH-30,false) guiSetVisible(bottomChangeButtonsParent,true) end guiSetVisible(HideGear,false) if isPlayerInLoot() then if getElementData(col,"tent") then guiSetVisible(HideGear,true) if getElementData(col,"visible") then guiCheckBoxSetSelected(HideGear,false) else guiCheckBoxSetSelected(HideGear,true) end end end refreshInventory() --RefreshComboBoxes() if guiGetVisible(inventoryWindows)== true then onClientOpenInventoryStopMenu() end end end bindKey("j","down",showInventory) function showNewInventory() if inventoryShowing then hideNewInventory() return false end inventoryShowing = true showCursor(true) selectedItemInMyInventory = nil selectedItemInLootInventory = nil movingItem = nil myScrollHeight = scrollMaxHeight lootScrollHeight = scrollMaxHeight lastCursorPosition = getCursorPosition() refreshNewInventory() doubleClickTimer = 0 addEventHandler ("onClientHUDRender", getRootElement(), drawInventory) bindKey ( "mouse_wheel_up", "down", playerScrollInventory, "up" ) bindKey ( "mouse_wheel_down", "down", playerScrollInventory, "down" ) bindKey ( "mouse1", "up", resetTotalTempOffset ) bindKey ( "mouse1", "down", itemSelectedInInventory ) checkMiddleDrawing() return true end
  8. my black and white screen shader is overlapping my Dx inventory is there a way to fix this?
  9. This is client side. and no errors at all in debug. I've seen this work in the PUBG inventory but i can not get it to work with my DayZ inventory
  10. so.. i have this figured out but still.. the animations are not synced ive tried a few things and i feel like im close but no cigar --Test "Client" addEvent ("onClientCustomAnimationSyncRequest2",true) addEventHandler("onClientCustomAnimationSyncRequest2", resourceRoot, aSTart) function aSTart(playerAnimations) for player, anims in pairs ( playerAnimations ) do if isElement ( player ) then if anims.replacedPedBlock then ReplacePedBlockAnimations ( player, anims.replacedPedBlock ) end end end startingAnimations() end addEventHandler("onClientResourceStart",resourceRoot, aSTart) function startingAnimations() ReplacePedBlockAnimations ( localPlayer, 7 ) end --TEST "Server" addEvent ("onCustomAnimationSyncRequest", true ) addEventHandler ("onCustomAnimationSyncRequest", root, function ( player ) table.insert ( synchronizationPlayers, player ) triggerLatentClientEvent ( player, "onClientCustomAnimationSyncRequest", 50000, false, player, playerAnimations ) triggerLatentClientEvent ( player, "onClientCustomAnimationSyncRequest2", 50000, false, player, playerAnimations ) end ) im getting this error ERROR:IFPM/client.lua:223:bad argument #1 to 'pairs'(table expected, got userdata) P.S: i learned to code from reading others code so i get lost a lot sadly. Also i stopped messing with mta for about a year so im rusty! sorry for mile long thread