Jump to content

Problem with marker


papam77

Recommended Posts

function MGPED () 
-- NPC -- 
local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) 
setElementInterior (Christina, 3 ) 
setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
  
-- Markery -- 
local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 
MGMARKER = createMarker ( px, py, pz, typ, size ) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 

function MGMA () 
if ( MGMARKER ) then 
local msg = "#ff9900Christina:#ffffff If you want to open a Multi-Gamemode, press F." 
outputChatBox (msg, source, 255,255,255, true) 
end 
end 
addEventHandler("onPlayerMarkerHit",getRootElement(),MGMA) 

Why is marker as invisible hiting to Z:1025 ?

Marker is Z: 1008.7 and it is Arrow, but here is problem if i am on same place but on Z 1025 i see still Message from marker, but why? I don't see a marker on this Z position... Where is problem?

Edited by Guest
Link to comment

typ try it type i cant see any other errors

local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 
MGMARKER = createMarker ( px, py, pz, type, size ) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 

Link to comment

At floor 1

http://www.upload.ee/image/3472214/F1.png

At floor 3

http://www.upload.ee/image/3472216/F3.png

I am hitting to this marker at floor 3 and debugscript is empty.

function MGPED () 
-- NPC -- 
local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) 
setElementInterior (Christina, 3 ) 
setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
  
-- Markery -- 
local px, py, pz, type, size = 362.1, 173.6, 1008.7, "arrow", 1.0 
MGMARKER = createMarker ( px, py, pz, type, size ) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 
  

Current code.

Link to comment
function MGPED () 
-- NPC -- 
local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) 
setElementInterior (Christina, 3 ) 
setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
  
-- Markery -- 
local x, y, z, type, size = 362.1, 173.6, 1008.9, "arrow", 1.3 
MGMARKER = createMarker ( x, y, z, type, size ) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 
  

Link to comment
function MGPED () 
-- NPC -- 
local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) 
setElementInterior (Christina, 3 ) 
setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
  
-- Markery -- 
local x, y, z, typ, size = 362.1, 173.6, 1009.1, "arrow", 1.0 
MGMARKER = createMarker ( x, y, z, type, size ) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 

Link to comment
function MGPED () 
-- NPC -- 
local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90 ) 
setElementInterior (Christina, 3 ) 
setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
  
-- Markery -- 
local x, y, z, type, size = 362.1, 173.6, 1009.1, "arrow", 1.0 
MGMARKER = createMarker ( x, y, z, type, size) 
setElementInterior ( MGMARKER, 3 ) 
  
end 
) 
addEventHandler ("onResourceStart", resourceRoot, MGPED ) 

Try this then debug it

Link to comment
function MGPED() 
    -- NPC -- 
    local Christina = createPed (90, 359.14141, 173.59044, 1008.32, -90) 
    setElementInterior(Christina, 3) 
    setTimer(setPedAnimation, 90, 1, Christina, "FOOD", "FF_Sit_Eat1", -1, true, false) 
      
    -- Markery -- 
    local px, py, pz, typ, size = 362.1, 173.6, 1008.7, "arrow", 1.0 
    MGMARKER = createMarker(px, py, pz, typ, size) 
    setElementInterior(MGMARKER, 3) 
end 
addEventHandler("onResourceStart", resourceRoot, MGPED) 
  
function MGMA(marker) 
    if (marker == MGMARKER) then 
        local msg = "#ff9900Christina:#ffffff If you want to open a Multi-Gamemode, press F." 
        outputChatBox(msg, source, 255,255,255, true) 
    end 
end 
addEventHandler("onPlayerMarkerHit", root, MGMA) 

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