Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 23/06/23 in all areas

  1. thank you, i'll open more topics when i run into some problems
    1 point
  2. loadstring(exports.dgs:dgsImportFunction())() local IsOn = false local sW, sH = dgsGetScreenSize() function doPhone() if(IsOn) then return end rrn = dgsCreateRoundRect(30,false, tocolor(0,0,0,255)) phone = dgsCreateImage( sW * 0.7, sH * 0.5, sW * 0.20, sH * 0.50, rrn, false) app_texture1 = dxCreateTexture("ohnoe.jpg") app1 = dgsCreateRoundRect(30,false, tocolor(255,255,255,255)) app = dgsCreateImage( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, app1, false) app_button = dgsCreateButton( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, "", false, _, tocolor(0,0,0,0) ) dgsRoundRectSetTexture(app1, app_texture1) dgsSetLayer (app_button,"top") dgsSetAlpha(app_button, 0) addEventHandler("onDgsMouseClickDown", app_button, app1Func) IsOn = true -- animations end function removePhone() if(not IsOn) then return end removeEventHandler("onDgsMouseClickDown", app_button, app1Func) destroyElement(rrn) destroyElement(phone) destroyElement(app_texture1) destroyElement(app1) destroyElement(app) destroyElement(app_button) IsOn = false end function togglePhone() if(IsOn) then removePhone() else doPhone() end end bindKey("n", "down", togglePhone) function app1Func() outputChatBox("hey") end I didn't test it but can you try this
    1 point
  3. for some reason collision is not detected because the marker is small set the size of the marker to 1.5 to fix this issue or if you want to keep the marker small, create a colshape and reference the collision to the colshape local e1 = createMarker(2105.47534, -1806.58765, 12.55469, "cylinder", 1.5, 255, 255, 255, 50) local e = createMarker(362.98032, -75.25889, 1000.50781, "cylinder", 1.5, 255, 255, 255, 50) setElementInterior(e, 10) -- INSIDE addEventHandler("onMarkerHit", e1, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 10) setElementPosition(hitElement, 365.33194, -73.90823, 1001.50781) end end ) -- OUTSIDE addEventHandler("onMarkerHit", e, function(hitElement, matchingDimension) if(getElementType(hitElement) == "player") then setElementInterior(hitElement, 0) setElementPosition(hitElement, 2100.90894, -1806.63440, 13.55469) end end )
    1 point
  4. The creation components in DGS are not to be used by the "onClientRender" event. If you want to remove the components you must use the destroyElement function
    1 point
  5. Moving this to the scripting section.
    1 point
×
×
  • Create New...