Jump to content

darhal

Members
  • Posts

    582
  • Joined

  • Last visited

Everything posted by darhal

  1. darhal

    The last reply

    I have secrets I was one day noob in scripting
  2. check the state addEventHandler ( 'onClientClick', root, function ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if state and ( clickedElement ) and ( getElementType ( clickedElement ) == 'ped' ) then for i=1, #deliverys do if ( clickedElement == deliverys[i] ) then local x, y, z = getElementPosition(localPlayer) if getDistanceBetweenPoints3D(x, y, z, worldX, worldY, worldZ)<=5 then if ( getElementData ( localPlayer, "Job" ) ~= 'Criminal' ) then outputChatBox(" You must be criminal.",255,0,0) return end setElementData(deliverys[i], "del", true) if getElementData(deliverys[i],"del") then if ( guiGetVisible ( Window ) == false ) then guiSetVisible ( Window,true ) end end end end end end end)
  3. my graphic car dont support MRT and ik that so this will not work for me ? as the function return false
  4. thank you now you made things clear but if my graphics card dont support MRT it will not work ? (Wwill not be drawn before DX ?) thx in advance
  5. to be honest I didnt understand one world of what are you saying I m bad at shaders help me by example please
  6. Well it s little bit complicated but I send u the script on ur E-mail check it out if u want
  7. Strange really lets wait for Ren Post maybe or unitil I find the problem by myself
  8. drawing just the ped working with any DX or any GUI yes work and when the resource started it said MRT is not supported that mean it will not work or what ?
  9. do your own sync by using triggerServerEvent and triggerClientEvent
  10. well the renders are in the correct order I use outputChatBox to check but same problem but must my graphic card support MRT shaders for this to work ?
  11. Well thanks for replying but nothing happen Here is my code that draw inventory : function drawInventory() dxDrawLine(35 - 1, 24 - 1, 35 - 1, 575, tocolor(0, 0, 0, 220), 1, false) dxDrawLine(779, 24 - 1, 35 - 1, 24 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(35 - 1, 575, 779, 575, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(779, 575, 779, 24 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(35, 24, 744, 551, tocolor(0, 0, 0, 236), false) dxDrawRectangle(35, 24, 744, 46, tocolor(32, 32, 32, 255), false) dxDrawRectangle(333, 202, 408, 324, tocolor(18, 18, 18, 143), false) dxDrawText("CUP - Inventory", 33 + 1, 24 + 1, 779 + 1, 70 + 1, tocolor(0, 0, 0, 255), 3.00, "default-bold", "center", "center", true, false, false, true, false) dxDrawText("CUP - Inventory", 33, 24, 779, 70, tocolor(255, 255, 255, 255), 3.00, "default-bold", "center", "center", true, false, false, true, false) dxDrawRectangle(47, 92, 260, 449, tocolor(18, 18, 18, 143), false) outLineRectangle(47, 92, 260, 449) dxDrawRectangle(50, 92, 257, 35, tocolor(25, 25, 25, 243), false) outLineRectangle(50, 92, 257, 35) dxDrawText("Player Preview", 49 + 1, 93 + 1, 307 + 1, 127 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, true, false) dxDrawText("Player Preview", 49, 93, 307, 127, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, true, false) dxDrawRectangle(322, 93, 457, 446, tocolor(56, 56, 56, 72), false) outLineRectangle(322, 93, 457, 446) dxDrawRectangle(321, 93, 453, 34, tocolor(34, 34, 34, 209), false) outLineRectangle(321, 93, 453, 34) dxDrawText("Items", 321, 93, 774, 127, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, true, false) dxDrawRectangle(323, 136, 451, 56, tocolor(32, 32, 32, 222), false) for i, v in pairs(groupCord) do dxDrawRectangle(v.x, v.y, v.w, v.h, v.color, false) outLineRectangle(v.x, v.y, v.w, v.h) dxDrawImage(v.x, v.y, v.w, v.h, v.path, 0, 0, 0, tocolor(255, 255, 255, 255), false) end dxDrawLine(747 - 1, 198 - 1, 747 - 1, 525, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(774, 198 - 1, 747 - 1, 198 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(747 - 1, 525, 774, 525, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(774, 525, 774, 198 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(747, 198, 27, 327, tocolor(4, 4, 4, 143), false) dxDrawRectangle(747, 337, 27, 188, tocolor(85, 151, 7, 242), false) for i, v in pairs(itemsCord) do dxDrawRectangle(v.x, v.y, v.h, v.w, v.color, false) outLineRectangle(v.x, v.y, v.h, v.w) end for i, v in pairs(fastCord) do dxDrawRectangle(v.x, v.y, v.h, v.w, v.color, false) outLineRectangle(v.x, v.y, v.h, v.w) end dxDrawLine(81 - 1, 474 - 1, 81 - 1, 504, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(275, 474 - 1, 81 - 1, 474 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(81 - 1, 504, 275, 504, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(275, 504, 275, 474 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(81, 474, 194, 30, openCraftColor, false) dxDrawText("Open Crafting Table", 81 - 1, 473 - 1, 275 - 1, 504 - 1, tocolor(0, 0, 0, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawText("Open Crafting Table", 81 + 1, 473 - 1, 275 + 1, 504 - 1, tocolor(0, 0, 0, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawText("Open Crafting Table", 81 - 1, 473 + 1, 275 - 1, 504 + 1, tocolor(0, 0, 0, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawText("Open Crafting Table", 81 + 1, 473 + 1, 275 + 1, 504 + 1, tocolor(0, 0, 0, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) dxDrawText("Open Crafting Table", 81, 473, 275, 504, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "center", false, false, false, true, false) --exports.object_preview:setProjection(myObject, 95, 136, 170, 307) if currentDragItem and not isCraftingOpen then dxDrawImage(cX-20, cY-20, 41, 41, currentDragItem.path, 0, 0, 0, tocolor(255, 255, 255, 200), false) end end function showInventory() if cantCloseInventory then return end if not inventoryShown then if groupItemsSave[lastRealGroup] then currentViewingItems = groupItemsSave[lastRealGroup] else currentViewingItems = {} end addEventHandler("onClientRender", root, drawInventory) addEventHandler("onClientRender", root, drawViewingItems) inventoryShown = true removeEventHandler("onClientRender", root, drawUseBar) showCursor(true) local x, y, z = getElementRotation(localPlayer) local rx, ry, rz = getElementRotation(localPlayer) ped = createPed(getElementModel(localPlayer),x ,y ,z, rx, ry, rz) myObject = exports.object_preview:createObjectPreview(ped,0,0,180, 95, 136, 170, 307, false, true, false) elseif inventoryShown then removeEventHandler("onClientRender", root, drawInventory) removeEventHandler("onClientRender", root, drawViewingItems) inventoryShown = false addEventHandler("onClientRender", root, drawUseBar) showCursor(false) destroyElement(ped) exports.object_preview:destroyObjectPreview(myObject) if isCraftingOpen then removeEventHandler("onClientRender", root, drawCrafting) isCraftingOpen = false cCraftProgress = nil cantCloseInventory = false end end end bindKey("i", "down", showInventory)
  12. dxDrawRectangle(35, 24, 744, 551, tocolor(0, 0, 0, 236), true) this is how I draw dx Rectangles this how it Look while drawing all this code : http://imgur.com/MF5K8hg
  13. Problem Sloved PS: Areion ur link didnt help I fix i by my own but thx anyway
  14. what is animation and block name plz ?
  15. Hello ; I made car shader script but shaders are not applying correctly here is my code that apply sahder : local mainShader = dxCreateShader ( "material/effect.fx",0,0, false, "vehicle") dxSetShaderValue( mainShader,"gTexture", texturePaths[path]) engineApplyShaderToWorldTexture(mainShader, "vehiclegrunge256", getPedOccupiedVehicle ( plr )) thx to all
  16. Hello All; I m using object_preview resources (by Ren) to draw ped preview but I need the effect to be drawn before the dx drawing but I cant figure it out Ren told me to do some changes on c_main it dont work so here is my code : c_main.lua from line 323 : -- onClientHUDRender addEventHandler( "onClientRender", root, function() isMRTUsed = false if not isMRTShaderSupported or (#refOPTable == 0) then return end for index, this in ipairs( refOPTable ) do -- Draw secondary render target if refOPTable[index] then if refOPTable[index].isSecondRT then isMRTUsed = true end if refOPTable[index].enabled then local instance = this.instance if instance then instance:drawRenderTarget() end end end end if (isMRTUsed == false) and glRenderTarget then destroyElement( glRenderTarget ) glRenderTarget = nil outputDebugString('objPrev : no MRT objects visible - destroyed RT') end end, true, "high+10") My resource thet draw the DX : addEventHandler("onClientRender", root, drawInventory) addEventHandler("onClientRender", root, drawViewingItems) inventoryShown = true removeEventHandler("onClientRender", root, drawUseBar) showCursor(true) local x, y, z = getElementRotation(localPlayer) local rx, ry, rz = getElementRotation(localPlayer) ped = createPed(getElementModel(localPlayer),x ,y ,z, rx, ry, rz) myObject = exports.object_preview:createObjectPreview(ped,0,0,180, 95, 136, 170, 307, false, true, false) Thanks in advance !
  17. I think if u name it stick man better tgen dx man or fake ped
  18. darhal

    question

    if u mean commands use this : function test(plr, cmd, ...) text = table.concat({..}, " ") outputChatBox("Some CHAT :" ..text) end addComandHandler("gc", test) -- FOR EXAMPLE /gc
  19. darhal

    question

    u mean using a commands ? for e.g: /gc text ?
  20. You want me to post my script it s different a lot and I made it in 2 hours :fp: but the idea is the same as nasser script also my script support GUI and Devo script didnt so plz get out and dont argute smthg that I made
  21. I made it I m scripter since 3 years and mine is kinda different from this -________-
  22. yea ... it look like my /skinshader script that I made recently :fp: :~
×
×
  • Create New...