Wysłany: 2021-01-28, 22:33
NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Witam, mam problem z Timerem. Mianowicie nie dzia?a mi do konca fadeCamera poniewaz wykrywa z?y argument.
Linijka B??du:
Kod: /rpg_jobTest/s.lua:80: Bad argument @ 'fadeCamera' [Expected element at argument 1, got nil]
Kod kt?rego u?ywam:
addEvent ( "KradziezAutPoziomI" , true )
addEventHandler ( "KradziezAutPoziomI" , root ,function()
level = getElementData ( source , "level" ) or 0
prawko = getElementData ( source , "prawko_c" ) or 0
przejazdy = getElementData ( source , "pLawety" ) or 0
if prawko == 0 then
exports . ad_notifications : addNotification ( source , "Nie posiadasz prawa jazdy kategorii C." , "error" )
return
end
if level < 30 then
exports . ad_notifications : addNotification ( source , "Aby pracowa? w tej pracy musisz posiada? minimum 30 poziom!" , "error" )
else
fadeCamera ( source , false )
setElementData ( source , "pracuje:zlodziej" , true )
setElementData ( source , "pozycja:zlodziej" , 1 )
setElementData ( source , "zlodziej:poziom" , 1 )
exports . ad_notifications : addNotification ( source , "Kradniesz pojazd.." , "info" )
notes = math . random ( 1 , #PojazdyZwykle )
pojazd [ source ] = createVehicle ( PojazdyZwykle [ notes ][ 1 ], PojazdyZwykle [ notes ][ 2 ], PojazdyZwykle [ notes ][ 3 ], PojazdyZwykle [ notes ][ 4 ], PojazdyZwykle [ notes ][ 5 ], PojazdyZwykle [ notes ][ 6 ], PojazdyZwykle [ notes ][ 7 ])
setVehiclePlateText ( pojazd [ source ], "ZLODZIEJ" )
setElementData ( pojazd [ source ], "nametag" , "Z?odziej\nPOZIOM: #3388ffI" )
warpPedIntoVehicle ( source , pojazd [ source ], 0 )
triggerClientEvent ( source , "zlodziej:cel" , source )
triggerClientEvent ( "kolizjaPojazd" , source , pojazd [ source ])
setTimer (function ()
fadeCamera ( source , true )
exports . ad_notifications : addNotification ( source , "Uda?o Ci si? ukra?? samoch?d!" , "success" )
end , 3500 , 1 )
end
end )
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Wysłany: 2021-01-28, 23:20
MrVip615
witam
Wiek: 22 Na forum: 4307 dni Posty: 167
Nick w MP: ramzes
Piwa : 207
addEvent ( "KradziezAutPoziomI" , true )
addEventHandler ( "KradziezAutPoziomI" , root ,function()
level = getElementData ( source , "level" ) or 0
prawko = getElementData ( source , "prawko_c" ) or 0
przejazdy = getElementData ( source , "pLawety" ) or 0
if prawko == 0 then
exports . ad_notifications : addNotification ( source , "Nie posiadasz prawa jazdy kategorii C." , "error" )
return
end
if level < 30 then
exports . ad_notifications : addNotification ( source , "Aby pracowa? w tej pracy musisz posiada? minimum 30 poziom!" , "error" )
else
fadeCamera ( source , false )
setElementData ( source , "pracuje:zlodziej" , true )
setElementData ( source , "pozycja:zlodziej" , 1 )
setElementData ( source , "zlodziej:poziom" , 1 )
exports . ad_notifications : addNotification ( source , "Kradniesz pojazd.." , "info" )
notes = math . random ( 1 , #PojazdyZwykle )
pojazd [ source ] = createVehicle ( PojazdyZwykle [ notes ][ 1 ], PojazdyZwykle [ notes ][ 2 ], PojazdyZwykle [ notes ][ 3 ], PojazdyZwykle [ notes ][ 4 ], PojazdyZwykle [ notes ][ 5 ], PojazdyZwykle [ notes ][ 6 ], PojazdyZwykle [ notes ][ 7 ])
setVehiclePlateText ( pojazd [ source ], "ZLODZIEJ" )
setElementData ( pojazd [ source ], "nametag" , "Z?odziej\nPOZIOM: #3388ffI" )
warpPedIntoVehicle ( source , pojazd [ source ], 0 )
triggerClientEvent ( source , "zlodziej:cel" , source )
triggerClientEvent ( "kolizjaPojazd" , source , pojazd [ source ])
plr = source
setTimer (function ()
fadeCamera ( plr , true )
exports . ad_notifications : addNotification ( plr , "Uda?o Ci si? ukra?? samoch?d!" , "success" )
end , 3500 , 1 )
end
end )
Tagi: argument :: timerze
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: