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

Wysłany: 2015-12-13, 20:32


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Witam. Mam ten kod i chcia?bym aby by? on pod komend? lecz moje pr?by nie udawa?y si?. Wi?c prosz? pom??cie.


  if itemName == "removetire" then
                local col getElementData(getLocalPlayer(),"currentCol")
                if getElementData(col,"tire_inVehicle") >= and getElementData(getLocalPlayer(),"Toolbox") >= 1 then
                    local col getElementData(getPlayer(),"currentCol")
                    setElementData(getLocalPlayer(),"Tire",(getElementData(getLocalPlayer(),"Tire") or 0)+1)
                    setElementData(col,"Tire_invEhicle",getElementData(col,"Tire_inVehicle")-1)
                    setPedAnimation(getLocalPlayer(),"BOMBER","BOM_Plant",nil,false,false,nil,false)
                    triggerEvent("displayClientInfo",getLocalPlayer(),"Vehicle","You removed 1 Tire from vehicle",255,255,255)
                    disableMenu()
                    return
                end
            end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-13, 21:19


krisu477







Wiek: 25
Na forum: 4837 dni
Posty: 54
Nick w MP: Krisek

Piwa: 7

Respekt: 70

nie udawa?y ci si? w jakim sensie? errory? co? nie dzia?a?o?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-14, 14:19


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Nie usuwa?o ko?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-15, 06:37


Gerano

Mleko,Kakao,LUA






Wiek: 38
Na forum: 4266 dni
Posty: 187
Nick w MP: Gerano

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
Co masz w db 3 ?

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-16, 17:30


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Tak wygl?da m?j skrypt kt?ry nie dzia?a :(

function removetire player ) 
if getPedOccupiedVehicle (player) and if getElementData(getLocalPlayer(),"Narz?dzia") >= 1 then
                if (getElementData(player,"Tire_inVehicle") or 0) > 0 then    
                    setElementData(player,"Tire_inVehicle",(getElementData(player,"Tire_inVehicle") or 0)-1)
                    setElementData(getLocalPlayer(),"Ko?o",(getElementData(getLocalPlayer(),"Ko?o") or 0)+1)

                    end
                end
    addCommandHandler "Wyjmij"removetire ) -- komend


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-16, 17:40


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Quin, tw?j kod odejmuje od elementDaty gracza opon? i dodaje j? pod inn? elementDat?. Powiniene? pobra? stref? kolizji przypisan? do pojazdu, w kt?rym ten gracz si? znajduj?,.

Niestety nie wiem czy w GM DayZ ta elementData jest w elementDatach pojazdu czy faktycznie w strefie kolizji, tak?e ta informacja to taki troch? p???rodek.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-16, 21:14


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

    for i,veh in ipairs(nrgSpawns) do
        local x,y,veh[1],veh[2],veh[3]
        veh createVehicle(522,x,y,z)
        vehCol createColSphere(x,y,z,2)
        attachElements vehColveh00)
        setElementData(vehCol,"parent",veh)
        setElementData(veh,"parent",vehCol)
        setElementData(vehCol,"vehicle",true)
        setElementData(vehCol,"MAX_Slots",4)
        setElementData(vehCol,"Tire_inVehicle",0)
        setElementData(vehCol,"Engine_inVehicle",0)
        setElementData(vehCol,"Parts_inVehicle",0)
        setElementData(vehCol,"Lamp_inVehicle",0)
        setElementData(vehCol,"spawn",{522,x,y,z})
        setElementData(vehCol,"fuel",math.random(10,30))
    end


Mam u?y? vehCol tak?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-16, 21:16


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Quin, c??, musisz je odpowiednio pobra? na podstawie tego pojazdu, w kt?rym si? ma znajdowa? gracz u?ywaj?cy tej komendy, ale mniej wi?cej w?a?nie o to chodzi ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-16, 21:20


Quin







Wiek: 25
Na forum: 4537 dni
Posty: 79

Piwa: 3

Respekt: 38

Dzi?ki reszt? ogarn?. Temat do zakmkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: usuwanie :: koła :: pojazdu :: pod :: komendę :: (dayz)
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Usuwanie koła z pojazdu pod komendę (DayZ) 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