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

Wysłany: 2016-01-13, 15:44


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

Witam prosi?bym o pomoc z zatrzymaniem pojazdu chodzi o to, ?e gdy klikn? np. L to pojawi si? marker z ty?u pojazdu, za pomoc respekt i browar :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 15:49


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157


local cos == true
bindKey("L","down",function()
if cos == false then
local veh getPedOccupiedVehicle(localPlayer)
local marker createMarker(0,0,0,"cylinder",1,255,0,0,255)
attachElement(marker,veh,0,0,1)
else
destroyElement(marker)
end)

Strona c-side

TESTUJ PANIE, PISANE NA SZYBKO MOG? BY? B??DY JAK B?D? PODAJ ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 15:53


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

A ?eby doda? tylko to dla radiolek ?

[ Dodano: 2016-01-13, 15:57 ]
Wywala b??d:

ERROR:Loading script failed: sd/marker.lua:1 unexpected symbol near '=='

Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 15:58


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Ale dzia?a ?

[ Dodano: 2016-01-13, 15:58 ]
local cos true
bindKey("L","down",function()
if cos == false then
local x,y,getElementPostion(localPlayer)
local veh getPedOccupiedVehicle(localPlayer)
local marker createMarker(x,y,z,"cylinder",1,255,0,0,255)
attachElement(marker,veh,0,0,1)
else
destroyElement(marker)
end)

Strona c-side


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:00


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

ERROR: Loading script failed: sd/marker.lua:9: unexpected symbol near ')'

Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:01


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

po destroyElement dodaj end

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:05


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

ERROR:Loading script failed: sd/marker.lua:9 'end' expected (to close 'function' at line 2 ) near '<eof>'

Usun??em nawas z end w 9 linijce

Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:05


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Nie mia?e? usuwa?

local cos true
bindKey("L","down",function()
if cos == false then
local x,y,getElementPostion(localPlayer)
local veh getPedOccupiedVehicle(localPlayer)
local marker createMarker(x,y,z,"cylinder",1,255,0,0,255)
attachElement(marker,veh,0,0,1)
else
destroyElement(marker)
end
end)

Strona c-side


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:07


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

Ok, naprawi?em to teraz wyskakuje
WARNING: sd/marker.lua:8: Bad argument @ 'destroyElement; [expected element at argument 1,got nil]

Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:11


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Zaraz to naprawie, jak b?d? na kompie to zobacze o co chodzi a co do policji to

local cos true
bindKey("L","down",function()
if cos == false then
local veh getPedOccupiedVehicle(localPlayer)
if (getElementModel(veh) == id wozu policji) or (getElementModel(veh) == id wozu policjithen
local x,y,getElementPostion(localPlayer)
local marker createMarker(x,y,z,"cylinder",1,255,0,0,255)
attachElement(marker,veh,0,0,1)
return end
else
destroyElement(marker)
end
end)

Strona c-side


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:15


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

WARNING: sd/marker.lua:11: Bad argument @ 'destroyElement' [Expected element at argument 1,got nill]

Wi?c czekam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:33


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

local cos true
bindKey("L","down",function()
if cos == false then
local veh getPedOccupiedVehicle(localPlayer)
if (getElementModel(veh) == id wozu policji) or (getElementModel(veh) == id wozu policjithen
local x,y,getElementPostion(localPlayer)
local marker createMarker(x,y,z,"cylinder",1,255,0,0,255)
attachElement(marker,veh,0,0,1)
return end
return end
bindKey("L","down",function()
if cos == true then
destroyElement(marker)
return end
end)
end)



Strona c-side


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:46


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

Po naci?ni?ciu L marker sie nie pojawia, a gdy klikn? drugi raz pokazuje si? to:


WARNING: sd/marker.lua:13: Bad argument @ 'destroyElement' [Expected element at argument 1,got nill]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 16:56


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

zr?bmy co? innego dajmy na?y kod na strone s-side :)



local cos true

function marker (player)
if cos false then
local veh getPedOccupiedVehicle(player)
if (getElementModel(veh) == id wozu) or (getElementModel(veh) == id wozuthen
local x,y,getElementPosition(player)
local marker createMarker(x,y,z,"arrow",2,255,0,0,255,player)
attachElements(marker,veh,0,0,2)
else return end
else
destroyElement(marker)
end
end

function cos (player)
bindKey(player,"L","down",marker)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-13, 17:01


venzikk

LUA, MODELER






Wiek: 24
Na forum: 3823 dni
Posty: 235
Nick w MP: VenZ

Piwa: 3158

Respekt: 240
Respekt: 240Respekt: 240

ERROR: Loading script failed: sd/marker.lua:5: 'then' expected near'='

Podpis



Hej
,Tak ty! Pomogłem ci? zostaw
:piwo:


Pomagam w miarę możliwości :)

Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Postaw piwo autorowi tego posta
 

 
Tagi: zatrzymanie :: pojazdu...
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