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

Wysłany: 2020-07-09, 20:42


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

Witam pom?g?by kto? naprawi? ten b??d?

c_side:122/attempt to index field '?' (a nil value)

c_side

local screenWscreenH guiGetScreenSize() 

local marker createMarker(-1549.86,1064.60,7.19-0.9"cylinder"1.2255170060) 
--setElementData(marker"marker:icon""system") 
--local oznaczeniePracy createBlip(-2355.18,-2866.83,1.9746,225500,255,0,500local jobTarget
jobTarget 0

local px,py = (screenW/1920),(screenH/1080)
local zoom 1
local fh 1920
if screenW fh then
 zoom math.min(2,fh/screenW)
end

addEventHandler("onClientMarkerHit"marker, function(h)
local _,_,getElementPosition(localPlayer)
local _,_,z2 getElementPosition(source)
if z2+1 then return end
if ~= localPlayer then return end 
if  isPedInVehicle(localPlayerthen return end 
setElementData(localPlayer"prawko:gui"trueshowCursor(trueend) 

function isMouseIn xywidthheight ) 
if ( not isCursorShowing( ) ) then 
return false 
end 
local sxsy guiGetScreenSize ( ) 
local cxcy getCursorPosition ( ) 
local cxcy = ( cx sx ), ( cy sy ) 
if ( cx >= and cx <= width ) and ( cy >= and cy <= height then 
return true 
else 
return false 
end 
end 


strona "start" 

function gui() 
if not getElementData(localPlayer"prawko:gui") == true then return end 
if strona == "start" then
        dxDrawRectangle(screenW 0.3927screenH 0.2722screenW 0.2146screenH 0.4565tocolor(000105), false)
        -- przejdz dalej
        dxDrawRectangle(screenW 0.4042screenH 0.6324screenW 0.1891screenH 0.0481tocolor(239253196105), false)
        -- zamknij okno
        dxDrawRectangle(screenW 0.6073screenH 0.2722screenW 0.0203screenH 0.0389tocolor(172251211105), false)        
        dxDrawText("Rozpocznij egzamin Kat. B"screenW 0.4047screenH 0.6315screenW 0.5932screenH 0.6806tocolor(255255255255), 1.00"default-bold""center""center"falsefalsefalsefalsefalse)
        dxDrawText("Witaj w sekcji prawa jazdy"screenW 0.3927screenH 0.2713screenW 0.6073screenH 0.3519tocolor(255255255255), 1.50"default-bold""center""center"falsefalsefalsefalsefalse)
end 
end



addEventHandler("onClientRender"rootguibindKey("mouse1""down", function() 
if getElementData(localPlayer"prawko:gui") == true then 
if isMouseIn(screenW 0.4042screenH 0.6324screenW 0.1891screenH 0.0481) and strona == "start" then 
setElementData(localPlayer"prawko:gui"false)
showCursor(false)
triggerServerEvent("prawko:katb"localPlayer)    
end
if isMouseIn(screenW 0.6073screenH 0.2722screenW 0.0203screenH 0.0389) and strona == "start" then 
setElementData(localPlayer"prawko:gui"false)
showCursor(false)
end 
end
end)
 


function zakonczevent()
    if markerCel and isElement(markerCelthen
        destroyElement(markerCel)
        markerCel nil
    end
    if jobTarget and isElement(jobTargetthen
        destroyElement(jobTarget)
        jobTarget nil
        jobTarget 0
    end
    triggerServerEvent("usun:katb"localPlayer)         
end

 local point = {
{-1560.80,1060.93,7.19},
{-1563.92,1068.95,7.19},
{-1569.64,1087.48,7.19},
{-1572.31,1121.62,7.19},
{-1564.44,1131.00,7.19},
} 
  
addEvent("listonosz:cm"true)
addEventHandler("listonosz:cm"root, function()
  stworzMarker()
end)

addEvent("konczymyevent:git"true)
addEventHandler("konczymyevent:git"root, function()
        destroyElement(markerCel)
        destroyElement(jobTarget)
        destroyElement(BlipCel)    
end)

function CreateCheckPoint()
if isElement(markerCelthen
  destroyElement(markerCel)
  destroyElement(BlipCel)
  end
    
    if jobTarget == #point then    
    zakonczevent()
    triggerEvent("onClientAddNotification"localPlayer"end !""success")             
    end
   jobTarget jobTarget 1
  markerCel createMarker(point[jobTarget][1],  point[jobTarget][2],  point[jobTarget][3], "checkpoint"22551600)
  BlipCel createBlipAttachedTo(markerCel41)
    if point[jobTarget+1then
        ile point[jobTarget+1]
        ile2 ile[1]
        ile3 ile[2]
        ile4 ile[3]        
        setMarkerTarget(markerCelile[1], ile[2], ile[3])
    end 
   addEventHandler("onClientMarkerHit"markerCel, function() 
   CreateCheckPoint()
endend

addEvent("rozpocznij:prawkob"true)
addEventHandler("rozpocznij:prawkob"root, function()
    CreateCheckPoint()
end)

Nie czaj? co mam ?le :( Marker wszystko si? tworzy itd

Podpis
amta
Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-07-09, 20:50


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

kt?ra to 122 linijka?

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Pyrek24
Wysłany: 2020-07-09, 21:09


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

Tutaj
  BlipCel createBlipAttachedTo(markerCel41


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-07-09, 21:23


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Marker na pewno zosta? stworzony? Mo?e by? tak ,?e linijka createMarker napotka?? jaki? k?opot markera nie utworzono i dalej kod te? si? posypie

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Pyrek24
Wysłany: 2020-07-09, 22:31


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

No marker tworzy bez problemu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-07-09, 23:17


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3061 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

sk?d pobierasz ,,jobTarget"?

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Pyrek24
Wysłany: 2020-07-10, 00:31


Pyrek24







Wiek: 25
Na forum: 3438 dni
Posty: 546
Nick w MP: Pyrek

Piwa: 10

Respekt: 50

Panowie dzi?ki za pomoc ju? ogarn??em

Postaw piwo autorowi tego posta
 

 
Tagi: index :: field
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