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

Wysłany: 2016-07-14, 15:01


Shogo12345

LuA






Wiek: 31
Na forum: 4181 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%

[Server]
local salonowePojazdy = {}
--wzorsalonowePojazdy[id_pojazdu] = cena
salonowePojazdy[478] = 2000--Walton
salonowePojazdy[549] = 10000--Tampa
salonowePojazdy[540] = 8000--Vincent
salonowePojazdy[492] = 24000--Greenwood
salonowePojazdy[405] = 25000--Sentinel
salonowePojazdy[400] = 16000--Landstalker
salonowePojazdy[542] = 13000--Clover
salonowePojazdy[445] = 19000--Admiral
salonowePojazdy[579] = 37000--Huntley
salonowePojazdy[495] = 80000--Sandking
salonowePojazdy[426] = 18000--Premier
salonowePojazdy[566] = 11000--Tahoma
salonowePojazdy[536] = 22000--Blade
salonowePojazdy[518] = 30000--Buccaner
salonowePojazdy[458] = 5000--Solair

--SPORTOWE

salonowePojazdy[496] = 24000--Blista Compact
salonowePojazdy[558] = 73100--Uranus
salonowePojazdy[602] = 85000--Alpha                  



--Motory

salonowePojazdy[461] = 15000--PCJ-600
salonowePojazdy[581] = 25000--BF-400

local salon createBlip (-1965.81,293.83,35.47-0.9,55)
local salon createMarker(-1965.81,293.83,35.47-0.9"cylinder"325500100)

function onSalonHit(hitElementdim)
    if getElementType(hitElement) == "player" then
    triggerClientEvent(hitElement"pokazGUISalonu"rootsalonowePojazdy)
    end
end
addEventHandler("onMarkerHit"salononSalonHit)

