Jump to content

Jayceon

Members
  • Content Count

    86
  • Joined

  • Last visited

Community Reputation

23 Decent

About Jayceon

  • Rank
    Transformer
  • Birthday 14/04/2000

Recent Profile Visitors

2,884 profile views
  1. The CPU usage was normal (average 0.62% in IPB when flying around the map) on my Intel Celeron E3200 (2.40 GHz) This PC only have a integrated video card with 128 MB dedicated video memory, so the only problem is the lower fps because a lot of objects drawed. (Tested on a green venturas map with the forest generator publiced by Essle ~ Total 2124 tree objects created) But yeah, this is a great work
  2. fileDelete download the file and then delete (and not secure bc the file visible for 3-5 seconds while the server is still downloading), cache false not download the file but load it into the memory.
  3. My res.: https://community.mtasa.com/index.php?p=resources&s=details&id=12624 Reuploaded: https://community.mtasa.com/?p=resources&s=details&id=15990 DONE
  4. Try this: texture cj_ped_torso; texture cj_ped_head; texture cj_ped_legs; texture cj_ped_feet; technique TexReplace { pass P0 { DepthBias = -0.0002; Texture[0] = cj_ped_torso; } pass P1 { DepthBias = -0.0002; Texture[0] = cj_ped_head; } pass P2 { DepthBias = -0.0002; Texture[0] = cj_ped_legs; } pass P3 { DepthBias = -0.0002; Texture[0] = cj_ped_feet; } }
  5. function getRandomSpawnPoint(cityName) if spawnPositions[cityName] then local realTime = getRealTime() math.randomseed(realTime.second + realTime.minute + realTime.hour) local minX = math.min(spawnPositions[cityName].minPos[1], spawnPositions[cityName].maxPos[1]) local minY = math.min(spawnPositions[cityName].minPos[2], spawnPositions[cityName].maxPos[2]) local maxX = math.max(spawnPositions[cityName].minPos[1], spawnPositions[cityName].maxPos[1]) local maxY = math.max(spawnPositions[cityName].minPos[2], spawnPositions[cityName].maxPos[2]) return math.random(minX, maxX), mat
  6. You need a color shader, or a renderTarget -> draw the texture image then draw one rectangle with the selected color -> create texture from the renderTarget pixels then destroy renderTarget. What did I say before? function changeTextureColor(textureElement, red, green, blue, alpha) local textureWidth, textureHeight = dxGetMaterialSize(textureElement) -- get the texture size local tempRenderTarget = dxCreateRenderTarget(textureWidth, textureHeight) -- create render target with texture size dxSetRenderTarget(tempRenderTarget) -- start rt dxDrawImage(0, 0, textureWidth
  7. local screenX, screenY = guiGetScreenSize() local repBarTexture = dxCreateTexture("reputation.png") local barWidth, barHeight = dxGetMaterialSize(repBarTexture) local maxRep = 200 local currentRep = 100 local repBarPosX = currentRep * (barWidth - 1) / maxRep local repBarPixels = dxGetTexturePixels(repBarTexture) local r, g, b = dxGetPixelColor(repBarPixels, math.floor(repBarPosX), barHeight / 2) outputChatBox("HEX: " .. string.format("#%.2X%.2X%.2X", r, g, b) .. ", R: " .. r .. ", G: " .. g .. ", B: " .. b) local barX = (screenX - barWidth) / 2 local barY = (screenY - barHeight) / 2 addE
  8. Like in Vice City camera/ped rotation? When you move your cursor the ped rotate by the camera.
  9. Real function but only FROM VERSION 1.5.5 r13977 ONWARDS
  10. I solved this problem with a 8x8 circle image. Added image to the every node position in RT and looks better. What I mean? dxSetRenderTarget(gpsRouteImage) dxSetBlendMode("modulate_add") for i = 2, #gpsLines do if gpsLines[i - 1] then local x0 = gpsLines[i][1] - routeStartPosX + 8 local y0 = gpsLines[i][2] - routeStartPosY + 8 local x1 = gpsLines[i - 1][1] - routeStartPosX + 8 local y1 = gpsLines[i - 1][2] - routeStartPosY + 8 dxDrawImage(x0 - 4, y0 - 4, 8, 8, "dot.png") dxDrawLine(x0, y0, x1, y1, tocolor(255, 255, 255), 9) end end dxSetBlendMode("blend") dxSet
  11. Your code in client side?
  12. I think MTA Team didn't added to the stable build. Download and update your MTA client with https://nightly.mtasa.com/ I tested yesterday and works very well.
  13. I'm using the download_priority_group in the meta.xml and it works fine. Higher priority resources load earlier than lower priorities, so: Admin-system: <download_priority_group>2</download_priority_group> Accounts-system: <download_priority_group>1</download_priority_group>
  14. Or simply: local ourText = [[This is line 1 This is line 2 This is line 3 This is line 4 This is line 5 ]] local textLines = split(ourText, "\n") print(table.concat(textLines, "\n"))
×
×
  • Create New...