uj3BanY Posted February 4, 2023 Share Posted February 4, 2023 i have a radar script here and in db 3 it shows error related to line 112: setPlayerHudComponentVisible("radar", (getElementDimension(localPlayer) == 0) and (getElementInterior(localPlayer) == 0) and getElementData(localPlayer, "player:sid") and not (getElementData(localPlayer, "player:customradar") == true) and not (getElementData(localPlayer, "notshowhud") ~= false) and not (isMapVisible())) and here is the full function: function drawRadarDisc() if isPlayerHudComponentVisible("radar") then dxSetAspectRatioAdjustmentEnabled(true) local w, h = screenW*0.156, screenH*0.182 local x, y = screenW*0.058, screenH-h-screenH*0.056 dxDrawImage(x, y, w, h, "images/radar/radar_circle.png", 0, 0, 0, tocolor(255, 255, 255, 255)) dxSetAspectRatioAdjustmentEnabled(false) end setPlayerHudComponentVisible("all",false) setPlayerHudComponentVisible("radar", false) setPlayerHudComponentVisible("crosshair",true) setPlayerHudComponentVisible("radar", (getElementDimension(localPlayer) == 0) and (getElementInterior(localPlayer) == 0) and getElementData(localPlayer, "player:sid") and not (getElementData(localPlayer, "player:customradar") == true) and not (getElementData(localPlayer, "notshowhud") ~= false) and not (isMapVisible())) end in line 112 it turns out that there is an error in defining and not (isMapVisible())) if you can fix please guide me to victory <3 Link to comment
Moderators IIYAMA Posted February 4, 2023 Moderators Share Posted February 4, 2023 18 minutes ago, uj3BanY said: in line 112 it turns out that there is an error in defining Change isMapVisible() to isPlayerMapVisible(). https://wiki.multitheftauto.com/wiki/IsPlayerMapVisible isMapVisible is an OOP method. Used like this (if OOP is enabled): localPlayer:isMapVisible() 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