Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: bindkey
1. Kogut pod bindkey
witam chcia?bym aby kto? pom?g? mi z kogutem kt?ry ma sie wy?wietla? pod bindkey jak narazie jest on pod funkcj? o kt?ra otwiera panel i klika sie tam funkcje kogut to on sie wy?wietla a ja chce przerobi? go pod bindkey np k ?eby sie pojawi? i jak klikne k to ?eby znik?

tutaj screen jak to wygl?da - https://imgur.com/a/uTRuNgK
2. BIndkey funkcje
Witam, jak usun?? funkcj? podnoszenia/opuszczania wide? widlaka.
3. Bad argument @ 'Bindkey'
Bad argument @ 'Bindkey' [Expected player at argument 1, got table]
potrzebuje pomocy
to s-side
a to

bindKey
players"mouse1""down", function (player)

nie podoba si? wi?c potrzebuj? pomicy

function fanFunction()
players getElementsByType "player" )
for 
theKey,thePlayer in ipairs(players) do
bindKeyplayers"mouse1""down", function (player)
CzesciBurgera getElementData(player"Kesy") or 0
   
if CzesciBurgera 0 then
   outputChatBox 
("*****?e? k?sa ty cipo",player,225,0,0,true)
   
setElementHealth playergetElementHealth(player) + 20 )
            
exports.global:applyAnimation(player"FOOD""EAT_Burger"4000falsetruetrue)
 
jedzenie createObject(1271000)
        
attachElements (jedzenieplayer, -0.0870.740.55)
        
setElementData(player"Kesy",CzesciBurgera-1)
   else
   
outputChatBox ("To by? ostatni k?s w burgerze, zapamietaj go",225,225,0)
   
setElementHealth playergetElementHealth(player) + 20 )
destroyElement(jedzenie)
   
end
end 
)
end
end
addEventHandler 
"onResourceStart"getRootElement(), fanFunction )
4. BindKey
Witam jak naprawi? taki b??d?

Bad argument 
@'bindKey' [Expected player at argument 1got function]

Wstawia?em inne warto?ci lecz daj nie dzia?a.
kod s_side

function player()
setElementPosition(player,-2315.48,-29.21,35.39)
end
bindKey
(player"J""down",player)    
5. Bad argument @ 'bindKey' [Expected player at argument 1, got
z?y argument ? nie czaje tego za cholere my?la?em ,?e wszystko dobrze napisa?em

bindKey
("e""down", function(player)
6. bindKey
Witajcie, dzi? przychodz? do was z pytaniem jak zrobi? obraz kt?ry b?dzie wy?wietla? si? po klikni?ciu przycisku. Nie chodzi mi tu czego mam u?y? bo to wiem. "bindKey". Prosz? o odpowiedz.
7. bindKey
Witam wywala mi b??d: Bad argument @ 'bindKey' [Expected player at argument 1, got resource-data] Jest to po S-side


addEventHandler 
"onResourceStart"root, function(el,md)
 
bindKey(el"k""down", function()
setVehicleEngineState(car,true)
 
end)
end)
8. bindKey Zamykanie Bram
Witam....
Chc? zrobi? tak, ?eby po naci?ni?cu drugi raz tego samego klawisza brama np. zamyka?a by nam si?... lecz co? mi to nie wychodzi... Gdy daj? else setElementFroze(Drzwi_Sala_Szkoleniowa, false) end to drzwi nie chc? si? "odmrozi?"...






Oczywi?cie stawiam :piwo: :)
9. Bindkey oraz getElementPosition
Witam, robi? sobie fajny skrypt na prywatne auta, tylko jeden problem. Nie wiem jak pobra? pozycje gracza po stronie serwera, pokazuje ?e brakuje elementu


local px
pypz getElementPosition(playerSource)
car createVehicle modelpxpypz0,0,0plate)




Oraz mam problem z bindem, nie chce on dzia?a? oto kod:

Kod:

local enter 
createPickup 2386.971441037.5539610.8203131239)    
inPickup false

function enterPickup(pickup,player)
        
outputChatBox("inPickup")    
        
inPickup true
end
addEventHandler 
"onPickupHit"enterenterPickup )

function 
enterInterior(player)
    if 
inPickup == true then
        outputChatBox
("inPickup and pressed E")    
        
inPickup false
    end
end

function test(player)
    
outputChatBox("Test")
    
bindKey (player"E""down"enterInterior )
end
addEventHandler
("onResourceStart"root,test)



