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

Wysłany: 2016-01-09, 17:04


Toffiaaak.







Wiek: 23
Na forum: 4410 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

Witam ponownie, spotykam sie zn?w z kolejnym b??dem u?ywaj?c funkcji isElementWithinMarker.
C-SIDE

Marker createMarker1871.1986083984, -1857.545288085913.663543701172-0.9'cylinder'2.025500150 )-- marker
function changeCarLightsColorthePlayer )
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 "/swiatlablue - Niebieskie ?wiat?a"source )
outputChatBox "/swiatlagreen - Zielone ?wiat?a"source )
end
addCommandHandler ("swiatla"changeCarLightsColor )


addEventHandler("onClientMarkerHit"Marker, function(elmd)
    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?"250250250true )
end)

function redthePlayer )
if isElementWithinMarker(thePlayerMarkerthen
    triggerServerEvent ("red"localPlayerlocalPlayer)
end
end
addCommandHandler ("swiatlared"red)

function orangethePlayer )
if isElementWithinMarker(thePlayerMarkerthen
    triggerServerEvent ("orange"localPlayerlocalPlayer)
end
end
addCommandHandler ("swiatlaorange"orange)

function bluethePlayer )
if isElementWithinMarker(thePlayerMarkerthen
    triggerServerEvent ("blue"localPlayerlocalPlayer)
end
end
addCommandHandler ("swiatlablue"blue)

function greenthePlayer )
if isElementWithinMarker(thePlayerMarkerthen
    triggerServerEvent ("green"localPlayerlocalPlayer)
end
end
addCommandHandler ("swiatlagreen"green)

S-SIDE

addEvent("red"trueaddEventHandler("red"getRootElement(), function(plr)
local theVehicle getPedOccupiedVehicle(plr)
setVehicleHeadLightColor theVehicle25500end)

addEvent("orange"trueaddEventHandler("orange"getRootElement(), function(plr)
local theVehicle getPedOccupiedVehicle(plr)
setVehicleHeadLightColor theVehicle2551650end)

addEvent("blue"trueaddEventHandler("blue"getRootElement(), function(plr)
local theVehicle getPedOccupiedVehicle(plr)
setVehicleHeadLightColor theVehicle00255end)

addEvent("green"trueaddEventHandler("green"getRootElement(), function(plr)
local theVehicle getPedOccupiedVehicle(plr)
setVehicleHeadLightColor theVehicle02550end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 17:24


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

silipek1, a s? jakie? b??dy w debugscript 3 ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 17:29


Toffiaaak.







Wiek: 23
Na forum: 4410 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

Bad argument - got boolean, co? takiego.

Podpis

Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 17:38


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

silipek1, zr?b najlepiej ss'a to b?dziemy wiedzie? wiecej.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 17:52


Toffiaaak.







Wiek: 23
Na forum: 4410 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

Zadnych ssow nie bede robic, ale przepisze ca?y b??d.
Kod:

Bad argument @ 'isElementWithinMarker' [Expected element at argument 1, got string 'swiatlared']


Ostatnio zmieniony przez Toffiaaak. 2016-01-09, 18:04, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 18:03


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

silipek1, powiem tak ty si? nie zbierz za skrypty jak ty nie wiersz ?e s? 2 strony.
Poprawny kod:

Serwer:
Marker createMarker1871.1986083984, -1857.545288085913.663543701172-0.9'cylinder'2.025500150 )-- marker
local Player getPlayer()

function changeCarLightsColor()
outputChatBox "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox "/swiatlared - Czerwone ?wiat?a" )
outputChatBox "/swiatlaorange - Pomaranczowe ?wiat?a" )
outputChatBox "/swiatlablue - Niebieskie ?wiat?a" )
outputChatBox "/swiatlagreen - Zielone ?wiat?a" )
end
addCommandHandler ("swiatla"changeCarLightsColor )


addEventHandler("onClientMarkerHit"Marker, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
    if el ~= Player then return end
    outputChatBox ("Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?"250250250true )
end)

function red()
if isElementWithinMarker(PlayerMarkerthen
    triggerServerEvent ("red"PlayerPlayer)
end
end
addCommandHandler ("swiatlared"red)

function orange()
if isElementWithinMarker(PlayerMarkerthen
    triggerServerEvent ("orange"PlayerPlayer)
end
end
addCommandHandler ("swiatlaorange"orange)

function blue()
if isElementWithinMarker(PlayerMarkerthen
    triggerServerEvent ("blue"PlayerPlayer)
end
end
addCommandHandler ("swiatlablue"blue)

function green()
if isElementWithinMarker(PlayerMarkerthen
    triggerServerEvent ("green"PlayerPlayer)
end
end
addCommandHandler ("swiatlagreen"green)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 18:08


Toffiaaak.







Wiek: 23
Na forum: 4410 dni
Posty: 128
Nick w MP: Toffy.

Piwa: 1836

Respekt: 242
Respekt: 242Respekt: 242

local Player getPlayer()

Jak wspomnia?em wy?ej, nic nie potrafisz.

Podpis

Osiągnięcia:
- wygrana w konkursie LUA (kat. średnia) - 05.02.18
- 150 reputacji - 06.02.18
- 100 postów - 06.02.18

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-09, 18:34


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Panowie spokojnie.
local Player getLocalPlayer()
Je?eli wog?le oto chodzi. Tyle, ?e to po stronie clienta ju?.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-10, 00:47


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Co wy tu? Eee?


function green(  )
if isElementWithinMarker(localPlayerMarkerthen
    triggerServerEvent ("green"localPlayerlocalPlayer)
end
end
addCommandHandler ("swiatlagreen"green)


I najlepiej nie rusza? juz tego jego triggera bo zbowu b?dzie nast?pny temat.

Postaw piwo autorowi tego posta
 

 
Tagi: iselementwithinmarker
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » isElementWithinMarker 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