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

Wysłany: 2014-11-20, 15:58


Dixers

No-Life






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

Piwa: 412

Respekt: 56,8

Witam. Tak jak w temacie. Przypomnicie mi jak si? robi?o aby danego binda m?g? u?y? kierowca?

Jak komu? si? chce to mo?e mi zrobi? :P


addEventHandler("onPlayerVehicleEnter"root, function(pojazd)
    if auta[getElementModel(pojazd)] then
    bindKey(source"1""down"dzwieksource)
    end
end)



Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-20, 16:07


karolek110199

Programista LUA/PAWN






Wiek: 28
Na forum: 5400 dni
Posty: 54

Piwa: 160

Respekt: 92

Mo?e spr?buj getVehicleOccupant

if getVehicleOccupant(pojazd0) == source


Po za tym onPlayerVehicleEnter zwraca:
- theVehicle: A vehicle element representing the vehicle that was entered
- seat: An integer representing the seat in which the player is entering
- jacked: A player element representing a player who has been jacked

Poczytaj sobie wiki.

addEventHandler("onPlayerVehicleEnter"root, function(pojazdseat)
    if auta[getElementModel(pojazd)] then
     if seat == 0 then
      bindKey(source"1""down"dzwieksource)
     end
    end
end)


Podpis
Pomogłem Ci,
? Daj odetchnąć i postaw piwko ;)
Ostatnio zmieniony przez karolek110199 2014-11-20, 16:08, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-20, 16:08


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

lub wystarczy if seat == 0 then :)

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: bind :: dla :: kierowcy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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