Jump to content

Странная проблемма


Recommended Posts

Имеется такой код:

function hitInteriorPickup(theElement, matchingdimension) 
    local colshape = getElementParent(getElementParent(source)) 
    if getElementType(colshape) == "interior" or getElementType(colshape) == "elevator" then 
        local isVehicle = false 
        local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) 
        if theVehicle and theVehicle == theElement and getVehicleOccupant ( theVehicle, 0 ) == getLocalPlayer() then 
            isVehicle = true 
        end      
         
        if matchingdimension and (theElement == getLocalPlayer() or isVehicle)  then 
            if getElementType(colshape) == "interior" or getElementType(colshape) == "elevator" then 
                lastSource = false 
                triggerServerEvent("interior:requestHUD", colshape) 
                lastSourceIsEntrance = getElementData(source,"entrance") or false 
                lastCol = source 
            end 
        end 
        cancelEvent() 
    end 
end 
addEventHandler("onClientColShapeHit", getRootElement(), hitInteriorPickup) 

Если в любое место кода вставить

outputChatBox("любой текст") 

то после рестарта ресурса начинает флудить этот текст и через несколько секунд мта полностью зависает, после перезапуска сервера, или компа без

outputChatBox("любой текст") 

мта начинает подвисать на 2 секунды после любого действия, например сел в машину, написал команду, сработал любой триггер, и эти подвисания проходят только после нескольких часов простоя компа... В чём заморочка кода?

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