pillow 8 Posted August 8, 2015 Share Posted August 8, 2015 hi everyone, i was trying to figure out how to draw box or line with those 2 natives static void DRAW_LINE(float x1, float y1, float z1, float x2, float y2, float z2, int r, int g, int b, int alpha) { invoke<Void>(0x6B7256074AE34680, x1, y1, z1, x2, y2, z2, r, g, b, alpha); } static void DRAW_BOX(float x1, float y1, float z1, float x2, float y2, float z2, int r, int g, int b, int alpha) { invoke<Void>(0xD3A9971CADAC7252, x1, y1, z1, x2, y2, z2, r, g, b, alpha); } after many tries i couldn't get it working, no box or lines appearing, even if you convert it with w2s.. Link to post Share on other sites
GeorgeZhang 25 Posted August 9, 2015 Share Posted August 9, 2015 have you tried putting it in a loop? Link to post Share on other sites
pillow 8 Posted August 9, 2015 Author Share Posted August 9, 2015 have you tried putting it in a loop? Yeah already tried, on off loop it doesn't even show up anything... idk how to make it works... both Link to post Share on other sites
Neutrinobeam 15 Posted August 10, 2015 Share Posted August 10, 2015 The 'z's make me think that is drawing in the game, not to the screen. Are you drawing near the character where it will be visible? Also, remember that screen coordinates are 0 to 1. Link to post Share on other sites
pillow 8 Posted August 10, 2015 Author Share Posted August 10, 2015 The 'z's make me think that is drawing in the game, not to the screen. Are you drawing near the character where it will be visible? Also, remember that screen coordinates are 0 to 1. i was transforming it to world3d to screen 2d.. so the line would be done from me to another player.. and the box would be drawn onto a player.. Link to post Share on other sites
ClareXoBearrx3R9 250 Posted August 10, 2015 Share Posted August 10, 2015 The 'z's make me think that is drawing in the game, not to the screen. Are you drawing near the character where it will be visible? Also, remember that screen coordinates are 0 to 1. i was transforming it to world3d to screen 2d.. so the line would be done from me to another player.. and the box would be drawn onto a player.. Well modding in GTA Online isn't supported here so... Link to post Share on other sites
pillow 8 Posted August 11, 2015 Author Share Posted August 11, 2015 sorry @ClareXoBearrx3 but who said it's for online modding??.... you dreamin or wat? Link to post Share on other sites
InfamousSabre 223 Posted August 11, 2015 Share Posted August 11, 2015 (edited) sorry @ClareXoBearrx3 but who said it's for online modding??.... you dreamin or wat? You did, technically. .. so the line would be done from me to another player.. The only time there exists more than one player in GTA is when you are online. To answer your actual question though: Stop converting your coords to screen coords, then the functions will work. The line and box are drawn in 3D space , not screen space (Line will clip through geometry, but width of line will not be affected by perspective. Box behaves as any other 3d model.). Also for the last 4 params, try 255, 0, 0, 255. That should make you a solid red line. Not sure what values you were using, but 255 is max value for these params. Edited August 11, 2015 by InfamousSabre 1 Link to post Share on other sites
ClareXoBearrx3R9 250 Posted August 11, 2015 Share Posted August 11, 2015 sorry @ClareXoBearrx3 but who said it's for online modding??.... you dreamin or wat? You did, technically. .. so the line would be done from me to another player.. The only time there exists more than one player in GTA is when you are online. This. If you truly didn't mean another actual player in GTA Online and instead meant say, a PED or something, then my apologies. Link to post Share on other sites
pillow 8 Posted August 11, 2015 Author Share Posted August 11, 2015 sorry @ClareXoBearrx3 but who said it's for online modding??.... you dreamin or wat? You did, technically. .. so the line would be done from me to another player.. The only time there exists more than one player in GTA is when you are online. This. If you truly didn't mean another actual player in GTA Online and instead meant say, a PED or something, then my apologies. Good answer Clare i mentioned Player instead of Ped, well how this native would work now? you know something? Link to post Share on other sites
L3gendaryGamers 2 Posted August 11, 2015 Share Posted August 11, 2015 (edited) void LineToCar(){Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), TRUE);Vector3 coords2 = GET_ENTITY_COORDS(myVeh, TRUE);if (DOES_ENTITY_EXIST(myVeh)){DRAW_LINE(coords2.x, coords2.y, coords2.z, coords.x, coords.y, coords.z, 0, 255, 255, 255);}} I use it to draw a line to my Last Vehicle if it exists. To use it just simply loop it. It works for me Edited August 11, 2015 by L3gendaryGamers 1 Link to post Share on other sites