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

Wysłany: 2018-04-02, 12:51


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

Witam jak zrobic montaz automatyczny mk i gz paczka pys3.0 i jak wgrac to mam .

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 15:56


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

Trzymaj chyba o to Ci chodzi?o.
Musisz ustawic sobie GUI.
Server Side:
MK1 450000          -- Kwota za tuning cz??ci PLN
MK2 450000
MK3 450000

Marker createMarker(-2529.21,-9.30,25.62-3"cylinder"3.152521315140)

function TuningMarker(el,md)
if not md or getElementType(el) ~= "player" then return end
    if not getPedOccupiedVehicle(elthen
            outputChatBox("Wejd? do pojazdu!",el255255255)
    return
end
       triggerClientEvent(el"PokazGUI"resourceRoot)
end
addEventHandler"onMarkerHit"MarkerTuningMarker)

addEventHandler("onMarkerLeave"Marker, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
end)

addEvent("DMK1"true)
addEventHandler("DMK1"root, function()
if getPlayerMoney(source) < MK1 then
outputChatBox("Nie posiadasz tyle pieni?dzy!"source255255255)
return
end
takePlayerMoney(source,MK1)
local vehicle getPedOccupiedVehicle(source)
local id getElementData(vehicle"vehicle:id")
if not id then return end
local qr exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk1=?",getElementData(vehicle"vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255, true) return end
destroyElement(vehicle)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?"id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ MK1"id)
outputChatBox("Zamontowa?e? MK1!"source255255255true)
end)

addEvent("DMK2"true)
addEventHandler("DMK2"root, function()
if getPlayerMoney(source) < MK2 then
outputChatBox("Nie posiadasz tyle pieni?dzy!"source255255255)
return
end
takePlayerMoney(source,MK2)
local vehicle getPedOccupiedVehicle(source)
local id getElementData(vehicle"vehicle:id")
if not id then return end
local qr exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk2=?",getElementData(vehicle"vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255, true) return end
destroyElement(vehicle)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?"id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ MK2"id)
outputChatBox("Zamontowa?e? MK2!"source255255255true)
end)

addEvent("DMK3"true)
addEventHandler("DMK3"root, function()
if getPlayerMoney(source) < MK3 then
outputChatBox("Nie posiadasz tyle pieni?dzy!"source255255255)
return
end
takePlayerMoney(source,MK3)
local vehicle getPedOccupiedVehicle(source)
local id getElementData(vehicle"vehicle:id")
if not id then return end
local qr exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND mk3=?",getElementData(vehicle"vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255, true) return end
destroyElement(vehicle)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET mk3=1 WHERE id=?"id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ MK3"id)
outputChatBox("Zamontowa?e? MK3!"source255255255true)
end)

Client Side:
local screenWscreenH guiGetScreenSize()
panel false

function PanelGUI()
    DX USTAW SOBIE TU :)
end

addEvent("PokazGUI"true)
addEventHandler("PokazGUI"resourceRoot, function()
local pojazd getPedOccupiedVehicle(localPlayer)
if getVehicleController(pojazd) ~= localPlayer then return end
if panel == false then
      addEventHandler("onClientRender",root,PanelGUI)
                tick getTickCount()
                panel true
                showCursor (true)  
    end
end)

function ZamknijOkno(buttonstate)
    if panel and button == "left" and state == "down" then
           if cursorPosition(SCREENWSREENHSCREENWSCREENH-DO USTAWIENIAthen
                        removeEventHandler("onClientRender",root,PanelGUI)
                        panel false
                        showCursor (false) 
         end
    end
end
addEventHandler("onClientClick"getRootElement(), ZamknijOkno)

function MontazMK(buttonstate)
if panel and button == "left" and state == "down" then
        if cursorPosition(SCREENWSREENHSCREENWSCREENH-DO USTAWIENIAthen
            triggerServerEvent ("DMK1"localPlayer)
   end
if panel and button == "left" and state == "down" then
        if cursorPosition(SCREENWSREENHSCREENWSCREENH-DO USTAWIENIAthen
            triggerServerEvent ("DMK2"localPlayer)
   end
if panel and button == "left" and state == "down" then
        if cursorPosition(SCREENWSREENHSCREENWSCREENH-DO USTAWIENIAthen
            triggerServerEvent ("DMK3"localPlayer)
   end
end
end
addEventHandler("onClientClick"getRootElement(), MontazMK)

function cursorPosition(xywh)
    if (not isCursorShowing()) then
        return false
    end
    local mxmy getCursorPosition()
    local fullxfully guiGetScreenSize()
    cursorxcursory mx*fullxmy*fully
    if cursorx and cursorx and cursory and cursory h then
        return true
    else
        return false
    end
end


Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 16:35


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

NoKill1997, a w skryptach mam to nazwac server.lua czy jak ?
powiedz gdzie mam to wkleic daj mi mete itp

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 17:10


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

"dawidmajka" napisał/a:

NoKill1997, a w skryptach mam to nazwac server.lua czy jak ?
powiedz gdzie mam to wkleic daj mi mete itp

Meta:
<meta>
     <script src="Client.lua" type="client"/>
     <script src="Server.lua" type="server"/>
</meta>

Aby skrypt poprawnie dzialal musisz ustawic GUI!

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 17:33


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

NoKill1997, powiec 3 pliki ja kmam je nazwac meta i co dalej

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 18:11


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

"dawidmajka" napisał/a:

NoKill1997, powiec 3 pliki ja kmam je nazwac meta i co dalej
jeden nazywasz client.lua, do ktorego dajesz zawartosc client side drugi nazywasz Server.lua do ktorego dajesz zawartosc Server Side, a trzeci dodajesz meta.xml do ktorego dajesz zawartosc mety.

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 18:30


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

NoKill1997, zrobilem tak dziala skrypt tylko problem bo jak wbijam w punkt autem to nic sie nie wyswietla

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 19:37


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

"dawidmajka" napisał/a:

NoKill1997, zrobilem tak dziala skrypt tylko problem bo jak wbijam w punkt autem to nic sie nie wyswietla
Pisalem Ci iz musisz wykonac GUI pod zasob.

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 20:37


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

NoKill1997, ostatnie pytanie jak zrobic te gui pod zas?b

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-02, 21:01


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

"dawidmajka" napisał/a:

NoKill1997, ostatnie pytanie jak zrobic te gui pod zas?b
Guiedytor.. Jezeli chcesz wiecej inforamcji na temat GUI podam Ci konakt do mnie na PW, to Ci wytlumacze na jakims komunikatorze glosowym.

Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-03, 10:20


dawidmajka

tfuj stary






Wiek: 22
Na forum: 3612 dni
Posty: 137
Nick w MP: kutas

Piwa: 13

Respekt: 40

NoKill1997, Discorda ci podac czy podasz mi discorda lub skype?

Postaw piwo autorowi tego posta
 

 
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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