Tutaj sam bind:


function test(player)
    
outputChatBox("Test")
    
bindKey (player"E""down"enterInterior )
end
addEventHandler
("onResourceStart"root,test)

10. Wciśniety bindKey
Witam, przed sekund? sko?czy?em stacje, i dzia?a to tylko tak ?e trzeba klika? t? stacje. A chcia?bym doda? d?wi?k tankowania wi?c chcia?bym aby button m?g?by? wci?ni?ty i by tankowa?o, da??m
bindKey("space""down"funkcja)
dawa?em r?wnie? "up", "both", ale z tego co czyta?em to down jest od wci?ni?tego lecz to nie dzia?a ;/. Stawiam zimne :piwo: .
11. bindKey w picup
[lua][/lua]
createBlip(2846.4462890625,2414.80859375,10.0625,10)
marketwejscie createMarker(2846.4462890625,2414.80859375,12.0625,"arrow",2.0,255,255,255,250)
function 
wejscie(thePlayer)
    if 
isElementWithinMarker(thePlayermarketwejscie)then
    outputChatBox
("Je?li chcesz wejs? do restauracji klikniej alt+spacje"thePlayer255250250)
    else 

    
end
    
end
addEventHandler
"onMarkerHit"marketwejsciewejscie)

Chce teraz zrobi? aby po klikni?ciu alt+spacji posta? teleportowa?a si? gdzie? :D
12. Marker i bindKey
Cze??,
.

M?j problem polega na tym, ?e chcia?bym aby kiedy kto? nacisn?? enter I BY? W MARKERZE... co? tam robi?, bla, bla, bla. Prosz? o pomoc, nie wiem jak po??czy? te funkcje.
13. bindKey po stronie serwera
Mam taki skrypt na otwieranie bramy na bindKey. Bram si? otwiera ale pod warunkiem ?e jest dany po stronie klienta. Jak dam po stronie serwera to nie dzia?a. Jak zrobi? ?eby dzia?a? i po stronie serwera.
brama1 createObject (175262431.885, -1423.00625.357000)
marker1 createMarker 2432.76489, -1426.0849623.00038"cylinder"100255 )

addEventHandler "onClientMarkerHit"marker1, function(el,md)
 
bindKey("e""down", function()
 
moveObject brama130002431.885, -1423.00620.64)
 
end)
end)
14. bindKey - zupa ogórkowa
Witam!
Mam problem z bindKeyem
A g??wnie z elementem.

kod:

function bindIt(source)
bindKey(source,"k","down",swalla)
end
addEventHandler
("onResourceStart",getRootElement(),bindIt)


error:
spodziewany element, a jest - gdy jest tak jak teraz to jest resource-data, gdy jest samo source w 1 arg. to jest resource.

Pr?bowa?em na r??ne sposoby i nie dzia?a
funkcja swalla ma argumenty keyPresser,key,keyState

Pozdrawiam,
:piwo: :piwo: za pomoc.
15. Jak zabezpieczyć bindKey przed spamowaniem?
Witam, wie kto? mo?e jak zabezpieczy? bindKey przed spamem?
Kod:

bindKey("F2", "up", choice)
16. bindKey nie reaguje
Witam, potrzebuj? jak najszybszej pomocy z bindKey kt?ry odpowiada..

kod

local pracageo
=createMarker(2500.60, -1669.4513.35-1,"cylinder"1.1150120255,125)

addEventHandler("onClientMarkerHit"pracageo, function(elmd)
    if 
not md or getElementType(el) ~= "player" then return end
    
if el ~= localPlayer then return end
    outputChatBox
("DZIALA MARKER ",5420351)
end)

bindKey("e""down", function()
    if 
not isElementWithinMarker(localPlayerpracageothen return end
    
if not getElementData(localPlayer"startJob"then
        setElementData
(localPlayer"startJob"true)
        
outputChatBox("DZIALA BIND",5420351)
end
 end
)
17. bindKey sside
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.
18. bindKey po raz pierwszy
Mam takie pytanie poniewa? na r??ne sposoby pr?bowa?em ale nie zbyt to dzia?a :/

Chcia?bym aby kr?tkofal?wka zamiast na komeend? /k by?a na bindkey K i opr?cz tego na tej samej zasadzie chcia?bym zrobi? Frakcyjny:jakas tam wiadomosc.

Rowniez na bind 'u' pr?bowa?em wzorowa? si? na LocalChat ale polgeg?em :(

[lua]
function message (thePlayer,cmd,...)
if not getPlayerAccount(thePlayer) then return end

local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if not accName then return end

local allArgs = {...}
local theMessage = table.concat(allArgs, " ")


if isObjectInACLGroup ("user."..accName, aclGetGroup("SAMC") ) then
for k,v in ipairs (getElementsByType("player")) do
if getPlayerAccount(v) then
accName = getAccountName(getPlayerAccount(v))
if accName then
if isObjectInACLGroup("user."..accName, aclGetGroup("SAMC")) then
outputChatBox("#00FF00"..getPlayerName(thePlayer).."#FF0000**#0000ffKr?tkofal?wka#ff0000**#FF6600 "..theMessage, v, 255,255,255, true)
end
end
end
end

elseif isObjectInACLGroup ("user."..accName, aclGetGroup("SAPD") ) then
for k,v in ipairs (getElementsByType("player")) do
if getPlayerA...
19. bindKey
addEventHandler("onResourceStart",resourceRoot,
    function ( 
player )
        
bindKey(player,"P","down",
            function ( 
plr )
                
local accName getAccountName getPlayerAccount plr ) )
                if 
isObjectInACLGroup"user."..accNameaclGetGroup("RCON") ) or isObjectInACLGroup"user."..accNameaclGetGroup("Admin") ) or isObjectInACLGroup"user."..accNameaclGetGroup("Moderator") ) then
                    triggerClientEvent
(plr"panelP"root)
                else return
                
end
            end
        
)
    
end
)


Problem polega na tym ?e nie dzia?a mi bindKey P

Wywala debug w 3 linijce z bindKey z argumentem pierwszym ;(
20. wywala Bad Argument przy bindKey po stronie serwera
Witam!

wywala mi taki b??d w DB3 po stonie s-side:


oto 28 linijka:
bindKey(player"e""down", function(playermd)


a oto ca?a funkcja:
bindKey(player"e""down", function(playermd)
if 
not isElementWithinMarker(playerm1then return end
if getElementData(player"zrespilGracz"then
        outputChatBox
("praca w trakcie poprawek"player)
        return
    
end
    
    
if not md or getElementType(player) ~= "player" or getPedOccupiedVehicle(playerthen return end
    
    local x
,y,getElementPosition(player)
    
local bus createVehicle(437x,y,z,0.0360.0269.9)
    
    
setElementData(bus"zrespilGracz"player)
    
setElementData(bus"pojazd_paliwo"50)
    
setElementData(bus"pojazd_przebieg"100)
    
    
warpPedIntoVehicle(playerbus)
    
removePreviousVehicles(player)
    
triggerClientEvent(player"STARTJobBus"resourceRootbus)

    
vehs[player] = bus
end
)
21. bindKey
Z g?ry zakazuje ?ci?ganie kodu, kt?ry by? mo?e b?dzie widoczny w tym temacie!

Jako, i? nikt nie odpowiedzia? w moim ostatnim temacie, pozwol? sobie na nast?pny.
Tym razem ju? inny problem, mianowicie chodzi o otwieranie panelu za pomoc? bindKey.

Same otwarcie panelu dzia?a, lecz nie wiem jak zrobi? bindKey na zamykanie go.
Po naci?ni?ciu pare razy klawisza kt?ry odpowiada za otwarcie tworzy si? takie co?

Tworz? si? jak wida? takie schody z g?ry na d??, nie wiem czemu tak si? dzieje.
Kolejne naci?ni?cie (w tym przypadku klawisza m) tworzy si? schodek w d??.

Prosz? o pomoc.
Pozdrawiam.
22. Brama na BindKey
Kod:

st = createObject ( 3095, 826.20001220703, -2077.6999511719, 14, 270, 0, 0 )
function stO (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("vip")) then
moveObject ( st,1000, 826.20001220703, -2077.6999511719, 14 )
outputChatBox ("Zamykanie Trwa", thePlayer, 219, 78, 1, false )
end
end
addCommandHandler("closevip", stO )

function stC (thePlayer)
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("vip")) then
moveObject ( st, 1000, 826.20001220703, -2073.1999511719, 25 )
outputChatBox ("Otwieranie Trwa", thePlayer, 219, 78, 1, false )
end
end
addCommandHandler("openvip", stC )



Jak to zrobi? na bind ?? ?? ?? ?? ?? ?? ?? ?? ?? ??