Jump to content

Help me Blip


Haze

Recommended Posts

Hi all in this Topic i want your Help to Know How i can add blip for a Carrier a Blip that it show the Location of The Ship in Radar and in F11 that mean Blip For This Carrier

  
local hullx = -1357.7117919922 
local hully = 532.47308349609 
local hullz = 5.5571422576904 
  
local cH = createObject(10771, -1357.7117919922, 532.47308349609, 5.5571422576904) -- carrier hull 
local cL = createObject(11145, -1420.6689453125, 532.482421875, 4.378999710083) -- carrier lowdeck 
local cHa = createObject(11146, -1366.7033691406, 533.04119873047, 12.420551300049) -- carrier hangar 
local cB = createObject(10770, -1354.3937988281, 524.93719482422, 38.597640991211) -- carrier bridge 
local cBi = createObject(11237, -1354.4262695313, 524.74877929688, 38.529960632324) -- carrier bits 
local cLi = createObject(3115, -1456.7243652344, 532.509765625, 10.010332107544) -- carrier lift  
local cLi2 = createObject(3114, -1414.4064941406, 547.54791259766, 9.7388973236084) -- carrier lift 2 
local cIn = createObject(10772, -1356.3599853516, 532.47290039063, 17.386043548584) -- carrier lines 
local cIn2 = createObject(10772, -1356.3599853516, 532.47290039063, 10.330332107544) -- carrier lines 2 (invisible in hangar) 
local cD = createObject(3113, -1465.7409667969, 532.85229492188, 1.2527737617493) -- carrier door 
local cC = createObject(11149, -1363.7884521484, 527.28692626953, 12.11157989502) -- carrier corridiors 
local cSB1 = createObject(3885, -1394.6096191406, 525.0712890625, 18.118799209595) -- carrier sam base 1 
local cSB2 = createObject(3885, -1324.1744384766, 524.89855957031, 20.940547943115) -- carrier sam base 2 
local cSS1 = createObject(3884, -1324.0531005859, 525.56842041016, 21.032855606079) -- carrier sam site 1 
local cSS2 = createObject(3884, -1394.2770996094, 525.51947021484, 18.218799209595) -- carrier sam site 2 
  
