Dre-+- Posted April 24, 2011 Posted April 24, 2011 (edited) This resource add detective vision in MTA(like Batman Arkham Asilum game) For use this resource just use night vision or infrared goggles. I hope you like it) Screenshots: https://wiki.multitheftauto.com/images/4/46/Dvision.png For see exports go to: Mta wiki page Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2074 BTW: all suggestions or bugs post in commentaries. Edited October 17, 2011 by Guest Sorry for my bad english(
Castillo Posted April 24, 2011 Posted April 24, 2011 Nice one, good work! San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Xierra Posted April 25, 2011 Posted April 25, 2011 Wow, now you feel like you're a robot or using a gadget! I was impressed with your work dre, amazing. XX3 is gone. This is my new name. :3
Orange Posted April 26, 2011 Posted April 26, 2011 I did same but without nightvision. Anyway, good work. I hope that it's more optimized that my script http://zduniak.net - don't contact me regarding mta:sa
Puma Posted May 2, 2011 Posted May 2, 2011 Looks cool. But how many FPS does it eat? A lot, I think. "The total IQ of the world is a constant. The more people, the more idiots." - Anonymous.
Slothman Posted May 14, 2011 Posted May 14, 2011 very very nice. I'm impressed Check out my recent work: ZDay - a zombie script Slothbot - an AI deathmatch bot my community profile (all my resources)
darkdreamingdan Posted May 14, 2011 Posted May 14, 2011 Looks cool.But how many FPS does it eat? A lot, I think. They're 2D lines, minimal performance hit. Great idea, nice work VCP FOREVER!
karlis Posted May 15, 2011 Posted May 15, 2011 is hud included? [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Castillo Posted May 16, 2011 Posted May 16, 2011 Karlis, do you mean this: https://community.multitheftauto.com/index.php?p= ... ls&id=1627 ? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Xierra Posted May 16, 2011 Posted May 16, 2011 For me, I think karlis meant: When detective vision is active, will the GTA HUD still be visible? But yours also make sense. He may be asking for that HUD resource that was on the bottom right. P.S: Glad to see you back karlis XX3 is gone. This is my new name. :3
Phat Looser Posted May 16, 2011 Posted May 16, 2011 The heads are missing, if you use the "eye bone positions" you'd have a triangle. I was thinking about that, too, for stealth. Officially MTA's worst fanboy
karlis Posted May 17, 2011 Posted May 17, 2011 Karlis, do you mean this: https://community.multitheftauto.com/index.php?p= ... ls&id=1627 ? yep thats what i meant, thnx _____ ty XX3, glad to see you too. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Phat Looser Posted June 8, 2011 Posted June 8, 2011 May I improve it a bit? Officially MTA's worst fanboy
Dre-+- Posted June 8, 2011 Author Posted June 8, 2011 May I improve it a bit? Ok, if you have good idea) Sorry for my bad english(
Phat Looser Posted June 8, 2011 Posted June 8, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- function drawPedBones (ped) if isElement(ped) then for iFrom,iTo in pairs(aBoneList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end The thing is, code is generated by humans, not by machines. So keeping it readable is always a good idea. Officially MTA's worst fanboy
Dre-+- Posted June 9, 2011 Author Posted June 9, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- function drawPedBones (ped) if isElement(ped) then for iFrom,iTo in pairs(aBoneList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end The thing is, code is generated by humans, not by machines. So keeping it readable is always a good idea. Thanks, mate, now its really looks more better) BTW: Do you have MTA Community profile, for i add you in creators? Sorry for my bad english(
Castillo Posted June 9, 2011 Posted June 9, 2011 I think this is his profile: https://community.multitheftauto.com/index.php?p=profile&id=33540 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Phat Looser Posted June 9, 2011 Posted June 9, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- function drawPedBones (ped) if isElement(ped) then for iFrom,iTo in pairs(aBoneList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end The thing is, code is generated by humans, not by machines. So keeping it readable is always a good idea. Thanks, mate, now its really looks more better) BTW: Do you have MTA Community profile, for i add you in creators? Yes, like Solid said. But I suffer from the "lonewolf" disease(just like any other scripter) which makes you stop working together with other people before you even started talking to them Also, did your script detect that bones were outside the screen? Always check those nil values. Officially MTA's worst fanboy
Dre-+- Posted June 10, 2011 Author Posted June 10, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- function drawPedBones (ped) if isElement(ped) then for iFrom,iTo in pairs(aBoneList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end The thing is, code is generated by humans, not by machines. So keeping it readable is always a good idea. Thanks, mate, now its really looks more better) BTW: Do you have MTA Community profile, for i add you in creators? Yes, like Solid said. But I suffer from the "lonewolf" disease(just like any other scripter) which makes you stop working together with other people before you even started talking to them Also, did your script detect that bones were outside the screen? Always check those nil values. Ok, added in special thanks) Sorry for my bad english(
will briggs Posted June 13, 2011 Posted June 13, 2011 Dude, Awesome! Really well done... Founder of SAUR - Founder/Owner of ARC RPG
Phat Looser Posted June 14, 2011 Posted June 14, 2011 Naw, thats what scripts should be like Officially MTA's worst fanboy
Phat Looser Posted June 15, 2011 Posted June 15, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- aBoneFarList = {} --right leg aBoneFarList [54] = 51; --left leg aBoneFarList [44] = 41; --spine aBoneFarList [1] = 4; --right arm aBoneFarList [26] = 22; --right arm aBoneFarList [36] = 32; --head aBoneFarList [6] = 7; --torso aBoneFarList [32] = 41; aBoneFarList [22] = 51; -- function drawPedBones (ped) local aList = {}; if isElement(ped) then local x,y,z = getCameraMatrix(); local px,py,pz = getElementPosition(ped); local fDistance = getDistanceBetweenPoints3D(x,y,z,px,py,pz); if fDistance < 50 then aList = aBoneList; elseif fDistance < 300 then aList = aBoneFarList; end for iFrom,iTo in pairs(aList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end Uses less GFX speed - all DX funktions have the drawback that they are pushed through the pipe, which is the bottleneck of a GFX card. Officially MTA's worst fanboy
Dre-+- Posted June 16, 2011 Author Posted June 16, 2011 aBoneList = {} --right leg aBoneList[54] = 53; aBoneList[53] = 52; aBoneList[52] = 51; aBoneList[51] = 1; --left leg aBoneList[44] = 43; aBoneList[43] = 42; aBoneList[42] = 41; aBoneList[41] = 1; --spine aBoneList[1] = 2; aBoneList[2] = 3; aBoneList[3] = 4; --right arm aBoneList[26] = 25; aBoneList[25] = 24; aBoneList[24] = 23; aBoneList[23] = 22; aBoneList[21] = 22; --right arm aBoneList[36] = 35; aBoneList[35] = 34; aBoneList[34] = 33; aBoneList[33] = 32; aBoneList[31] = 32; --head aBoneList[4] = 6; aBoneList[6] = 7; aBoneList[7] = 4; --torso aBoneList[32] = 41; aBoneList[22] = 51; -- aBoneFarList = {} --right leg aBoneFarList [54] = 51; --left leg aBoneFarList [44] = 41; --spine aBoneFarList [1] = 4; --right arm aBoneFarList [26] = 22; --right arm aBoneFarList [36] = 32; --head aBoneFarList [6] = 7; --torso aBoneFarList [32] = 41; aBoneFarList [22] = 51; -- function drawPedBones (ped) local aList = {}; if isElement(ped) then local x,y,z = getCameraMatrix(); local px,py,pz = getElementPosition(ped); local fDistance = getDistanceBetweenPoints3D(x,y,z,px,py,pz); if fDistance < 50 then aList = aBoneList; elseif fDistance < 300 then aList = aBoneFarList; end for iFrom,iTo in pairs(aList) do local x1,y1,z1 = getPedBonePosition(ped,iFrom); local x2,y2,z2 = getPedBonePosition(ped,iTo); if not (x1 or x2) then return; end local screenX1, screenY1 = getScreenFromWorldPosition ( x1,y1,z1 ); local screenX2, screenY2 = getScreenFromWorldPosition ( x2,y2,z2 ); local playerTeam = getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam( ped ); local red,green,blue = 0,0,0; if playerTeam then red,green,blue = getTeamColor ( playerTeam ) end if screenX1 and screenX2 then dxDrawLine ( screenX1, screenY1, screenX2, screenY2, tocolor(red,green,blue,255) ); end end end end Uses less GFX speed - all DX funktions have the drawback that they are pushed through the pipe, which is the bottleneck of a GFX card. I dont really understand how, but your code add more 4~6 fps, thanx) Sorry for my bad english(
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