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

Wysłany: 2014-10-11, 16:41


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

mam taki kod :
marker createMarker(-99.816658020021107.872680664119.7421875'cylinder'2.0255255255150) 

function fix()
   local theVehicle getPedOccupiedVehicle (playerSource)
    if theVehicle and getVehicleController theVehicle ) == playerSource then
         fixVehicle (theVehicle)
         outputChatBox ("Pojazd zosta? naprawiony!" thePlayer)
    end
end
        addEventHandler "onMarkerHit"markercreatevehicle)






z internetu i oco tu chodzi nie tworzy marekera

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 16:48


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

marker musi si? tworzy? w tej pozycji: -99.81665802002, 1107.8726806641, 19.7421875

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 16:53


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

i sie tam nie tworzy

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 17:04


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

A po jakiej stronie da?e? skrypt? Client czy Server? Bo t? funkcj? musisz zastosowa? po stronie servera.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 17:33


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

server

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-11, 17:57


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

Z tego co wiem to po wjechaniu ma si? aktywowa? funkcja tak?
musi by? tak:
Kod:

addEventHandler ( "onMarkerHit", marker, fix)


A dlaczego nie tworzy markera to nie mam poj?cia xD

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 01:37


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

A, spr?buj da? Client'a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-12, 09:06


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

Je?eli zmieni na client to kod musi wygl?da? troch? inaczej

( sprawdza?em kod u siebie, dzia?a )


Je?eli chcesz mie? w Client:
marker createMarker(-99.816658020021107.872680664119.7421875"cylinder"2.0255255255150) 

function fix()
   local theVehicle getPedOccupiedVehicle (getLocalPlayer())
    if theVehicle and getVehicleController theVehicle ) == getLocalPlayer() then
         fixVehicle (theVehicle)
         outputChatBox ("Pojazd zosta? naprawiony!")
    end
end
addEventHandler "onClientMarkerHit"markerfix)


A tu je?eli w Server:
marker createMarker(-99.816658020021107.872680664119.7421875'cylinder'2.0255255255150) 

function fix(playerSource)
   local theVehicle getPedOccupiedVehicle(playerSource)
    if theVehicle and getVehicleController(theVehicle) == playerSource then
         fixVehicle (theVehicle)
         outputChatBox ("Pojazd zosta? naprawiony!" thePlayer)
    end
end
addEventHandler "onMarkerHit"markerfix)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-14, 17:02


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

NO ok , a jak tera da,c aby zabiera?o jeszcze 150$??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-14, 18:03


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

marker createMarker(-99.816658020021107.872680664119.7421875'cylinder'2.0255255255150) 

function fix(playerSourcelocal theVehicle getPedOccupiedVehicle(playerSource) 
if theVehicle and getVehicleController(theVehicle) == playerSource then 
fixVehicle (theVehicleoutputChatBox ("Pojazd zosta? naprawiony!" thePlayertakePlayerMoney source150 )
end
 end
 addEventHandler "onMarkerHit"markerfix)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-14, 18:29


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

marker sie nie tworzy !

[ Dodano: 2014-10-14, 18:44 ]
ok , marker sie tworzy , ale nie fixa auta

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-14, 23:06


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Zamiast fixVehicle spr?buj da? to:
setElementHealth theVehicle1000 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-15, 14:01


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

dalej nic , a to ma byc po CLIENT czy SERVER ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-15, 14:11


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Server

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-15, 14:20


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

juz dziala , nie musi byc server mi dziala client

Postaw piwo autorowi tego posta
 

 
Tagi: funkcja :: marker
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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