Wysłany: 2014-05-03, 15:37
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
Mam problem z bindKeyem, pisze mi ?e bad Argument
function re ( player )
local veh = getPedOccupiedVehicle ( player )
local freezestatus = isElementFrozen ( veh )
if isPedInVehicle ( player ) then
if getPedOccupiedVehicleSeat ( player ) == 0 then
local x , y , z = getElementVelocity ( veh )
local predkosc = ( x ^ 2 + y ^ 2 + z ^ 2 )^( 0.5 )
local kmh = predkosc * 180
if kmh == predkosc then
if setElementFrozen ( veh , true ) == kmh then
end
end
end
if freezestatus == false then
elseif freezestatus == true then
setElementFrozen ( veh , false )
outputChatBox ( "R?czny spuszczony!" , player , 0 , 255 , 0 )
end
end
end
addCommandHandler ( "reczny" , re )
bindKey ( "n" , "down" , re )
Bardzo prosz? o pomoc za pomocn? odpowied? daj? zimne
Wysłany: 2014-05-03, 16:20
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Zgredek666 , bindKey po stronie client musi by? w funckji r?b funckje i daj event jako uruchomiuny po w?aczeniu zasobu
Wysłany: 2014-05-03, 16:43
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
function re ( player )
local veh = getPedOccupiedVehicle ( player )
local freezestatus = isElementFrozen ( veh )
if isPedInVehicle ( player ) then
if getPedOccupiedVehicleSeat ( player ) == 0 then
local x , y , z = getElementVelocity ( veh )
local predkosc = ( x ^ 2 + y ^ 2 + z ^ 2 )^( 0.5 )
local kmh = predkosc * 180
if kmh == predkosc then
if setElementFrozen ( veh , true ) == kmh then
end
end
end
if freezestatus == false then
elseif freezestatus == true then
setElementFrozen ( veh , false )
outputChatBox ( "R?czny spuszczony!" , player , 0 , 255 , 0 )
end
end
end
function bind ()
bindKey ( "n" , "down" , re )
end
addEventHandler ( "onResourceStart" , getRootElement (), bind )
Nadal nic
Tagi: ręczny
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: