Wysłany: 2016-10-30, 18:15
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Dlaczego to nie dzia?a.
local tunetunels = createMarker ( 2145.48 ,- 2178.92 , 12.55 , "cylinder" , 4 , 255 , 255 , 255 , 30 ) -- marker
addEventHandler ( "onClientMarkerHit" , tunetunels , function( el , md )
local pobieranieauta = getPedOccupiedVehicle ( el )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if not getPedOccupiedVehicle ( el ) then return end
local id = getElementData ( el , "vehicle:id" )
outputChatBox ( "Informacja: System informacji na temat pojazdu zosta? pomy?lnie wczytany." , 255 , 255 , 0 )
end )
local t = createElement ( 'text' )
setElementData ( t , 'name' , 'Informacje dt. pojazdu\n\nID: "..id.."\nPrzebieg: test\nW?a?ciciel: test' )
setElementPosition ( t , 2151.69 , - 2182.81 , 12.55 + 0.25 )
Wysłany: 2016-10-30, 19:05
czsroka3355
Wiek: 27 Na forum: 3526 dni Posty: 20
Nick w MP: czsrk.
Wysłany: 2016-10-31, 10:06
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
pojawia si? informacja ale jest "..id.." a nie np 4
Wysłany: 2016-10-31, 10:43
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4150 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
local ? tunetunels ?=? createMarker ( 2145.48 ,- 2178.92 , 12.55 ,? "cylinder" ,? 4 ,? 255 ,? 255 ,? 255 ,? 30 )?--? marker
addEventHandler ( "onClientMarkerHit" ,? tunetunels ,?function( el ,? md )
???? local ? pobieranieauta ?=? getPedOccupiedVehicle ( el )
????if? not ? md ?or? getElementType ( el )?~=? "player" ? then ?return? end
????if? el ?~=? localPlayer ? then ?return? end
????if? not ? getPedOccupiedVehicle ( el )? then ?return? end
???? local ? id ?=? getElementData ( el , "vehicle:id" )?
???? outputChatBox ( "Informacja:?System?informacji?na?temat?pojazdu?zosta??pomy?lnie?wczytany." ,? 255 ,? 255 ,? 0 )?
end )
local ? t = createElement ( 'text' )
setElementData ( t , 'name' , "Informacje?dt.?pojazdu\n\nID:?" .. id .. "\nPrzebieg:?test\nW?a?ciciel:?test" )
setElementPosition ( t , 2151.69 ,?- 2182.81 ,? 12.55 + 0.25 )
Wysłany: 2016-10-31, 10:46
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Aidis , poniewa? to nie ma prawa dzia?a?.
zobacz taki kod:
local tunetunels = createMarker ( 2145.48 ,- 2178.92 , 12.55 , "cylinder" , 4 , 255 , 255 , 255 , 30 ) -- marker
local t = createElement ( 'text' )
setElementPosition ( t , 2151.69 , - 2182.81 , 12.55 + 0.25 )
setElementData ( t , "name" , "Informacje dt. pojazdu\n\nID: nA\nPrzebieg: nA\nW?a?ciciel: nA" )
addEventHandler ( "onClientMarkerHit" , tunetunels , function( el , md )
local pobieranieauta = getPedOccupiedVehicle ( el )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if not getPedOccupiedVehicle ( el ) then return end
local id = getElementData ( el , "vehicle:id" )
outputChatBox ( "Informacja: System informacji na temat pojazdu zosta? pomy?lnie wczytany." , 255 , 255 , 0 )
setElementData ( t , "name" , "Informacje dt. pojazdu\nID: " .. id .. "\nPrzebieg: 0\nW?a?ciciel: " .. getPlayerName ( el ) )
end )
addEventHandler ( "onClientRender" , getRootElement (),
function ()
local screenWidth , screenHeight = guiGetScreenSize ( )
local x , y , = getScreenFromWorldPosition ( getElementPosition ( t ))
local text = getElementData ( t , "name" )
dxDrawText ( text , x , y , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), scale , "pricedown" )
end
)
Wysłany: 2016-10-31, 13:05
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
luki
SCRIPT ERROR: [skrypty_glowne]/og-tuning/s_informacje.lua:28: '<name>' expected near '='
ERROR: Loading script failed: [skrypty_glowne]/og-tuning/s_informacje.lua:28: '<name>' expected near '='
Wysłany: 2016-10-31, 13:18
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Aidis , mo?e podasz linijke kt?ra to jest bo tutaj nie ma 28 linijek kole?.
Wysłany: 2016-10-31, 13:21
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Wysłany: 2016-10-31, 20:13
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Aidis , local tunetunels = createMarker ( 2145.48 ,- 2178.92 , 12.55 , "cylinder" , 4 , 255 , 255 , 255 , 30 ) -- marker
local t = createElement ( 'text' )
setElementPosition ( t , 2151.69 , - 2182.81 , 12.55 + 0.25 )
setElementData ( t , "name" , "Informacje dt. pojazdu\n\nID: nA\nPrzebieg: nA\nW?a?ciciel: nA" )
addEventHandler ( "onClientMarkerHit" , tunetunels , function( el , md )
local pobieranieauta = getPedOccupiedVehicle ( el )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
local pojazd = getPedOccupiedVehicle ( el )
if not pojazd then return end
local id = getElementData ( pojazd , "vehicle:id" )
outputChatBox ( "Informacja: System informacji na temat pojazdu zosta? pomy?lnie wczytany." , 255 , 255 , 0 )
setElementData ( t , "name" , "Informacje dt. pojazdu\nID: " .. id .. "\nPrzebieg: 0\nW?a?ciciel: " .. getPlayerName ( el ) )
end )
addEventHandler ( "onClientRender" , getRootElement (),
function ()
local screenWidth , screenHeight = guiGetScreenSize ( )
local x , y = getScreenFromWorldPosition ( getElementPosition ( t ))
local text = getElementData ( t , "name" )
dxDrawText ( text , x , y , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1 , "pricedown" )
end
)
Wysłany: 2016-10-31, 22:13
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
nadal nie zmienia nA na id i wlasciciela
Wysłany: 2016-11-02, 11:28
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Aidis , a co teraz si? dzieje ?
Wysłany: 2016-11-02, 16:31
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
nadal nie zmienia nA na id i wlasciciela
Wysłany: 2016-11-02, 17:20
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Aidis , co dzia?a...
[ Dodano : 2016-11-02, 17:21 ]
Sprawd? czy pojazd ma ID nadane.
Wysłany: 2016-11-02, 18:19
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Tagi: informacje :: pojeździe.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: