[PXG]Blue Posted April 13, 2016 Share Posted April 13, 2016 (edited) Hey! ive been working on a new minimap for my server, but ive encountered a problem, i have no idea how to get the player icons to work, here's a cut down version of my script, i'm using ccw's shaders as it has everything i need sWidth,sHeight = guiGetScreenSize() addEventHandler( "onClientRender", root, function() dxSetShaderValue( hudMaskShader, "sMaskTexture", maskTexture1 ) local x,y = getElementPosition(localPlayer) x = ( x ) / 6000 y = ( y ) / -6000 dxSetShaderValue( hudMaskShader, "gUVPosition", x,y ) local _,_,camrot = getElementRotation( getCamera() ) dxSetShaderValue( hudMaskShader, "gUVRotAngle", math.rad(-camrot) ) rz=getPedRotation(getLocalPlayer()) dxDrawImage( sWidth*0.001, sHeight*0.70, 200, 200, hudMaskShader, 0,0,0, tocolor(255,255,255,230) ) dxDrawImage(sWidth * 0.0688, sHeight * 0.8190, 16,16, radar_centre, camrot-rz, 0, 0, tocolor(255,255,255,255), false) dxDrawImage( sWidth*0.001, sHeight*0.70, 200, 200, mask_border, 0,0,0, tocolor(255,255,255,255) ) end ) note that radar_centre is the middle of the radar If someone can help me add a function so other player's blips are visible its much apprechiated! Edited May 14, 2016 by Guest Link to comment
Simple0x47 Posted April 14, 2016 Share Posted April 14, 2016 You could search all players by using: --getElementsByType local players = getElementsByType("player") for k,v in pairs(players) do --script, v is the player --Example outputChatBox("Example", v) end Link to comment
[PXG]Blue Posted April 14, 2016 Author Share Posted April 14, 2016 You could search all players by using: --getElementsByType local players = getElementsByType("player") for k,v in pairs(players) do --script, v is the player --Example outputChatBox("Example", v) end thats not my problem,i need to create the blips and draw them, and i dont really know how to start there because i have never really worked with that kinda stuff, my previous attempts always ended in the blip positions being completely off/chaning when rotating the map or moving to/away from the person Link to comment
Simple0x47 Posted April 14, 2016 Share Posted April 14, 2016 Use an example from the community scripts. Link to comment
[PXG]Blue Posted April 14, 2016 Author Share Posted April 14, 2016 Use an example from the community scripts. thats what ive had in mind but it always ends in horribly breaking everything, and as the community scripts are way more complicated than my script its really not helpful that most of them dont have any commented lines either Link to comment
Simple0x47 Posted April 14, 2016 Share Posted April 14, 2016 The community ones are buggy things, but sometimes they're pretty good to learn. I could help you to get done that minimap. Add me on Skype. killer.68x Link to comment
[PXG]Blue Posted May 14, 2016 Author Share Posted May 14, 2016 Sorry for the bump but the Issue has not been resolved Link to comment
Captain Cody Posted May 14, 2016 Share Posted May 14, 2016 Figure out what the X and Y for mini map are to the real map. Then figure out what that is relative to the picture. Link to comment
[PXG]Blue Posted May 14, 2016 Author Share Posted May 14, 2016 Figure out what the X and Y for mini map are to the real map. Then figure out what that is relative to the picture. sorry but i'm not familiar when working with this kinda stuff, could you give me a hint on what to do? thanks. Link to comment
Captain Cody Posted May 14, 2016 Share Posted May 14, 2016 sorry but i'm not familiar when working with this kinda stuff Oh me neither. 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