addEvent("kupPojazdSalon"true)
addEventHandler("kupPojazdSalon"getRootElement(),
function(id)
local cena salonowePojazdy[id]
    if cena then
        if getPlayerMoney(source) >= cena then
        local account getPlayerAccount(source)
          if account then
          local wlasciciel getAccountName(account)
            if >= getYourVehicleCount(wlascicielthen
            takePlayerMoney(sourcecena)
            triggerClientEvent(source"potwierdzKupnoPojazduPrywatnego"root)
            fadeCamera(sourcefalse)
                setTimer(function(source)
                local xyzrot = -1990.31,275.77,35.17270
                local veh createVehicle(idxyz)
                setElementData(veh"pojazd_paliwo"50) 
                setElementData(veh"pojazd_przebieg"0)
                local rggetVehicleColor(vehtrue)
                fadeCamera(sourcetrue)
                --<<-->>
                local query dbQuery(handler"INSERT INTO pojazdy (wlasciciel, model, x, y, z, rot, ca, cb, cc, przebieg, paliwo) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?)"wlascicielidxyzrotrgb500)
                local resultnum_affected_rowslast_insert_id dbPoll(query, -1)
                local rggetVehicleHeadLightColor(veh)
                dbExec(handler"INSERT INTO tuning (id, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, paintjob, hr, hg, hb) VALUES (?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"last_insert_id"0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""3"rgb)
                --<<-->>
                setElementRotation(veh00rot)
                ustawDanePojazdu(vehlast_insert_idwlasciciel)
                warpPedIntoVehicle(sourceveh)
                end15001source)
            else
            outputChatBox("Mo?esz posiada? maksymalnie 2 pojazdy."source255255255true)
            end
          end
        else
        outputChatBox("Potrzebujesz "..cena.."Eur by kupic ten pojazd."source255255255true)
        end
    end
end)

--komenda tworzaca
function stworzPojazdCMD(playercmdidwlasciciel)
local acc getAccountName (getPlayerAccount(player))
    if acc then
    if isObjectInACLGroup ("user."..accaclGetGroup ("Admin")) then
        if id and wlasciciel then
        local id tonumber(id)
            if id then
                if getVehicleNameFromModel(idthen
                local xygetElementPosition(player)
                local __rot getElementRotation(player)
                
                local veh createVehicle(idxyz)
                    if veh then
                    setElementData(veh"pojazd_paliwo"50) --na specjalna prosbe ;)
                    setElementData(veh"pojazd_przebieg"0)
                    local rggetVehicleColor(vehtrue)
                    --<<-->>
                    local query dbQuery(handler"INSERT INTO pojazdy (wlasciciel, model, x, y, z, rot, ca, cb, cc, przebieg, paliwo) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?)"wlascicielidxyzrotrgb500)
                    local resultnum_affected_rowslast_insert_id dbPoll(query, -1)
                    local rggetVehicleHeadLightColor(veh)
                    dbExec(handler"INSERT INTO tuning (id, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, paintjob, hr, hg, hb) VALUES (?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"last_insert_id"0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""3"rgb)
                    --<<-->>
                    setElementRotation(veh00rot)
                    ustawDanePojazdu(vehlast_insert_idwlasciciel)
                    else
                    outputChatBox("Podane ID jest niepoprawne."player255255255true)
                    end
                else
                outputChatBox("Podane ID jest niepoprawne."player255255255true)
                end
            end
        else
        outputChatBox("Wpisz /stworz [id-pojazdu] [wlasciciel]"player255255255true)
        end
    end
    end
end
addCommandHandler("stworz"stworzPojazdCMD)


Ostatnio zmieniony przez Shogo12345 2016-07-15, 12:24, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 15:49


_Wicek_

Majstersztyk






Wiek: 25
Na forum: 4260 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1841

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
To s? na pewno dobre kordy ?

-1965.81,293.83,35.47-0.9

Wpisz /gp i zmie? je.

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 19:23


Shogo12345

LuA






Wiek: 31
Na forum: 4181 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Poprawi?em kordy ale i tak nie pokazuje markera.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-14, 22:29


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

[Serverlocal salonowePojazdy = {} 
--wzorsalonowePojazdy[id_pojazdu] = cena 
salonowePojazdy[478] = 2000--Walton 
salonowePojazdy[549] = 10000--Tampa 
salonowePojazdy[540] = 8000--Vincent 
salonowePojazdy[492] = 24000--Greenwood 
salonowePojazdy[405] = 25000--Sentinel 
salonowePojazdy[400] = 16000--Landstalker 
salonowePojazdy[542] = 13000--Clover 
salonowePojazdy[445] = 19000--Admiral 
salonowePojazdy[579] = 37000--Huntley 
salonowePojazdy[495] = 80000--Sandking 
salonowePojazdy[426] = 18000--Premier 
salonowePojazdy[566] = 11000--Tahoma 
salonowePojazdy[536] = 22000--Blade 
salonowePojazdy[518] = 30000--Buccaner 
salonowePojazdy[458] = 5000--Solair 

--SPORTOWE 

salonowePojazdy[496] = 24000--Blista Compact 
salonowePojazdy[558] = 73100--Uranus 
salonowePojazdy[602] = 85000--Alpha 



--Motory 

salonowePojazdy[461] = 15000--PCJ-600 
salonowePojazdy[581] = 25000--BF-400 

local salon createBlip (-1965.81,293.83,35.47-0.9,55local salon createMarker(-1965.81,293.83,34.47"cylinder"325500100) 

function onSalonHit(hitElementdim) 
if getElementType(hitElement) == "player" then 
triggerClientEvent(hitElement"pokazGUISalonu"rootsalonowePojazdyend 
end 
addEventHandler("onMarkerHit"salononSalonHitaddEvent("kupPojazdSalon"trueaddEventHandler("kupPojazdSalon"getRootElement(), 
function(idlocal cena salonowePojazdy[id] 
if cena then 
if getPlayerMoney(source) >= cena then 
local account getPlayerAccount(source) 
if account then 
local wlasciciel getAccountName(account) 
if >= getYourVehicleCount(wlascicielthen 
takePlayerMoney(sourcecenatriggerClientEvent(source"potwierdzKupnoPojazduPrywatnego"rootfadeCamera(sourcefalsesetTimer(function(sourcelocal xyzrot = -1990.31,275.77,35.17270 
local veh createVehicle(idxyzsetElementData(veh"pojazd_paliwo"50setElementData(veh"pojazd_przebieg"0local rggetVehicleColor(vehtruefadeCamera(sourcetrue) 
--<<-->> 
local query dbQuery(handler"INSERT INTO pojazdy (wlasciciel, model, x, y, z, rot, ca, cb, cc, przebieg, paliwo) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?)"wlascicielidxyzrotrgb500local resultnum_affected_rowslast_insert_id dbPoll(query, -1local rggetVehicleHeadLightColor(vehdbExec(handler"INSERT INTO tuning (id, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, paintjob, hr, hg, hb) VALUES (?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"last_insert_id"0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""3"rgb) 
--<<-->> 
setElementRotation(veh00rotustawDanePojazdu(vehlast_insert_idwlascicielwarpPedIntoVehicle(sourcevehend15001source) 
else 
outputChatBox("Mo?esz posiada? maksymalnie 2 pojazdy."source255255255trueend 
end 
else 
outputChatBox("Potrzebujesz "..cena.."Eur by kupic ten pojazd."source255255255trueend 
end 
end) 

--komenda tworzaca 
function stworzPojazdCMD(playercmdidwlasciciellocal acc getAccountName (getPlayerAccount(player)) 
if acc then 
if isObjectInACLGroup ("user."..accaclGetGroup ("Admin")) then 
if id and wlasciciel then 
local id tonumber(id) 
if id then 
if getVehicleNameFromModel(idthen 
local xygetElementPosition(playerlocal __rot getElementRotation(playerlocal veh createVehicle(idxyz) 
if veh then 
setElementData(veh"pojazd_paliwo"50) --na specjalna prosbe ;) 
setElementData(veh"pojazd_przebieg"0local rggetVehicleColor(vehtrue) 
--<<-->> 
local query dbQuery(handler"INSERT INTO pojazdy (wlasciciel, model, x, y, z, rot, ca, cb, cc, przebieg, paliwo) VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?)"wlascicielidxyzrotrgb500local resultnum_affected_rowslast_insert_id dbPoll(query, -1local rggetVehicleHeadLightColor(vehdbExec(handler"INSERT INTO tuning (id, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, paintjob, hr, hg, hb) VALUES (?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"last_insert_id"0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""0""3"rgb) 
--<<-->> 
setElementRotation(veh00rotustawDanePojazdu(vehlast_insert_idwlasciciel) 
else 
outputChatBox("Podane ID jest niepoprawne."player255255255trueend 
else 
outputChatBox("Podane ID jest niepoprawne."player255255255trueend 
end 
else 
outputChatBox("Wpisz /stworz [id-pojazdu] [wlasciciel]"player255255255trueend 
end 
end 
end 
addCommandHandler("stworz"stworzPojazdCMD
Testuj, jak nie poskutkuje wpisz /debugscript 3

I jezeli wyskocza b?edy podaj je

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 12:11


Shogo12345

LuA






Wiek: 31
Na forum: 4181 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Nie podzia?a?o sprawdzi?em debugscript i wyskoczy?y b?edy oto one

http://screenshot.sh/m8YufnQ1p6XKI

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 12:33


GabWas







Wiek: 24
Na forum: 3881 dni
Posty: 289
Nick w MP: GabWas

Piwa: 65

Respekt: 231,5
Respekt: 231,5Respekt: 231,5

Nie usun??e? "[Server]" z samej g?ry, to co si? dziwisz? :-?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 13:57


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Zmie? kodowanie pliku .lua na UTF-8

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-15, 14:18


Shogo12345

LuA






Wiek: 31
Na forum: 4181 dni
Posty: 48
Nick w MP: Artux

Piwa: 504

Respekt: 70

Ostrzeżeń: 100%
Ustawi?em kodowanie na UTF-8 I Dzia?a dzieki
Temat do zamkniecia

Postaw piwo autorowi tego posta
 

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