Jump to content

How to change?


DarkByte

Recommended Posts

Posted

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) 

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

and i want to change it from corona to image.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Image i added it by photoshop. Corona is is in the script. I wanna make image not corona!

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted
corona = createMarker (0, 0, -10, "corona", 1.0, 0, 100, 0, 150) 

Corona script but i wanna to be image.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

TO remove CORONA and change to image.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted (edited)
TO remove CORONA and change to image.

Yes i understand this part, but what's the role of this image? moving or doing what also what's position of it you want it to take the crosshair place or at where

Edited by Guest
Posted

To make image move by tank turret and to get end of the target.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

  • Moderators
Posted

So you want to put a 2D image to replace a 3D object in a 3D world ?

Can you show us the image you want to put ?

The rEvolution is coming ...

  • Moderators
Posted

So KariiiM was right but no one here could tell for sure that you wanted a crosshair instead of the corona.

corona = createMarker (0, 0, -10, "corona", 1.0, 0, 100, 0, 150) 

Can you show us the entire function so we know where we have to work in ?

The rEvolution is coming ...

Posted

I will send u in pm.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted (edited)

Hey i scripted this part for you, maybe that's what you need as i understood

-Client side

addEventHandler("onClientVehicleEnter", getRootElement(), 
    function(thePlayer, seat) 
      local tank = {[432]=true} 
      local theVehicle = getPedOccupiedVehicle(localPlayer) 
      if (not theVehicle) then return end 
      local model = getElementModel(theVehicle) 
      if ( thePlayer == localPlayer) then  
      if ( tank[model] ) then   
      addEventHandler("onClientRender", getRootElement(),dxDraw) 
      end 
    end 
end) 
  
function dxDraw() 
dxDrawImage (sx,sy,sx,sy,"yourImage.png") --draw your image 
end 

Edited by Guest
Posted

Not working.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted (edited)
Not working.

Edit the image.. you've to draw your own one, click on THIS to see how to draw a image and your picture must be defined in the meta.. and it exist in your resource

dxDrawImage (sx,sy,sx,sy,"yourImage.png") --draw your image 

Edited by Guest
Posted

OMG. I already made that not working+ You have some errors in script.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Its working now, i changed something and i fixed some warnings

local sx, sy = guiGetScreenSize() 
function createImage() 
dxDrawImage((sx-68)/ 2, (sy-54)/2, 68, 54, "yourCrossHair.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)  
end 
addEventHandler("onClientVehicleEnter", getRootElement(), 
    function () 
      local player = getLocalPlayer() 
      local theVehicle = getPedOccupiedVehicle( player ) 
      if ( getElementType ( theVehicle ) == 'vehicle' and isPedInVehicle ( player ) and getElementModel ( theVehicle ) == 432 ) then 
      if (theVehicle) then 
      addEventHandler ( "onClientRender", root, createImage ) 
      end 
    end 
end) 

Posted

I need to draw crosshair at the end of the turret, not in middle of screen

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted
I need to draw crosshair at the end of the turret, not in middle of screen

Do it by yourself? and get your own Resolution,

Here's full code i cleaned and added something

local sx, sy = guiGetScreenSize() 
function createImage() 
dxDrawImage((sx - 68) / 2, (sy - 54) / 2, 68, 54, "yourcrosshair.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) 
end 
addEventHandler("onClientVehicleEnter", getRootElement(), 
    function (player, seat) 
      local theVehicle = getPedOccupiedVehicle( player ) 
      if ( player == getLocalPlayer() and getElementType ( theVehicle ) == 'vehicle' and isPedInVehicle ( player ) and getElementModel ( theVehicle ) == 432 ) then 
      if (theVehicle) then 
      addEventHandler ( "onClientRender", root, createImage ) 
      end 
    end 
end) 
  
function destroyImage(player, seat) 
      if ( player == getLocalPlayer() and getElementType ( theVehicle ) == 'vehicle' and not isPedInVehicle ( player ) and getElementModel ( theVehicle ) == 432 ) then 
      removeEventHandler ( "onClientRender", root, createImage ) 
   end 
end 
addEventHandler("onClientVehicleExit", getRootElement(),destroyImage) 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...