Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Recent Profile Visitors

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

Jacobob14's Achievements

Peon

Peon (20/54)

0

Reputation

  1. I don't know why give me this error the console http://prntscr.com/8zjw7m help me plis function chase_move (ped, oldTx, oldTy, oldTz, oldPx, oldPy, oldPz) if not ped then return end if (isElement(ped)) then if (getElementData ( ped, "status" ) == "chasing" ) and (getElementData (ped, "slothbot") == true) then setTimer ( function() setPedWeaponSlot (ped, weap) end, 850, 1) -- this is the line of the error end end end
  2. solucionado borren el post plis
  3. Jacobob14

    Help Table

    I do not understand what the problem when i insert data in Table all is well but when I try recover of the table data not work for i,top in ipairs(topslist) do outputChatBox(topslist[top].Score) end addEventHandler("onElementDataChange",root, function (data) if ( data == "money" ) and getElementType(source) == "player" then local money = getElementData(source,"money") topslist[source] = {Score = money, Name = getPlayerName(source)} end end )
  4. Jacobob14

    Help XML

    sorry again how could save the data in a table ? I would like to be saved like this format Teams = { ["citizen"] = { red = 0 , green = 100, blue = 40 } } i try something like this but it does not work red = xmlNodeGetAttribute ( teamName, "red" ) teamname = xmlNodeGetAttribute ( node, "name" ) table.insert(Teams, { [ teamname ] = { "red" = red}} )
  5. Jacobob14

    Help XML

    thank you very much for your great help
  6. Jacobob14

    Help XML

    I don't understand how I would use it? something like that function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do for class, color in pairs ( xmlFindChild(node, 'color', 0) ) do outputChatBox(xmlNodeGetAttribute ( node, "name" )) end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start)
  7. Jacobob14

    Help XML

    as I can do to get the other XML data color and skin id xml "Team1" > "0" green="75" blue="150" /> "287" /> "Team2" > "0" green="0" blue="250" /> "15" /> my script function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do outputChatBox(xmlNodeGetAttribute ( node, "name" )) end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start)
  8. as could be done to put alpha only the mask and the texture has another alpha?
  9. as it could change the alpha of a shader so that does not leave very dark image ? /* Author: 50p Version: v1.0 Description: This shader allows you to mask a texture with a mask texture (black and white). */ texture ScreenTexture; sampler implicitInputTexture = sampler_state { Texture = ; }; texture MaskTexture; sampler implicitMaskTexture = sampler_state { Texture = ; }; float4 MaskTextureMain( float2 uv : TEXCOORD0 ) : COLOR0 { float4 sampledTexture = tex2D( implicitInputTexture, uv ); float4 maskSampled = tex2D( implicitMaskTexture, uv ); sampledTexture.a = (maskSampled.r + maskSampled.g + maskSampled.b) / 3.0f; return sampledTexture; } technique Technique1 { pass Pass1 { AlphaBlendEnable = true; SrcBlend = SrcAlpha; DestBlend = InvSrcAlpha; PixelShader = compile ps_2_0 MaskTextureMain(); } }
  10. Como puedo crear un dxProgress pero de varios rectangles algo como esto something like this
  11. but what I want is making a dxprogress but whit several rectangles something like this
  12. how I can make the image is not repeated at the end of map????? local rot = getPedCameraRotation(localPlayer) local px,py = getElementPosition(localPlayer) local tx,ty = (3000+px)/6000*mx, (3000-py)/6000*my local wx, hy, wx1, sy1 = tx-(alt/2),ty-(alt/2),alt,alt dxDrawImageSection(0, 0, 600, 600, wx, hy, wx1, sy1, "radar.png",-rot,0,0,tocolor(255,255,255,al))
  13. please you give me one example?
  14. how I can make a progress bar with some dxrectangles? something like this
  15. i try to make the radarareas in GTAV radar but does not work appear in different positions any help please? local mx,my = 3000,3000 local renderareas = dxCreateRenderTarget( 600, 600,true ) local renderradar = dxCreateRenderTarget( 342, 264,true ) local altura = 1500 function doDrawAreas() local vehicle = getPedOccupiedVehicle (localPlayer) if isPedInVehicle(localPlayer) then local vx,vy,vz = getElementVelocity(vehicle) velocidade = ( 1 + (vx^2 + vy^2 + vz^2)^(0.5) ) / 3.5 end local altd = altura * math.min(velocidade,2) - 80 dxSetRenderTarget( renderareas,true ) if getElementInterior(localPlayer) == 0 then for i, v in ipairs( getElementsByType('radararea') ) do local tick=abs(getTickCount()%1000-500) local aFactor=tick/500 local r,g,b,a = getRadarAreaColor(v) local w,h = getRadarAreaSize(v) local ax,ay = getElementPosition(v) local x,y = (3000+(ax))/6000*mx, (3000-(ay))/6000*my if isRadarAreaFlashing(v) then a=a*aFactor end dxDrawRectangle(x, (y-h) + 4 + (h/2), (w/2), (h/2), tocolor(r,g,b,a)) end end dxSetRenderTarget() local rot = getPedCameraRotation(localPlayer) local px,py = getElementPosition(localPlayer) local tx,ty = (3000+px)/6000*mx, (3000-py)/6000*my dxDrawImageSection(0,0, 600, 600, tx-(altd/2),ty-(altd/2),altd,altd, renderareas,-rot,0,0,tocolor(255,255,255,255)) end
×
×
  • Create New...