Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

Serius's Achievements


Newbie (4/54)



  1. While the camera of the vehicle changes, the position of the exhaust also changes, but I want it to be upright, can you help? my problem: This is exactly how I want it to be; codes: local shader = dxCreateShader("shaders/shader.fx") local texture = dxCreateTexture("fire.dds") dxSetShaderValue(shader,"gTexture0",texture) local rotx,roty,roz = 0.8,1,0.2 local state = false function draw() if state == false then return end vehicle = localPlayer.vehicle if vehicle then ox, oy, oz = getVehicleComponentPosition(vehicle,"exhaust") x,y,z = getPositionFromElementOffset(vehicle,ox,oy-0.5,oz) end size = 1 startx = x+size starty = y+size-0.5 startz = z endx = x-size endy = y-size endz = z dxDrawMaterialLine3D(startx,starty,startz,endx,endy,endz,shader,size*2,tocolor(255,255,255,255),x-rotx,y-roty,z-roz) end addEventHandler("onClientPreRender",root,draw) function visible(bool) state = bool end function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z end @srslyyyy @srslyyyy
  2. How can I get the camera position of the player I want I tried getCameraMartix but it just takes my camera
  3. Serius

    Help Shader

    Hello, I am trying to make a vehicle reflection but I do not know what to do. I want it to be a realistic reflection.
  4. Hi everyone, I do scripts, but the script I make eats too many processors. Can you explain how to write an optimized script? ı'm using 'onClientRender'. Have a nice day
  • Create New...