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

Wysłany: 2015-05-05, 18:45


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

jak to zrobic

Postaw piwo autorowi tego posta
 

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


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

local function getVehicleByID(id)
    if id then
        id=tonumber(id)
        for _,v in ipairs(getElementsByType("vehicle"))do
            if getElementData(v,"vehicle:id"then
                if getElementData(v,"vehicle:id")==id then
                    return v
                end
            end
        end
    end
    return false
end


addCommandHandler("vwarp",function(plr,cmd,id)
        if id then
                id=tonumber(id)
                local veh=getVehicleByID(id)
                if veh then
                    local x,y,z=getElementPosition(plr)
                    local int=getElementInterior(plr)
                    local dim=getElementDimension(plr)
                    setElementPosition(veh,x,y,z)
                    setElementPosition(plr,x,y,z+2)
                    setElementDimension(veh,dim)
                    setElementInterior(veh,int)
                    local ranga=getPlayerRank(plr)
                    outputChatBox("Przenios?e? do Siebie "..getVehicleName(veh).." ( ID : "..getElementData(veh,"vehicle:id").." )",plr,255,255,255)
                end
            end
        end
end)


Uzupe?nij sobie tylko elementdate, dobr? warto?ci?.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-12, 12:29


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

niedziala probowalem na r??ne sposoby i mi chodzi o teleportowanie pojazdu do siebie czyli thv

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-12, 12:59


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Skoro u?ywam tego kodu to dzia?a tak? I to jest kod na tepanie auta do siebie.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-15, 23:45


PsychOTV

LUA Skrypter






Wiek: 26
Na forum: 4252 dni
Posty: 10
Nick w MP: Tom.

Piwa: 1

Respekt: 50

Niedzia?a prosz? tutaj b??d.
ERROR: Loading script failed: [SKRYPT]/thv/thv.lua:32:')' expected(to close '(' at line 15 near end

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-16, 07:26


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Tak trudno pokombinowa? z endami? Dodaj/usu? jeden czy dwa end i b?dzie dobrze.

Postaw piwo autorowi tego posta
 

 
Tagi: teleportowanie :: pojazdu :: siebie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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