Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. The fact that he is suggesting something doesn't mean that he has to create it. https://bugs.multitheftauto.com/view.php?id=4571 It was suggested long time. If the MTA Developers want to make it they will do it, no need for such topics which is my opinion is 'spam'
  2. xeon17

    Dx

    setPedAnimation ( localPlayer,"BAR", "Barserve_glass")
  3. xeon17

    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) 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 (hitElement == localPlayer) then addEventHandler("onClientRender",root, dx) end end addEventHandler("onClientMarkerHit", marker, showgui) function showguil (leaveElement) if (leaveElement == localPlayer) then removeEventHandler("onClientRender", root, dx) end end addEventHandler("onClientMarkerLeave", marker, showguil)
  4. @FranklinRoosevelt Why don't you create it and upload it on bug tracker if you think it's so easy?
  5. xeon17

    Dx

    1. Remove line 32 2. The source of this event is button which got clicked, so simply remove source and it should work. 3. Line's 79 and 70 doesn't make sense,remove them.
  6. xeon17

    Dx

    addEventHandler("onClientRender", root,
  7. xeon17

    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) end end end addEventHandler("onClientGUIClick", getRootElement(), close)
  8. xeon17

    Dx

    Show how the code currently looks.
  9. xeon17

    Dx

    Yes it doesn't work, check /debugscript 3 how to fix it.
  10. xeon17

    Dx

    removeEventHandler("onClientRender", root, dx)
  11. O Tremidinha postou o mesmo codigo, pra que postar dois vezez a mesma coisa amigo? voce sabia que double-post e proibido aqui? obs: seu avatar e muietito bueno
  12. It doesn't work because you haven't definied the player argument. Use the code which RooTs gave you, it should work.
  13. ta ai amigo -- Client addEventHandler('onClientPlayerDamage', localPlayer, function (attacter,weapon,bodypart) if (attacter and weapon == 34 and bodypart == 9) then triggerServerEvent('killPlayer',source) end end) -- Server addEvent('killPlayer', true) addEventHandler ('killPlayer', root, function () killPed(client) end)
  14. Isso nao e erro amigo, e apenas o nome e o codigo fuciona bem com attacter e attacker
  15. o que ta errado filho? Head deveria ser o id. if (attacter and weapon == 69 and bodypart == Head) then Na verdade precisa ser 9 e voce ta precisando aulas do roots amigo.
  16. -- Client addEventHandler('onClientPlayerDamage', localPlayer, function (attacter,weapon,bodypart) if (attacter and weapon == 34 and bodypart == 9) then triggerServerEvent('killPlayer',source) end end) -- Server addEvent('killPlayer', true) addEventHandler ('killPlayer', root, function () killPed(client) end)
  17. Orginal: https://community.multitheftauto.com/in ... ils&id=727 https://community.multitheftauto.com/ind ... ils&id=220 https://community.multitheftauto.com/ind ... ls&id=3716 Fake: https://community.multitheftauto.com/ind ... s&id=11824 https://community.multitheftauto.com/ind ... s&id=11822 https://community.multitheftauto.com/ind ... s&id=11820 DONE
  18. xeon17

    attach

    Have you tried the code of Lawliet ?
  19. xeon17

    attach

    Fire isn't an element.
  20. xeon17

    attach

    Make sure that the script is client side in meta.
  21. xeon17

    Anti teamkill

    Of course it won't work because the event onVehicleDamage have only one argument which is loss. Stop trying to help peoples when you don't even know the basic things.
  22. xeon17

    Anti teamkill

    The event onVehicleDamage can't be canceled.
  23. xeon17

    RestartResource

    function lol() restartResource(getResourceFromName('run')) end addEventHandler("onMarkerHit",marker3,lol) And don't forget, the function restartResource need ACL rights to work.
×
×
  • Create New...