| Tematy otagowane jako: klawisze |
| 1. Zmiana RH1 z gui na klawisze |
Siema!
Og?lnie to chcia?bym przerobi? Rh1 kt?re jest w gui ?eby by?o pod klawiszami num8 i num2 da?oby rad? takie co? zrobi??
c.lua
addEventHandler("onClientResourceStart", resourceRoot,
function()
rh = guiCreateWindow(0.00, 0.93, 0.14, 0.07, "Gwintowane zawieszenie", true)
guiWindowSetSizable(rh, false)
guiWindowSetMovable(rh, false)
gora = guiCreateButton(0.05, 0.46, 0.43, 0.36, "Podwy?sz", true, rh)
dol = guiCreateButton(0.54, 0.46, 0.41, 0.36, "Obni?", true, rh)
guiSetVisible(rh, false)
end
)
addEventHandler("onClientGUIClick", resourceRoot, function(btn)
local veh = getPedOccupiedVehicle(localPlayer)
if source == gora then
triggerServerEvent("rh:p", root, veh)
elseif source == dol then
triggerServerEvent("rh:o", root, veh)
end
end)
function patch()
local veh = getPedOccupiedVehicle(localPlayer)
if not veh then
if rh and ( guiGetVisible ( rh ) == true ) then
guiSetVisible(rh, false)
end
end
end
addEventHandler("onClientRender", root, patch)
function show()
guiSetVisible(rh, true)
end
addEvent( "rhshow", true )
addEventHandler( "rhshow", root, show )
fileDelete("c.lua")
s.lua
function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string&q... |
| 2. [INNE] Klawisze |
| Mam pytanie. Chc?, ?eby zamiast komendy, to ?eby po wci?ni?ciu danego klawisza co? si? dzia?o. I jeszcze potrzebuj? id klawiszy: spacja, w, s, a, d, h |
|