Wysłany: 2016-01-08, 23:56
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
Witam ponownie, tym razem postanowi?em sobie system do zmiany ?wiatelek napisa?, na te chwile jest na komendy poniewa? nie problem to przenie?? do jakiego? gui.
Server:
addEvent ( "red" , true )
addEventHandler ( "red" , getRootElement (), function()
setVehicleHeadLightColor ( theVehicle , 255 , 0 , 0 )
end )
Client:
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
function red ( thePlayer )
triggerServerEvent ( "red" , thePlayer )
end
addCommandHandler ( "swiatlared" , red )
Problem w tym ?e wywala mi w w debugu b??d ze stringiem "swiatlared", licz? na pomoc.
Wysłany: 2016-01-09, 01:28
Emm
***** ***
Wiek: 32 Na forum: 3880 dni Posty: 3191
Nick w MP: Emm
Piwa : 6162
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
addEvent ( "red" ,? true )?
addEventHandler ( "red" ,? getRootElement (),?function( plr )
local theVehicle = getPedOccupiedVehicle ( plr )
setVehicleHeadLightColor ?(? theVehicle ,? 255 ,? 0 ,? 0 )?
end )
Wysłany: 2016-01-09, 11:31
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
Teraz wywala bad argument z tym:
triggerServerEvent ( "red" , thePlayer )
Podpis
Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18
Wysłany: 2016-01-09, 11:52
DamianGames
Wiek: 23 Na forum: 3946 dni Posty: 75
Piwa : 521
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
addCommandHandler ( "swiatlared" , red )
S-Side nie potrzebny usu? go.
Wysłany: 2016-01-09, 13:36
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
No dobra, mam takie co? i nawet je?li jestem w pojezdzie to pisze mi ze nie jestem + wyskakuje b??d z ustawianiem ?wiate? (setVehicleHeadLightColor)
function red ( thePlayer )
local theVehicle = getPedOccupiedVehicle ( thePlayer )
if ( not theVehicle ) then
return outputChatBox ( "Nie jeste? w poje?dzie!" , source )
end
end
setVehicleHeadLightColor ( theVehicle , 255 , 0 , 0 )
addCommandHandler ( "swiatlared" , red )
Podpis
Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18
Wysłany: 2016-01-09, 13:37
Artysta
Lua, Lua, Czekolada
Wiek: 28 Na forum: 4466 dni Posty: 240
Nick w MP: Artysta/Koojot
Piwa : 1427
"DamianGames" napisał/a :
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
addCommandHandler ( "swiatlared" , red )
S-Side nie potrzebny usu? go.
S-side jest potrzebny, inaczej tylko TYYYYYY b?dziesz widzie? zmienione ?wiat?a.
Podpis
Something is coming..
Wysłany: 2016-01-09, 13:40
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
No dobra, S-side:
addEvent ( "red" , true )
addEventHandler ( "red" , getRootElement (), function( plr )
local theVehicle = getPedOccupiedVehicle ( plr )
setVehicleHeadLightColor ( theVehicle , 255 , 0 , 0 )
end )
C-side
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
function red ( thePlayer )
triggerServerEvent ( "red" , thePlayer )
end
addCommandHandler ( "swiatlared" , red )
Podpis
Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18
Wysłany: 2016-01-09, 14:50
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
function red ( thePlayer )
triggerServerEvent ( "red" , localPlayer , localPlayer )
end
addCommandHandler ( "swiatlared" , red )
Podmie? c-side na to
Podpis
Jedyny kontakt ze mną to PW forum
Kod:
local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Wysłany: 2016-01-09, 16:34
Toffiaaak.
Wiek: 23 Na forum: 4410 dni Posty: 128
Nick w MP: Toffy.
Piwa : 1836
"Jurandovsky" napisał/a :
Marker = createMarker ( 1871.1986083984 , - 1857.5452880859 , 13.663543701172 - 0.9 , 'cylinder' , 2.0 , 255 , 0 , 0 , 150 )-- marker
function changeCarLightsColor ( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a" , source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a" , source )
outputChatBox ( "/swiatlablack - Czarne ?wiat?a" , source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a" , source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a" , source )
end
addCommandHandler ( "swiatla" , changeCarLightsColor )
addEventHandler ( "onClientMarkerHit" , Marker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?" , 250 , 250 , 250 , true )
end )
function red ( thePlayer )
triggerServerEvent ( "red" , localPlayer , localPlayer )
end
addCommandHandler ( "swiatlared" , red )
Podmie? c-side na to
Dzieki, do zamkniecia.
Tagi: zmiana :: światełek :: pojezdzie.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: