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

Wysłany: 2017-06-10, 20:15


Pemo97







Wiek: 26
Na forum: 3822 dni
Posty: 49

Piwa: 3

Respekt: 45,3

Witam, mam skrypt CL-TuningMechaniczny i poprostu polega na tym, ?e daje mk1,mk2 i mk3 lecz tak nie jest. Zabiera pieni?dze a tego nie daje. Wpis w konsoli:
[2017-06-10 20] ERROR: CL-TuningMechaniczny/TuningMechaniczny_s.lua:52: exports: Call to non-running server resource (1) [string "?"]


server
 mk1 100000
mk2 150000
rh 50000
maskowanie 375000

local licz = {}
local t=createElement('text')
setElementData(t,'name','.createYourWorld\nTuning mechaniczny')
setElementPosition(t,100.85, -191.721.61+0.5)

local t=createElement('text')
setElementData(t,'name','.createYourWorld\nTutaj powstaje stanowisko\ntuningu wizualnego!')
setElementPosition(t,100.00, -156.242.60+0.5)

addEvent("mk1"true)
addEventHandler("mk1"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk1)) then
  local id getElementData(pojazd"vehicle:id")
  exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET um1=1 WHERE id=?"id)
  exports["1"]:outputNotificationBox (source"#00ff00Pomy?lnie zamontowano #00ccccFiltr sto?kowy#00cc00. Oddaj auto do przecho aby zobaczy? efekty!"source,true) 
         takePlayerMoneysourcemk1 )
    else
  exports["1"]:outputNotificationBox (source"#ff0000Masz za ma?o pieni?dzy, ?eby kupi? Filtr sto?kowy!"end
end
)

addEvent("mk2"true)
addEventHandler("mk2"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk2)) then
  local id getElementData(pojazd"vehicle:id")
  exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET um2=1 WHERE id=?"id)
  exports["1"]:outputNotificationBox (source"#00ff00Pomy?lnie zamontowano #00ccccBiTurbo#00cc00. Oddaj auto do przecho aby zobaczy? efekty!")
     takePlayerMoneysourcemk2 )
  else
  exports["1"]:outputNotificationBox (source"#ff0000Masz za ma?o pieni?dzy, ?eby kupi? BiTurbo!"end
end
)

addEvent("rh"true)
addEventHandler("rh"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(rh)) then
  local id getElementData(pojazd"vehicle:id")
  exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET um=3 WHERE id=?"id)
  exports["1"]:outputNotificationBox (source"#00ff00Pomy?lnie zamontowano #00ccccZawieszenie pneumatyczne#00cc00. Oddaj auto do przecho aby zobaczy? efekty!")
     takePlayerMoneysourcerh)
  else
  exports["1"]:outputNotificationBox (source"#ff0000Masz za ma?o pieni?dzy, ?eby kupi? Zawieszenie pneumatyczne")
end
end
)

addEvent("naped"true)
addEventHandler("naped"getRootElement(), function()
local hajs getPlayerMoney(source)
local ccar getPedOccupiedVehicle(source)
if not ccar then outputChatBox("Musisz by? w poje?dzie"source255255255) return end
if getElementData(plr"player:organization") ~= "Good Workshop" then outputChatBox("* Aby u?y? tej komendy, musisz nale?e? do organizacji Good Workshop!"source255255255) return end
if hajs 90000 then outputChatBox("* Nie masz tyle pieni?dzy! :c"source255255255) return end
local id getElementData(ccar"vehicle:id")
if not id then return end
local qr exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND naped=?",getElementData(ccar"vehicle:id"), "1")
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
--exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE ownedPlayer=? AND id=?"getElementData(source"player:uid"), getElementData(ccar"vehicle:id"))
exports["ogrpg-vehicles"]:onSaveVehicle(ccar)
destroyElement(ccar)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?","MONTAZ NAPEDU"id)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE id=?"id)
outputChatBox("Monta? nap?du 4x4 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni"source255255255)
takePlayerMoney(source90000)
end)


client:
GUIEditor = {
    button = {},
    window = {}
}

addEventHandler("onClientResourceStart"resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(638207435484"Montowanie Uk?adu Mechanicznego"false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.83)

        GUIEditor.button[1] = guiCreateButton(1013724291"Filtr sto?kowy\n100,000 PLN"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[1], "NormalTextColour""FF05FE00")

        GUIEditor.button[2] = guiCreateButton(10015524390"BiTurbo\n150,000 PLN"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[2], "NormalTextColour""FF05FE00")

        GUIEditor.button[3] = guiCreateButton(9927224485"Zawieszenie pneumatyczne\n50,000 PLN"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[3], "NormalTextColour""FF05FE00")
       
        GUIEditor.button[8] = guiCreateButton(9837524584"Zamknij\nOkno"falseGUIEditor.window[1])
        guiSetProperty(GUIEditor.button[8], "NormalTextColour""FFFD0000")    
    end
)

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiSetVisible(GUIEditor.window[1],false)
end
)

