Jump to content

house problem


daKillar2000

Recommended Posts

heey i have a little problem when i go in me house then he enter the house whit no interior

-------- markerhit

  
function onMarkerHit ( hitPlayer) 
    if ( cancel[hitPlayer] ) then 
        if ( getTickCount () - cancel[hitPlayer] < 1000 ) then 
            return 
        end 
    end 
    local block = true 
    if ( e[source] ) or ( o[source] ) then 
        if ( getElementData ( hitPlayer, "block" ) ) then 
            block = nil 
        end 
    end 
    if not ( getElementData ( hitPlayer, "block" ) ) then 
          if (getElementType (hitPlayer) == "player") and not (isPedInVehicle (hitPlayer)) then 
            if not ( getElementData ( source, "lock" ) ) then 
                if ( o[source] ) then 
                    local getElementData = findHouse ( o[source] ) 
                                        local root = xmlLoadFile ("houses.xml") 
                                        local int = setElementInterior(hitPlayer,ID) 
                    getElementData = xmlFindChild ( hitPlayer, "entrance", 0 ) 
                    local attribute = xmlNodeGetAttribute ( hitPlayer, "ID" ) 
                    getElementData = findInterior ( attribute ) 
                    local interior = xmlNodeGetAttribute (hitPlayer, "ID" ) 
                    local x = xmlNodeGetAttribute ( hitPlayer, "PosX" ) 
                    local y = xmlNodeGetAttribute ( hitPlayer, "PosY" ) 
                    local z = xmlNodeGetAttribute ( hitPlayer, "PosZ" ) 
                    setElementInterior ( hitPlayer,ID, x, y, z ) 
                    setElementData ( hitPlayer, "block", true ) 
                    setElementData ( hitPlayer, "return", o[source] ) 
                end 
                if ( e[source] ) then 
                    local ID = getElementData ( hitPlayer, "return" ) 
                    local getElementData = findHouse ( ID ) 
                    getElementData = xmlFindChild ( hitPlayer, "entrance", 0 ) 
                    local x,y,z = getPos ( hitPlayer ) 
                    ID = xmlNodeGetAttribute ( getElementData, "ID" ) 
                    setElementInterior ( hitPlayer, id, x, y, z ) 
                    setElementData ( hitPlayer, "block", true ) 
                end 
            end 
        end 
    end 
    if not ( block ) then 
        setElementData ( hitPlayer, "block", nil ) 
        cancel[hitPlayer] = getTickCount () 
    end 
end 
addEventHandler ( "onMarkerHit", getRootElement(), onMarkerHit ) 
  

-----houses xml

  
     
        
        
    
  

can anny help me

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...