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

Wysłany: 2015-07-09, 12:53


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3


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


addCommandHandler("warp",function(plr,cmd,id)
        if id then
                id=tonumber(id)
                local veh=getVehicle(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)
                    outputChatBox("Przenios?e? do Siebie "..getVehicleName(veh).." ( ID : "..getElementData(veh,"car_id").." )",plr,255,255,255)
                end
            end

end)



Spr?buj to, u mnie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-09, 13:35


sebik2303

Mapper :)






Wiek: 25
Na forum: 4160 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

piotr172, Dzi?ki dzia?a, piwko postawione

Postaw piwo autorowi tego posta
 

 
Tagi: tepanie :: pojazdu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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