attachElements(cL, cH, -1420.6689453125 - hullx, 532.482421875 - hully, 4.378999710083 - hullz) 
attachElements(cHa, cH, -1366.7033691406 - hullx, 533.04119873047 - hully, 12.420551300049 - hullz) 
attachElements(cB, cH, -1354.3937988281 - hullx, 524.93719482422 - hully, 38.597640991211 - hullz) 
attachElements(cBi, cH, -1354.4262695313 - hullx, 524.74877929688 - hully, 38.529960632324 - hullz) 
attachElements(cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
attachElements(cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
attachElements(cIn, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 17.386043548584 - hullz) 
attachElements(cIn2, cH, -1356.3599853516 - hullx, 532.47290039063 - hully, 10.330332107544 - hullz) 
attachElements(cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
attachElements(cC, cH, -1363.7884521484 - hullx, 527.28692626953 - hully, 12.11157989502 - hullz) 
attachElements(cSB1, cH, -1394.6096191406 - hullx, 525.0712890625 - hully, 18.118799209595 - hullz) 
attachElements(cSB2, cH, -1324.1744384766 - hullx, 524.89855957031 - hully, 20.940547943115 - hullz) 
attachElements(cSS1, cH, -1324.0531005859 - hullx, 525.56842041016 - hully, 21.032855606079 - hullz) 
attachElements(cSS2, cH, -1394.2770996094 - hullx, 525.51947021484 - hully, 18.218799209595 - hullz) 
  
function GUIness(source) 
    --here you can add an if check, if you want to restrict it to admins. 
        triggerClientEvent(source, "makeGUI", root) 
    --end 
end 
addCommandHandler("accp", GUIness) 
  
function goToCarrier(source) 
    --here you can add an if check, if you want to restrict it to admins. 
        local x,y,z = getElementPosition(cH) 
        setElementPosition(source, x, y, z + 15) 
    --end 
end 
addCommandHandler("gotocarrier", goToCarrier) 
  
function setCarrierHeightFunc(playerSource, commandName, height) 
    if (height) then 
        --here you can add an if check, if you want to restrict it to admins. 
            local x,y,z = getElementPosition(cH) 
            setElementPosition(cH, x, y, tonumber(height)) 
        --end 
    end 
end 
addCommandHandler("carrierheight", setCarrierHeightFunc) 
  
function stopCaFunc() 
    stopObject(cH) 
end 
addEvent("stopCarrier", true) 
addEventHandler("stopCarrier", root, stopCaFunc) 
  
function fixDetach(obj) 
    local x, y, z = getElementPosition(obj) 
    local rx, ry, rz = getElementRotation(obj) 
    detachElements(obj) 
    setElementPosition(obj, x, y, z) 
    setElementRotation(obj, rx, ry, rz) 
    return x, y, z 
end 
  
-- Carrier back door 
function cDoorOpen() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x - 3, y, z + 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx - 3, 532.85229492188 - hully, 1.2527737617493 - hullz + 10) 
end 
addEvent("rearDoorBut", true) 
addEventHandler("rearDoorBut", root, cDoorOpen) 
  
function cDoorClose() 
    local x, y, z = fixDetach(cD) 
    moveObject(cD, 3000, x + 3, y, z - 10) 
    setTimer(attachElements, 3000, 1, cD, cH, -1465.7409667969 - hullx, 532.85229492188 - hully, 1.2527737617493 - hullz) 
end 
addEvent("rearDoorButD", true) 
addEventHandler("rearDoorButD", root, cDoorClose) 
  
-- Carrier main lift 
function cMainLiftUp() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz + 7) 
end 
addEvent("mainLiftBut", true) 
addEventHandler("mainLiftBut", root, cMainLiftUp) 
  
function cMainLiftDown() 
    local x, y, z = fixDetach(cLi) 
    moveObject(cLi, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi, cH, -1456.7243652344 - hullx, 532.509765625 - hully, 10.010332107544 - hullz) 
end 
addEvent("mainLiftButD", true) 
addEventHandler("mainLiftButD", root, cMainLiftDown) 
  
-- Carrier side lift down 
function cSideLiftUp() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z + 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz + 7) 
end 
addEvent("sideLiftBut", true) 
addEventHandler("sideLiftBut", root, cSideLiftUp) 
  
function cSideLiftDown() 
    local x, y, z = fixDetach(cLi2) 
    moveObject(cLi2, 3000, x, y, z - 7) 
    setTimer(attachElements, 3000, 1, cLi2, cH, -1414.4064941406 - hullx, 547.54791259766 - hully, 9.7388973236084 - hullz) 
end 
addEvent("sideLiftButD", true) 
addEventHandler("sideLiftButD", root, cSideLiftDown) 
  
-- Carrier raise/lower/reset 
function carrierHeightFunc(theValue) 
    local x, y, z = getElementPosition(cH) 
    if (theValue == 5.5) then 
        moveObject(cH, 0, x, y, 5.5) 
    else 
        moveObject(cH, 5000, x, y, z + theValue) 
    end 
end 
addEvent("carrierHeight", true) 
addEventHandler("carrierHeight", root, carrierHeightFunc) 
  
-- Carrier warper 
function carrierWarper(x, y, z) 
    moveObject(cH, 0, x, y, z) 
end 
addEvent("moveToBut", true) 
addEventHandler("moveToBut", root, carrierWarper) 
  
-- Directional movement controls 
function carrierMove(, yD, zD) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 20000, x + , y + yD, z + zD) 
end 
addEvent("carrierMoveEvent", true) 
addEventHandler("carrierMoveEvent", root, carrierMove) 
  
-- Rotational movement controls 
function carrierRotateFunc(rX, rY, rZ) 
    local x,y,z = getElementPosition(cH) 
    moveObject(cH, 5000, x, y, z, rX, rY, rZ) 
end 
addEvent("carrierRotate", true) 
addEventHandler("carrierRotate", root, carrierRotateFunc) 

Link to comment

use this:

blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0,  
int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()]  

Link to comment

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