Wysłany: 2016-03-02, 21:35
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
i teraz to wgl co? nic ju? nie dzia?a bo pi??ci? da sie bi? i strzela?
Server:
function blok_bicie ()
toggleControl ( source , "fire" , false )
toggleControl ( source , "action" , false )
toggleControl ( source , "aim_weapon" , false )
end
addEventHandler ( "onPlayerJoin" , getRootElement (), blok_bicie )
Client:
addEventHandler ( "onClientKey" , root , function( button )
if button == "f" or button == "enter" and getKeyState ( "mouse2" ) then
cancelEvent ()
end
if button == "f" and not getKeyState ( "mouse2" ) then
setControlState ( "enter_exit" , true )
setTimer ( setControlState , 50 , 1 , "enter_exit" , false )
end
end
)
meta
< meta >
< script src = "Server.lua" type = "client" />
< script src = "Server1.lua" type = "server" />
</ meta >
[ Dodano : 2016-03-02, 21:38 ]
I wsiadanie f ju? dzia?a ;D, ale no co? si? stan??o i nie blokuje pi??ci, bbroni og?lnie uderzania myszk?
Wysłany: 2016-03-02, 21:56
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Wywal serwer, zostaw to po stronie clienta:
addEventHandler ( "onClientResourceStart" , resourceRoot , function()
toggleControl ( "fire" , false )
toggleControl ( "action" , false )
toggleControl ( "aim_weapon" , false )
end
)
Wysłany: 2016-03-02, 21:58
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Dzia?a, tylko jest jeszcze jedna rzecz kt?ra mnie razi. Mianowicie gdy co? pisz? na czacie i wpisz? litere 'f' to gracz chce wsi??? do pojazdu
Wysłany: 2016-03-02, 22:00
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
To ju? jest dla ciebie robota, co? musisz samemu zrobi?.
Funkcja:
Wysłany: 2016-03-02, 22:01
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Ok, dzi?ki za funkcj?. Generalnie gotowc?w nie wo?a?em ale jak dali?cie to mia?em nie bra?? xd
[ Dodano : 2016-03-02, 22:11 ]
Nie potrafi? tego u?y? ,
if isChatBoxInputActive ( false ) then
Pr?bowa?em ale no nic nie dawa?o
Wysłany: 2016-03-19, 09:24
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
addEventHandler ( "onClientKey" , root , function( button )
if button == "f" or button == "enter" and getKeyState ( "mouse2" ) then
cancelEvent ()
end
if button == "f" and not getKeyState ( "mouse2" ) then
if not isChatBoxInputActive () then
setControlState ( "enter_exit" , true )
setTimer ( setControlState , 50 , 1 , "enter_exit" , false )
end
end
end
)
Wysłany: 2016-03-19, 16:04
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Temat do zamkni?cia, poradzi?em sobi? zupe?nie innymi funkcjami. m.in toggleControl te? ale, mniejsza z tym. Temat close
Tagi: blokada :: bicia
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: