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

Wysłany: 2016-05-26, 20:16


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam! Mam problem co tu jest zle ??


local vagossm createMarker(2816.4621582031, -1179.024902343824.5703125,"cylinder",2,255,255,0,150)

function pokazGUI (player)
    triggerClientEvent(player,"GUIpokaz",root)
end
addEventHandler("onMarkerHit",vagossmpokazGUI)

addEvent("wybierzAuto",true)
addEventHandler("wybierzAuto",root,
    function (playerpojazdcena)
        local id getVehicleIDFromName(pojazd)
        if id then
            if cena then
                if getPlayerMoney(player) >= cena then
                    createVehicle(id,2816.6965332031, -1186.143432617224.6507415771480.28364619612694, -0.15379227697849270.06030273438)
                    warpPlayerIntoVehicle(player,id)
                    takePlayerMoney(player,cena)
                else
                    outputChatBox("Potrzebujesz "..cena..", aby kupi? "..id..".",player)
                end
            end
        end
    end
)

S-SIDE

db3: http://www.wrzucajtu.pl/w...26_20-15-27.png

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-05-26, 21:55


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen,warpPlayerIntoVehicle drugi argument jest pojazdem a nie number czy string.
Zdefiniuj createVehicle zmienna a potem j? u?yj w 2 argumencie warpPlayerIntoVehicle.


Więcej informacji znajdziesz w Wikipedii MTA:

warpPlayerIntoVehicle


[ Dodano: 2016-05-26, 21:58 ]
PS: zamiast getVehicleIDFromName u?ywa si? getVehicleModelFromName.
Poniewa? getVehicleIDFromName jest to stara funkcja.


Więcej informacji znajdziesz w Wikipedii MTA:

getVehicleIDFromName


Więcej informacji znajdziesz w Wikipedii MTA:

getVehicleModelFromName


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-05-27, 16:45


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Ale b?ad wywala z linijka gdzie jest getPlayerMoney > cena

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-05-27, 17:40


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

BlackTen,
 if tonumber(getPlayerMoney(player)) >= tonumber(cenathen


Postaw piwo autorowi tego posta
 

 
Tagi: jest :: zle?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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