Jump to content

TheSmart

Members
  • Posts

    516
  • Joined

  • Last visited

Everything posted by TheSmart

  1. TheSmart

    animation

    didn't get that wiki
  2. TheSmart

    animation

    hey guys! how i can do it when one animation complete after 5 second then start different animation? can anybody give me example to do that?
  3. TheSmart

    attach

    how can you give me example?
  4. TheSmart

    Dx

    thanks you its working
  5. ofc mean "of course", yes it will work
  6. TheSmart

    Dx

    thnx its work but animation not working when i use it like that setPedAnimation (source, "BAR", "Barserve_glass") i got no error but still not working and when i use it like that setPedAnimation ( "BAR", "Barserve_glass") i got that error http://prntscr.com/7xzgca any solution?
  7. TheSmart

    Dx

    ahh now panel won't showing when i hit marker local maxDistance = 12 -- the distance showing 3dtext local ped = createPed (2,-836.33, 2734.16, 45.67) addEventHandler ( "onClientRender", root, function ( ) local pX, pY, pZ = getElementPosition ( localPlayer ) local pedX, pedY, pedZ = getElementPosition ( ped ) local distance = getDistanceBetweenPoints3D ( pX, pY, pZ, pedX, pedY, pedZ ) if ( distance <= 12 ) then local x, y = getScreenFromWorldPosition ( pedX, pedY, pedZ ) if ( x and y ) then dxDrawText("Barman", x, y+1, _, _, tocolor(248, 251, 3, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false) no error -- dxDrawText( "Barman", x, y+1.5, _, _, tocolor( 255, 0, 0, 255 ), 1, "center", "center" ) end end end ) function dx() dxDrawRectangle(405, 301, 408, 304, tocolor(17, 16, 16, 220), false) dxDrawText("Barman", 433, 291, 775, 392, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(404, 394, 810, 394, tocolor(255, 255, 255, 255), 2, false) dxDrawLine(404, 398, 812, 398, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Do you want to buy Beer?", 405, 421, 799, 452, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawText("Price : 1000", 406, 459, 677, 499, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawRectangle(407, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawRectangle(638, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawText("Buy", 404, 538, 558, 595, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Close", 638, 538, 789, 595, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) end function button() buybtn = guiCreateButton(404, 539, 154, 56, "", false) guiSetAlpha(buybtn, 0.00) closebtn = guiCreateButton(638, 540, 151, 55, "", false) guiSetAlpha(closebtn, 0.00) end addEventHandler("onClientResourceStart", resourceRoot, button) marker = createMarker( -836.33, 2734.87, 45.68, "cylinder", 2, 255, 255, 255, 150 ) function close(button,state) if (button == "left" and state == "up") then if (source == closebtn) then removeEventHandler("onClientRender", root, dx) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), close) function buy(button,state) if (button == "left" and state == "up") then if (source == buybtn) then takePlayerMoney ( 1000 ) setPedAnimation("BAR", "Barserve_glass") showCursor(true) end end end addEventHandler("onClientGUIClick", getRootElement(), buy) function showgui (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then addEventHandler("onClientRender", resourceRoot, dx) addEventHandler("onResourceStart", root, button) end end addEventHandler("onClientMarkerHit", marker, showgui) function showguil (leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then removeEventHandler("onClientRender", resourceRoot, dx) removeEventHandler("onClientResourceStart", resourceRoot, button) end end addEventHandler("onClientMarkerLeave", marker, showguil)
  8. TheSmart

    Dx

    ok i have 3 problems 1) when i restart script dx panel open automatic. 2) when i click on buy button it will set animation but it doesn't work. 3) when i went to marker again panel doesn't show just cursor show local maxDistance = 12 -- the distance showing 3dtext local ped = createPed (2,-836.33, 2734.16, 45.67) addEventHandler ( "onClientRender", root, function ( ) local pX, pY, pZ = getElementPosition ( localPlayer ) local pedX, pedY, pedZ = getElementPosition ( ped ) local distance = getDistanceBetweenPoints3D ( pX, pY, pZ, pedX, pedY, pedZ ) if ( distance <= 12 ) then local x, y = getScreenFromWorldPosition ( pedX, pedY, pedZ ) if ( x and y ) then dxDrawText("Barman", x, y+1, _, _, tocolor(248, 251, 3, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false) -- dxDrawText( "Barman", x, y+1.5, _, _, tocolor( 255, 0, 0, 255 ), 1, "center", "center" ) end end end ) function dx () dxDrawRectangle(405, 301, 408, 304, tocolor(17, 16, 16, 220), false) dxDrawText("Barman", 433, 291, 775, 392, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(404, 394, 810, 394, tocolor(255, 255, 255, 255), 2, false) dxDrawLine(404, 398, 812, 398, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Do you want to buy Beer?", 405, 421, 799, 452, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawText("Price : 1000", 406, 459, 677, 499, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawRectangle(407, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawRectangle(638, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawText("Buy", 404, 538, 558, 595, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Close", 638, 538, 789, 595, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dx) function button() buybtn = guiCreateButton(404, 539, 154, 56, "", false) guiSetAlpha(buybtn, 0.00) closebtn = guiCreateButton(638, 540, 151, 55, "", false) guiSetAlpha(closebtn, 0.00) end addEventHandler("onClientResourceStart", resourceRoot, button) marker = createMarker( -836.33, 2734.87, 45.68, "cylinder", 2, 255, 255, 255, 150 ) function close(button,state) if (button == "left" and state == "up") then if (source == closebtn) then removeEventHandler("onClientRender", root, dx) showCursor(false) end end end addEventHandler("onClientGUIClick", getRootElement(), close) function buy(button,state) if (button == "left" and state == "up") then if (source == buybtn) then takePlayerMoney ( 1000 ) setPedAnimation( source, "BAR", "Barserve_glass") showCursor(true) end end end addEventHandler("onClientGUIClick", getRootElement(), buy) function showgui (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then addEventHandler("onClientRender", resourceRoot, dx) addEventHandler("onResourceStart", root, button) showCursor(true) end end addEventHandler("onClientMarkerHit", marker, showgui) function showguil (leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then removeEventHandler("onClientRender", resourceRoot, dx) removeEventHandler("onClientResourceStart", resourceRoot, button) showCursor(false) end end addEventHandler("onClientMarkerLeave", marker, showguil) tell me where is problem?
  9. TheSmart

    Dx

    wait wait one thing left now how i can make it when player hit the marker dx and button will show? function showgui (hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then -----what now? showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, showgui)
  10. TheSmart

    Dx

    thank you now its working
  11. TheSmart

    Dx

    local maxDistance = 12 -- the distance showing 3dtext local ped = createPed (2,-836.33, 2734.16, 45.67) addEventHandler ( "onClientRender", root, function ( ) local pX, pY, pZ = getElementPosition ( localPlayer ) local pedX, pedY, pedZ = getElementPosition ( ped ) local distance = getDistanceBetweenPoints3D ( pX, pY, pZ, pedX, pedY, pedZ ) if ( distance <= 12 ) then local x, y = getScreenFromWorldPosition ( pedX, pedY, pedZ ) if ( x and y ) then dxDrawText("Barman", x, y+1, _, _, tocolor(248, 251, 3, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false) -- dxDrawText( "Barman", x, y+1.5, _, _, tocolor( 255, 0, 0, 255 ), 1, "center", "center" ) end end end ) function dx () dxDrawRectangle(405, 301, 408, 304, tocolor(17, 16, 16, 220), false) dxDrawText("Barman", 433, 291, 775, 392, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(404, 394, 810, 394, tocolor(255, 255, 255, 255), 2, false) dxDrawLine(404, 398, 812, 398, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Do you want to buy Beer?", 405, 421, 799, 452, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawText("Price : 1000", 406, 459, 677, 499, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawRectangle(407, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawRectangle(638, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawText("Buy", 404, 538, 558, 595, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Close", 638, 538, 789, 595, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dx) function button() acceptbtn = guiCreateButton(404, 539, 154, 56, "", false) guiSetAlpha(acceptbtn, 0.00) closebtn = guiCreateButton(638, 540, 151, 55, "", false) guiSetAlpha(closebtn, 0.00) end addEventHandler("onClientResourceStart", resourceRoot, button) marker = createMarker( -836.33, 2734.87, 45.68, "cylinder", 2, 255, 255, 255, 150 ) function close(button,state) if (button == "left" and state == "up") then if (source == closebtn) then removeEventHandler("onClientRender", root, dx) removeEventHandler("onClientResourceStart",resourceRoot, button) end end addEventHandler("onClientGUIClick", getRootElement(), close) end
  12. TheSmart

    Dx

    no error in debugscript 3 D:
  13. TheSmart

    Dx

    doesn't work function close(button,state) if (button == "left" and state == "up") then if (source == closebtn) then removeEventHandler("onClientRender", root, dx) removeEventHandler("onClientResourceStart", root, button) end end addEventHandler("onClientGUIClick", getRootElement(), close)
  14. TheSmart

    Dx

    well i complete it now idk how i did that when player click on close button dx and defualt gui button will remove function dx () dxDrawRectangle(405, 301, 408, 304, tocolor(17, 16, 16, 220), false) dxDrawText("Barman", 433, 291, 775, 392, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(404, 394, 810, 394, tocolor(255, 255, 255, 255), 2, false) dxDrawLine(404, 398, 812, 398, tocolor(255, 255, 255, 255), 1, false) dxDrawText("Do you want to buy Beer?", 405, 421, 799, 452, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawText("Price : 1000", 406, 459, 677, 499, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawRectangle(407, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawRectangle(638, 537, 151, 58, tocolor(16, 16, 16, 220), false) dxDrawText("Buy", 404, 538, 558, 595, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Close", 638, 538, 789, 595, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dx) function button() acceptbtn = guiCreateButton(404, 539, 154, 56, "", false) guiSetAlpha(accept, 0.00) closebtn = guiCreateButton(638, 540, 151, 55, "", false) guiSetAlpha(close, 0.00) end addEventHandler("onClientResourceStart", resourceRoot, button) marker = createMarker( -836.33, 2734.87, 45.68, "cylinder", 2, 255, 255, 255, 150 ) function close(button,state) if (button == "left" and state == "up") then if (source == closebtn) then ---what to do nexT?
  15. TheSmart

    attach

    everything work good but now i want to change it like meteor that video show you what i want give me example that how to make it?
  16. TheSmart

    attach

    nah didn't see it ye it working
  17. why you posting double topic and comments?
  18. TheSmart

    attach

    nope doesn't work anyone can do it?
×
×
  • Create New...