marker createMarker(100.85, -191.721.61-1.2'cylinder'3.50,125,255125)
createBlip(100.83, -192.211.6126,2,255,0,0,255,0,100)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayerthen return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(pojazd,true)
end
addEventHandler("onClientMarkerHit"markerhit)

function hit(plr,md)
if plr ~= localPlayer then return end
if not isPedInVehicle(localPlayerthen return end
guiSetVisible(GUIEditor.window[1], true)
showCursor(true)
setElementFrozen(pojazd,true)
end
addEventHandler("onClientMarkerHit"marker2hit)

function mk1()
if source ~= GUIEditor.button[1then return end
    triggerServerEvent("mk1"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootmk1)


function mk2()
if source ~= GUIEditor.button[2then return end
    triggerServerEvent("mk2"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootmk2)

function rh()
if source ~= GUIEditor.button[3then return end
    triggerServerEvent("rh"localPlayer)
    guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
setElementFrozen(pojazd,false)
end

addEventHandler "onClientGUIClick"rootrh)

function zamknij()
if source ~= GUIEditor.button[8then return end
   guiSetVisible(GUIEditor.window[1], localPlayer)
   setElementFrozen(pojazd,false)
end
addEventHandler "onClientGUIClick"rootzamknij)

function zamykamy()
if source ~= GUIEditor.button[8then return end
guiSetVisible(GUIEditor.window[1],false)
setElementFrozen(pojazd,false)
setElementFrozen(plr,false)
showCursor(false)
end

addEventHandler "onClientGUIClick"rootzamykamy)


Komentarz BlackGamePL dodany 2017-06-10, 21:02Zmieniono znaczniki code na [.lua] [./lua]. Na przyszłość do kodów LUA proszę ich stosować (oczywiście bez kropek)
Ostatnio zmieniony przez Dexnes_ 2017-06-10, 21:01, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
konrado35
Wysłany: 2017-06-10, 20:27


PapaSmerf







Wiek: 25
Na forum: 3525 dni
Posty: 237

Piwa: 3857

Respekt: 64

No nie masz skryptu na notyfikacje ;=;
exports["1"]:outputNotificationBox (source"#00ff00Pomy?lnie zamontowano #00ccccZawieszenie pneumatyczne#00cc00. Oddaj auto do przecho aby zobaczy? efekty!"


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-10, 20:40


Pemo97







Wiek: 26
Na forum: 3822 dni
Posty: 49

Piwa: 3

Respekt: 45,3

Wgra?em na serwer i dalej to samo..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-10, 20:57


Dexnes_

Tiger






Wiek: 26
Na forum: 4401 dni
Posty: 620
Nick w MP: Dexnes

Piwa: 1394

Respekt: 390
Respekt: 390Respekt: 390Respekt: 390Respekt: 390

Pemo97, Czy ten skrypt jest w??czony i nosi nazw? "1" ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-10, 22:16


PapaSmerf







Wiek: 25
Na forum: 3525 dni
Posty: 237

Piwa: 3857

Respekt: 64

"BlackGamePL" napisał/a:

Pemo97, Czy ten skrypt jest w??czony i nosi nazw? "1" ?


1 to nazwa tych notyfikacji ;)

Komentarz BlackGamePL dodany 2017-06-11, 11:55Tak, ja o to właśnie pytałem :)
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-10, 23:31


Pemo97







Wiek: 26
Na forum: 3822 dni
Posty: 49

Piwa: 3

Respekt: 45,3

Tak zmieni?em nazwe, kolejny b??d:
[2017-06-10 23:30] ERROR: CL-TuningMechaniczny/TuningMechaniczny_s.lua:22: call: failed to call '1:outputNotificationBox' [string "?"]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-10, 23:37


PapaSmerf







Wiek: 25
Na forum: 3525 dni
Posty: 237

Piwa: 3857

Respekt: 64

no nie mo?e sie z tym polaczyc w ogole masz to wgrane czy tylko nazwe se dales.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-11, 09:06


Pemo97







Wiek: 26
Na forum: 3822 dni
Posty: 49

Piwa: 3

Respekt: 45,3

jest wgrane

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-11, 09:29


ExtreM

Profesjonalny Mapper






Wiek: 33
Na forum: 3478 dni
Posty: 104
Nick w MP: ExtreM

Piwa: 462

Respekt: 86,8

Czy przypadkiem MTA nie czyta skrypt?w cyframi ?

Podpis
Discord : ExtreM#7905

Wykonuję profesjonalne mapy/interiory/exteriory na zamówienie!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-11, 10:59


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Poka? kod i met? tych notyfikacji

Postaw piwo autorowi tego posta
 

 
Tagi: tuning :: mechaniczny
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