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

Wysłany: 2016-01-18, 22:29


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4471 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

witam mam kod na suszark?, lecz gdy naceluj? na pojazd nic si? nie dzieje

local screenW,screenH = guiGetScreenSize()

function onSuszarka(target)
    if target then
        if getElementType(target) == "vehicle" then
        vehicle = target
        end
    end
end
addEventHandler ("onClientPlayerTarget", getRootElement(), onSuszarka)

function dxDrawSuszarkaInfo()
    if render then
      if vehicle then
        if isElement(vehicle) then
            --if getPlayerTeam(localPlayer) == getTeamFromName("Policja") then --zamiast Policja dowolna nazwa teamu, wazne by w cudzyslowiu (i taki team faktycznie istnial :P)
                if getPlayerWeapon(localPlayer,1) == 22 then
                    if (getElementModel(localPlayer) == 71) or (getElementModel(localPlayer) == 280) (getElementModel(localPlayer) == 281) or (getElementModel(localPlayer) == 282) then
                    local controller = getVehicleController(vehicle)
                        if controller then
                            --if controller ~= localPlayer then
                                if getElementType(controller) == "player" then
                                    local x, y, z = getElementPosition(localPlayer)
                                    local tx, ty, tz = getElementPosition(controller)
                                    local dis = getDistanceBetweenPoints3D(x, y, z, tx, ty, tz)
                                    local id = getElementData(vehicle, "car_id") or "brak"
                                    local wl = getElementData(vehicle, "car_owner") or "brak"
                                        if 100 >= dis then --jestesmy dosyc blisko gracza
                                            local kmh = getVehicleSpeed(vehicle)
                                            dxDrawRectangle(screenW * 0.6474, screenH * 0.4019, screenW * 0.2583, screenH * 0.2102, tocolor(133, 125, 0, 180), false)
                                            dxDrawText("Suszarka Policji/Stra?y Miejskiej", screenW * 0.6484, screenH * 0.3833, screenW * 0.9036, screenH * 0.4241, tocolor(255, 255, 255, 255), 1.20, "pricedown", "center", "center", false, false, false, false, false)
                                            dxDrawText("W?asciciel: <"..wl..">", screenW * 0.6500, screenH * 0.4398, screenW * 0.7318, screenH * 0.4685, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
                                            dxDrawText("Nick/ID Gracza: <"..getElementData(controller,"id").."> / <"..getPlayerName(controller)..">", screenW * 0.6500, screenH * 0.4778, screenW * 0.7318, screenH * 0.5065, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
                                            dxDrawText("Pr?dkos?: <"..kmh..">", screenW * 0.6500, screenH * 0.5157, screenW * 0.7318, screenH * 0.5444, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
                                            dxDrawText("ID Pojazdu: <"..id..">", screenW * 0.6500, screenH * 0.5537, screenW * 0.7318, screenH * 0.5824, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)    
                                                if (kmh >= 80) then
                                                    triggerServerEvent("suszarka",getRootElement(),localPlayer)
                                                return
                                            end
                                        end   
                                    end
                                --end
                                end
                            end
                        end
                    --end
                end
            end
        end
    end
addEventHandler("onClientRender", getRootElement(), dxDrawSuszarkaInfo)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-18, 22:35


Gerano

Mleko,Kakao,LUA






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

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
Czemu kradniesz kogo? kod i ?e niby tw?j jest?

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-18, 23:05


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4471 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Gdzie napisa?em ?e jest m?j ?!!?!?!? Poka?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-18, 23:15


Gerano

Mleko,Kakao,LUA






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

Piwa: 1460

Respekt: 146,3
Respekt: 146,3

Ostrzeżeń: 100%
Nie chodzi o to tylko ?e korzystasz z nie swojego skryptu i pewnie pozwolenia nie masz

Podpis
BUDOWA SERWERA: XXX

Prace: XXX%
Postaw piwo autorowi tego posta
 

 
Tagi: suszarka
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