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

Wysłany: 2016-07-28, 22:30


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

witam, nie dzia?a mi ta linijka:

bindKey(localPlayer, "b", "down", function(el, md)

w db3 pisze - (bad argument expected player argument ;/)

prosz? o naprowadzenie, nie o gotowiec.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:36


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

FaydenFX., localPlayer nie ma po stronie server.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:37


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

Z innymi te? nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:42


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

FaydenFX., podaj kod gdzie to u?ywasz to ci powiem co jest nie tak.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:44


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

bindKey("space","down", function(elmd)
    if isElementWithinMarker(elm1then
    if getElementData(el"zrespilGracz"then
        return
    end
    if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(elthen return end
    local x,y,getElementPosition(el)
    fadeCamera(el,false)
    setTimer(function()
    fadeCamera(el,true)
    local mower createVehicle(572736.50,-1262.93,13.66,0.0360.0269.9)
    local mocuj 40.0
    setVehicleHandling(mower"engineAcceleration"mocuj)
    setVehicleHandling(mower"maxVelocity"80.0)
    setElementData(mower"zrespilGracz"el)
    setElementData(mower"paliwo"100)
    addVehicleUpgrade(mower1025)
    setElementData(mower"opis","Praca dorywcza")
    warpPedIntoVehicle(elmower)
    removePreviousVehicles(el)
    triggerClientEvent(el"startKoszenie"resourceRootmower)
    vehs[el] = mower
    end19001)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:51


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

FaydenFX., serwer ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:53


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

ta

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 22:59


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

FaydenFX., a wi?c tak funkcja bindKey zwraca:
function functionName player keyPresserstring keystring keyState, [ var arguments, ... ] )

a nie jakie? plr, md
local marker = ...
function BindKeys plrkeykeyState)
    if isElementWithinMarker(plrmarkerthen
    if getElementData(plr"zrespilGracz"then
        return
    end
    if not md or getElementType(plr) ~= "player" or getPedOccupiedVehicle(plrthen return end
    local x,y,getElementPosition(plr)
    fadeCamera(plr,false)
    setTimer(function()
    fadeCamera(plr,true)
    local mower createVehicle(572736.50,-1262.93,13.66,0.0360.0269.9)
    local mocuj 40.0
    setVehicleHandling(mower"engineAcceleration"mocuj)
    setVehicleHandling(mower"maxVelocity"80.0)
    setElementData(mower"zrespilGracz"plr)
    setElementData(mower"paliwo"100)
    addVehicleUpgrade(mower1025)
    setElementData(mower"opis","Praca dorywcza")
    warpPedIntoVehicle(plrmower)
    removePreviousVehicles(plr)
    triggerClientEvent(plr"startKoszenie"resourceRootmower)
    vehs[plr] = mower
    end19001)
    end
end
bindKey("space","down"BindKeys )

resourceRoot getResourceRootElement(getThisResource()) 
addEventHandler "onResourceStart"resourceRoot,
    function ()
        for iv in ipairs(getElementsByType("player")) do
        bindKeyv"space","down"BindKeys )
        end
    end
)

addEventHandler "onPlayerJoin"getRootElement(), 
    function ()
        bindKeysource"space","down"BindKeys )
    end
 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 23:05


FaydenFX.







Wiek: 27
Na forum: 4056 dni
Posty: 246
Nick w MP: faydn

Piwa: 11

Respekt: 45,3

to nie ma r??nicy, bo i tak nie dzia?a

Postaw piwo autorowi tego posta
 

 
Tagi: bindkey :: sside
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