-
Posts
207 -
Joined
-
Last visited
Everything posted by DarkByte
-
corona = createMarker (0, 0, -10, "corona", 1.0, 0, 100, 0, 150) Corona script but i wanna to be image.
-
Image i added it by photoshop. Corona is is in the script. I wanna make image not corona!
-
and i want to change it from corona to image.
-
Not working. function renderTankLine() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh and getElementModel(theVeh) == 432 then local x,y,z = getVehicleComponentPosition( theVeh, "misc_c" ) local x1,y1,z1 = getVehicleComponentPosition( theVeh, "misc_a" ) if x and x1 then local endX,endY,endZ = extendLine(x,y,z,x1,y1,z1,300) dxDrawLine3D (x,y,z,endX,endY,endZ,tocolor(255,0,0,255),10) end end end addEventHandler("onClientRender",root,renderTankLine) function extendLine ( x,y,z,x2,y2,z2,length ) local vx = x2 - x local vy = y2 - y local vz = z2 - z local ratio = length/(getDistanceBetweenPoints3D ( x,y,z,x2,y2,z2 )) vx = vx*ratio vy = vy*ratio vz = vz*ratio return (x + vx),(y + vy),(z + vz) end
-
Hi i have a question. How i can change from a corona to a image? Like http://imgur.com/a/1jm8H . From corona to image i edited dat. Code corona = createMarker (0, 0, -10, "corona", 1.0, 0, 100, 0, 150)
-
And how to make it thicker? function renderTankLine() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh and getElementModel(theVeh) == 432 then local x,y,z = getVehicleComponentPosition( theVeh, "misc_c" ) local x1,y1,z1 = getVehicleComponentPosition( theVeh, "misc_a" ) if x and x1 then local endX,endY,endZ = extendLine(x,y,z,x1,y1,z1,300) dxDrawLine3D (x,y,z,endX,endY,endZ,tocolor(255,0,0,255)) end end end addEventHandler("onClientRender",root,renderTankLine) function extendLine ( x,y,z,x2,y2,z2,length ) local vx = x2 - x local vy = y2 - y local vz = z2 - z local ratio = length/(getDistanceBetweenPoints3D ( x,y,z,x2,y2,z2 )) vx = vx*ratio vy = vy*ratio vz = vz*ratio return (x + vx),(y + vy),(z + vz) end
-
function extendLine ( x,y,z,x2,y2,z2,length ) local vx = x2 - x local vy = y2 - y local vz = z2 - z local ratio = length/(getDistanceBetweenPoints3D ( x,y,z,x2,y2,z2 )) vx = vx*ratio vy = vy*ratio vz = vz*ratio return (x + vx),(y + vy),(z + vz) end
-
I found it. Can you help me futher. local laserWeapons = {} function drawLasers() for k,player in ipairs(getElementsByType"player") do local playerWeapon = getPedWeapon ( player ) if ( laserWeapons[playerWeapon] ) then local startX,startY,startZ,targetX,targetY,targetZ local boneX,boneY,boneZ = getPedBonePosition ( player, 25 ) startX,startY,startZ = getPedWeaponMuzzlePosition ( player ) if boneX and startX then if getPedControlState(player, "aim_weapon") then targetX, targetY, targetZ = getPedTargetEnd(player) else targetX,targetY,targetZ = extendLine ( boneX,boneY,boneZ,startX,startY,startZ - 0.1,500 ) end local bool,hitX,hitY,hitZ = processLineOfSight ( startX,startY,startZ,targetX,targetY,targetZ, true, true, true, true, true, false, false, true ) if not bool or not hitX then hitX,hitY,hitZ = targetX,targetY,targetZ end dxDrawLine3D ( startX,startY,startZ, hitX,hitY,hitZ, tocolor(255,0,0,50), 1, false, 1 ) end end end end
-
YES, i want like in the picture. I tried to make it. But i cant. Can someone help me?
-
I just wanna changte from corona marker to image.
-
http://imgur.com/f7rfz6r To Look this this
-
Hi i tried to make a script and its not working. I wanna add laser at the tank. function laser ( creator) if getElementType(creator) == "vehicle" then if getElementModel(creator) == 432 then local x, y = getVehicleComponentPosition( creator, "misc_c" ) local x1, y1 = getVehicleComponentPosition( creator, "misc_a" ) dxDrawLine ( x, y, x1, y1, tocolor ( 255, 0, 0, 255 ) end end end end addEventHandler("onClientVehicleEnter", getRootElement(), laser)
-
Still not working +No errors in debug