Jump to content

Other Player's blips on Custom Minimap


[PXG]Blue

Recommended Posts

Posted (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 by Guest

( Renamed from BeaTzZ to [PXG]Blue )

Looking for a Scripter that can make you free / Paid Scripts with a negotiable price?

Look no further!

add me on skype: phoenix_beatzz

My GitHub

Posted

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 
  

"Keep making it simplex."

Posted
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

( Renamed from BeaTzZ to [PXG]Blue )

Looking for a Scripter that can make you free / Paid Scripts with a negotiable price?

Look no further!

add me on skype: phoenix_beatzz

My GitHub

Posted
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 :/

( Renamed from BeaTzZ to [PXG]Blue )

Looking for a Scripter that can make you free / Paid Scripts with a negotiable price?

Look no further!

add me on skype: phoenix_beatzz

My GitHub

Posted

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

"Keep making it simplex."

  • 5 weeks later...
Posted

Sorry for the bump but the Issue has not been resolved

( Renamed from BeaTzZ to [PXG]Blue )

Looking for a Scripter that can make you free / Paid Scripts with a negotiable price?

Look no further!

add me on skype: phoenix_beatzz

My GitHub

Posted
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.

( Renamed from BeaTzZ to [PXG]Blue )

Looking for a Scripter that can make you free / Paid Scripts with a negotiable price?

Look no further!

add me on skype: phoenix_beatzz

My GitHub

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...