Oussema Posted March 7, 2017 Share Posted March 7, 2017 i don't have any idea about how to change the default crosshair , any one can give me code ? or example or what i have to use ? i have this crosshair image : http://imgur.com/OhA2WFk Link to comment
#BrosS Posted March 7, 2017 Share Posted March 7, 2017 what is crosshair ? Aiming icon idk :p Link to comment
marty000123 Posted March 7, 2017 Share Posted March 7, 2017 16 minutes ago, #BrosS said: what is crosshair ? Aiming icon idk Oh my god please get out of here... Link to comment
Oussema Posted March 7, 2017 Author Share Posted March 7, 2017 11 minutes ago, #BrosS said: what is crosshair ? Aiming icon idk You're not funny ahahaha this other problem guys i won't make for it new topice if i use guiSettext in guiEdit , then i try to input somthing in the guiEdit i not work what is the problem ! (sorry for bad explain ) password = guiCreateEdit (xx*515, yy*338, xx*134, yy*22, "", false) guiSetText(password, "teest") guisettext , i try in game to input somthing in the Edit i can't i hope you understnad me guys Link to comment
#BrosS Posted March 7, 2017 Share Posted March 7, 2017 4 hours ago, marty000123 said: Oh my god please get out of here... I'm not kiddin What is CrossHair Link to comment
Mr.Loki Posted March 7, 2017 Share Posted March 7, 2017 (edited) @#BrosS Here. Edited March 7, 2017 by Mr.Loki 1 Link to comment
#BrosS Posted March 7, 2017 Share Posted March 7, 2017 26 minutes ago, Mr.Loki said: @#BrosS Here. lol Ok Link to comment
Oussema Posted March 7, 2017 Author Share Posted March 7, 2017 hmmm ? guys !! any help Link to comment
Oussema Posted March 8, 2017 Author Share Posted March 8, 2017 Sorry for bump , but please guys anyone ?? Link to comment
N3xT Posted March 8, 2017 Share Posted March 8, 2017 I'm not sure, but I think you can use shaders. Link to comment
Decro Posted March 8, 2017 Share Posted March 8, 2017 (edited) Try this: setPlayerHudComponentVisible ( "crosshair", false ) -- removes the original crosshair addEventHandler("onClientPreRender", root, function () if getControlState("aim_weapon") then if getPedTargetStart(localPlayer) then local sx, sy, sz = getPedTargetEnd(localPlayer) local cx,cy = getScreenFromWorldPosition(sx,sy,sz) dxDrawImage(cx-10,cy-10,10,10,"crosshair.png") dxDrawImage(cx,cy,10,10,"crosshair.png",180) end end end) But i think that using full crosshair image is pretty easier then drawing 2 half-cut parts Edited March 8, 2017 by Decro Link to comment
itHyperoX Posted March 8, 2017 Share Posted March 8, 2017 (edited) table = { -- you can add more stuff here :) -- Crosshair {"yourPNGNameHERE", "siteM16"}, {"yourPNGNameHERE", "cameraCrosshair"}, {"yourPNGNameHERE", "siterocket"}, {"yourPNGNameHERE", "SNIPERcrosshair"}, } addEventHandler( "onClientResourceStart", resourceRoot, function() for i = 1, #tabla do local shader, tec = dxCreateShader ( "texreplace.fx" ) local tex = dxCreateTexture ( "files/"..table[i][1]..".png" ) engineApplyShaderToWorldTexture ( shader, table[i][2] ) engineApplyShaderToWorldTexture ( shader, table[i][2].."lod" ) dxSetShaderValue ( shader, "gTexture", tex ) end end) texreplace.fx texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } } Meta <meta> <script src="sourceC.lua" type="client"></script> <file src="texreplace.fx"></file> <file src="files/cameraCrosshair.png"/> <file src="files/siteM16.png"/> <file src="files/siterocket.png"/> <file src="files/SNIPERcrosshair.png"/> </meta> Edited March 8, 2017 by TheMOG dsffa Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now