Jump to content

KryPtoHolYx

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

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

KryPtoHolYx's Achievements

Member

Member (5/54)

0

Reputation

  1. Hello, i´m having some problems while drawing a image with a rendertarget. Everytime i draw onto the target, the drawn image leaves a "white" border, example : So is there a way to remove them ? how i draw the image : dxSetRenderTarget( map,true ) dxSetBlendMode("modulate_add") dxDrawRectangle (0,0, 155,155 ,tocolor(20,200,20,150)) local x,y = getElementPosition(localPlayer); local x,y = calcPos(x,y) _,_,rz= getElementRotation ( v) dxDrawImage(x,y, 50,50,"ship.png",-rz,0,0,tocolor(255,255,255,255)) dxSetBlendMode("blend") dxSetRenderTarget( ) Regards
  2. Thanks for all the good feedback i´ll host only one server, once it is finished Regards
  3. Hello there! I would like to tell you about my gamemode, i´m currently working on. Basicly its how the name already says a zombie gamemode. so far i have following features scripted, more will come so, that are the features i have currently scriptes, what you guys think ? if you want to test the gamemode, don´t mind to contact me over skype or so ( skype/steam:zero0two ) I´m sorry for my terrible english, hopefully can you understand a bit Regards
  4. Thanks for the Help, i got it. Now i draw the map on a renderTarget then draw every blip/radararea on it, and then start drawing the main thing. Regards
  5. @Bonsai: I mean it like this, its about getting the position from the blip on my radar. atm it looks like this Regards
  6. Didn´t helped me at all, i build mine with rotation, so it may be different idk. at all, thanks for posting this. Regards
  7. Hi, So i need Help by calculating the position from blips on a image ( the map ) So is started like this local radarTexture = dxCreateTexture("radar.jpg") local imgW,imgH = dxGetMaterialSize(radarTexture) local width, height = 1200,1200 local blipRenderTarget= dxCreateRenderTarget( s[1]*1200/1440, s[2]*1200/900,true ) addEventHandler ("onClientHUDRender",root, function () dxSetRenderTarget(BLIPS,true) dxDrawImage ( 0,0,1200,1200, blipTexture) for k,v in ipairs(getElementsByType ("blip")) do local x,y = getElementPosition(v) local b_x = x / (6000/imgW) + imgW/2 - width*0.73 local b_y = y / (-6000/imgH) + imgH/2 - height*0.74 local blip_icon = getBlipIcon ( v) blip_size = 40 dxDrawImage ( b_x-blip_size/2,b_y-blip_size/2,blip_size/2,blip_size/2, "blips/"..blip_icon..".png") end dxSetRenderTarget() dxDrawImage (500,0,imgW/4,imgH/4, blipRenderTarget) end) So, i need now a way to calculate where the "blip" is on the image. Hope you guys understood my question. Regards
  8. Works now,Thanks Its was Exactly what u said Thanks Regards
  9. Hi, Atm i´m Making a Script that gangs can draw their "Tag" on walls, but i doesn´t get any errors/Warnings what is wrong ? Server : local tags = {} function async_tags () triggerClientEvent("sync_tags_client",getRootElement(),tags) end function addTag(hx,hy,hz,hx,hy,hz,mx,my,mz ) table.insert(tags,{hx,hy,hz,hx,hy,hz,mx,my,mz }) async_tags () end addEvent("sync_tags_server",true) addEventHandler("sync_tags_server",getRootElement(),addTag) Client : visible_tags = {} tex = dxCreateTexture("dot.png") addEventHandler("onClientPreRender",getRootElement(),function () for tag,data in pairs(visible_tags) do local x1 = data[1] local y1 = data[2] local z1 = data[3] local x2 = data[4] local y2 = data[5] local z2 = data[6] local nx = data[7] local ny = data[8] local nz = data[9] dxDrawMaterialLine3D(x1,y1,z1,x2,y2,z2,tex,3,tocolor(255,255,255,128),nx,ny,nz) end end) function addSpray ( hx,hy,hz,hx,hy,hz,mx,my,mz ) triggerServerEvent("sync_tags_server",getRootElement(),hx,hy,hz,hx,hy,hz,mx,my,mz) end function sync_tags ( tagtbl ) visible_tags = tagtbl end addEvent("sync_tags_client",true) addEventHandler("sync_tags_client",getRootElement(),sync_tags) step = 0 addEventHandler("onClientPlayerWeaponFire",root, function (weapon,ammo,inclip,hx,hy,hz,hitel) step = step + 5 if weapon ~= 41 then return end if (step >= 100) then step = 0 local mx,my,mz = getPedBonePosition(source,23) local wall,x0,y0,z0,hit,zx,zy,zz = processLineOfSight(mx,my,mz,hx,hy,hz) if hit then return end if wall then return end addSpray(hx,hy,hz+1.5,hx,hy,hz-1.5,mx,my,mz) table.insert(visible_tags,{hx,hy,hz,hx,hy,hz,mx,my,mz }) end end) Hope you can help me, Regards
×
×
  • Create New...