Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-06-03, 11:39


oski114







Wiek: 28
Na forum: 3743 dni
Posty: 45
Nick w MP: Naplecik

Piwa: 3

Respekt: 50

skrypt Frakcja-policja laguje mi ca?y serwer
a jak usune jeden z plik?w to nie dzia?a skrypt ja mam to naprawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-03, 11:47


Demic

Lua&Mapping






Wiek: 29
Na forum: 4247 dni
Posty: 63
Nick w MP: Demic

Piwa: 620

Respekt: 70

Podaj kod I DB3

Podpis
<[email protected]>
warsaw-life.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-03, 11:49


oski114







Wiek: 28
Na forum: 3743 dni
Posty: 45
Nick w MP: Naplecik

Piwa: 3

Respekt: 50

MAM tylko DB2 kod:

createBlip(1556.72,-1675.08,28.4030,2,0,0,0,0,0,250) 

function getPointFrontOfElement(element,distance)
    if not element then return end

    local xygetElementPosition element )
    local rxryrz getElementRotation element )
    + (distance * (math.sin(math.rad(-rz))) )
    + (distance * (math.cos(math.rad(-rz))) )
    return x,y,z
end

function getPositionFromElementAtOffset(element,x,y,z)
    if not element then return end
    if not x or not y or not z then      
        return xyz   
    end        
    local matrix getElementMatrix element )
    local offX matrix[1][1] + matrix[2][1] + matrix[3][1] + matrix[4][1]
    local offY matrix[1][2] + matrix[2][2] + matrix[3][2] + matrix[4][2]
    local offZ matrix[1][3] + matrix[2][3] + matrix[3][3] + matrix[4][3]
    return offXoffYoffZ
end

function getVehicleWheelPosition(vehicle,wheel)
    local xy000
    local minXminYminZmaxXmaxYmaxZ getElementBoundingBox(vehicle)
    if wheel == 1 then
        xygetPositionFromElementAtOffset(vehicleminXmaxYminZ)
    elseif wheel == 2 then
        xygetPositionFromElementAtOffset(vehicleminX, -maxYminZ)        
    elseif wheel == 3 then
        xygetPositionFromElementAtOffset(vehiclemaxXmaxYminZ)
    elseif wheel == 4 then
        xygetPositionFromElementAtOffset(vehiclemaxX, -maxYminZ)
    end     
    return xyz
end

function onClientRender()
    if isPedInVehicle(localPlayerthen    
         local vehicle getPedOccupiedVehicle(localPlayer)
         if not vehicle then return end

        local stinger getElementsByType("object")
        
        --local wx0wy0wz0 getVehicleWheelPosition(vehicle,0)
        local wx1wy1wz1 getVehicleWheelPosition(vehicle,1)
        local wx2wy2wz2 getVehicleWheelPosition(vehicle,2)
        local wx3wy3wz3 getVehicleWheelPosition(vehicle,3)
        local wx4wy4wz4 getVehicleWheelPosition(vehicle,4)
        
        -- for visual debug wheel positions
        --dxDrawLine3D(wx1wy1wz1wx2wy2wz2tocolor(0,255,0))
        --dxDrawLine3D(wx3wy3wz3wx4wy4wz4tocolor(0,255,0))
        
        for kv in pairs(stinger) do
            if getElementData(v,"isStinger") == true then
                local vxvyvz getElementPosition(v)
                if getDistanceBetweenPoints3D(wx1wy1wz1vxvyvz) <= 2.0 then
                    setVehicleWheelStates(vehicle1, -1, -1, -1)    
                end
                if getDistanceBetweenPoints3D(wx2wy2wz2vxvyvz) <= 2.0 then
                    setVehicleWheelStates(vehicle, -11, -1, -1)    
                end
                if getDistanceBetweenPoints3D(wx3wy3wz3vxvyvz) <= 2.0 then
                    setVehicleWheelStates(vehicle, -1, -11, -1)    
                end
                if getDistanceBetweenPoints3D(wx4wy4wz4vxvyvz) <= 2.0 then
                    setVehicleWheelStates(vehicle, -1, -1, -11)    
                end        
            end                                        
        end
     end
end
addEventHandler("onClientRender",getRootElement(), onClientRender)

function onCreateStinger(xyz)
    if(getDistanceBetweenPoints3D(xyzgetElementPosition(localPlayer)) <= 10 then
        local sound playSound3D("plant.wav"xyz)
        setSoundMaxDistance(sound10)
    end
end 
addEvent("onCreateStinger"true)
addEventHandler("onCreateStinger"getRootElement(), onCreateStinger


[ Dodano: 2017-06-03, 11:51 ]
Ok juz problem naprawiony wystarczy?o usun linijki z C_policja

Ostatnio zmieniony przez Emm 2017-07-26, 19:33, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-03, 17:21


MagiK.

Lua :-)






Wiek: 26
Na forum: 3441 dni
Posty: 102

Piwa: 391

Respekt: 35,8

Polecam Ci usun?? skrypt c_policja i usun?? z mety

Postaw piwo autorowi tego posta
 

 
Tagi: skrypt :: frakcja-policja :: laguje :: cały :: serwer
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » skrypt Frakcja-policja laguje mi cały serwer Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku