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: rh1
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. Kłopot z rh1
Na wst?pie mowie, ze zaden ze mnie luamaster XD Bawie sie w to 3 dni dokladnie... Ogarnalem se paczke PSSM'a i postanowi?em modyfickowac MK1. Uda?o si? zrobic dzia?ajace MK2, MK3. Teraz moje pytanie? jak ulepi? RH1 XD? bo to co ja ulepilem to elegancko dziala hud, ale funkcja jest do ** kompletnie. Jakie? wytyczne podstaw na co zwrocic uwage? Moje wypociny wrzuce na dole.

Client:
[lua]mojeW,mojeH = 1366, 768
sW,sH = guiGetScreenSize()
w, h = (sW/mojeW), (sH/mojeH)

local screenW, screenH = guiGetScreenSize()
panel = false

function Panel()
local pojazd = getPedOccupiedVehicle(localPlayer)
exports["buttons"]:createCustomWindow("Panel Montowanie Dodatkow", screenW * 0.2513, screenH * 0.2083, screenW * 0.5096, screenH * 0.5859, tocolor(255, 255, 255, 255), false)
exports["buttons"]:createCustomButton("Zamknij Okno", screenW * 0.4509, screenH * 0.7224, screenW * 0.1094, screenH * 0.0600, tocolor(255,255,255,255), false)
local r,g,b=interpolateBetween(255,255,255,20,250,0,(getTickCount()-tick)/1100,"SineCurve")
dxDrawRectangle(372*w, 217*h, 271*w, 42*h, tocolor(0, 0, 0, 170), false)
dxDrawRectangle(653*w, 217*h, 42*w, 42*h, tocolor(0, 0, 0, 170), false) -- przycisk kup

dxDrawText("Zmiana zawieszenia na gwintownenKoszt: 15000 PLN ", 210*w, 117*h, 803*w, 359*h, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, true, false, false, false)

if get...
3. PYSTORIES 3.0 RH1
Cze??! Wiem, ?e temat rzeka, ale ostatnio postanowi?em si? pobawi? paczk? wymienion? w temacie. Kilka rzeczy ju? zrobi?em, ale m?czy mnie to niedzia?aj?ce RH1. Montuje si? normalnie, informacja na czacie si? pojawia, ale panelu ani nic takiego nie ma.

Inne tematy nie pomog?y z tego powodu, ?e jestem zielony w tym j?zyku i ma?o co jeszcze rozumiem. :>
Client:
[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", roo...
4. Pys 3.0 - rh1 nie działa
Tak jak w temacie nie dzia?a mi rh1 na pacze Pys 3.0
Kolumna w tabelce jest, w debugu brak b??d?w
Wiem, ?e ten temat by? poruszany na forum wiele razy ale nigdy ?aden nie zosta? rozwi?zany.

Kod:

Client
[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")[/lua]


Server
[lua]function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and get...
5. MK i RH1
Witam posiadam paczk? Play Your Stories 3.0 gdy montuje Mk to si? ono nie zapisuje a z Rh nie wiem jaka komenda :/
6. rh1 montowanie pod komęde
[b]Witam, mam ma?y problem mam sobie skrypt na gz chcia?bym ?eby po wjechaniu w marker i po wpisaniu "/zamontuj" odje?o graczowi 1000 PLN i da?o mu gz (rh1)
Da rade kto? mi to zwyk?y kod pod gz tak przerobi? xd ? lub wys?a? inny skrypt tak zrobiony xd ?[/b]
[code] function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]

if value then
return value
end
end

return false
end

function o(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == 4 then outputChatBox("Osi?gn??e? limit regulacji zawieszenia!", getVehicleController(c), 255, 255, 255) cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) - 0.19)
setElementData(c, "rh:up", gora+1)
outputChatBox("Obni?y?e? auto k****",getVehicleController(c),255,255,255,true)
end
end
addEvent("rh:o", true)
addEventHandler("rh:o", root, o)
function p(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
...
7. Nie dziala mi RH1
Witam mam rh podpi?te ?adnie wszystko i nie wiem czemu nie dzia?a podpi?te pod pystories


Server
[lua]function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]

if value then
return value
end
end

return false
end

function o(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == 4 then exports["1"]:outputNotificationBox (getVehicleController(c), "#cc0000Osi?gn??e? limit regulacji zawieszenia!") cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) - 0.16)
setElementData(c, "rh:up", gora+1)
exports["1"]:outputNotificationBox (getVehicleController(c), "#00ccccAuto zosta?o obni?one!")
end
end
addEvent("rh:o", true)
addEventHandler("rh:o", root, o)
function p(c)
if c then
local gora = getElementData(c, "rh:up") or 0
local s=getVehicleHandlingProperty(c,"suspensionForceLevel")
if tonumber(gora) == -8 then exports["1"]:outputNotificationBox (getVehicleController(c), "#cc0000Osi?gn??e? lim...
8. Montaż Rh1
Witam
mam problem z monta?em RH1 wszystko dzia?a ale jak nie mam 15k a to rh1 montuje a ja mam -15k

local Markerek createMarker(1986.68,2457.66,10.82-1"cylinder"3.00,255,255,75)
local napis createElement("text")
setElementData(napis"name""Monta? unikatowego tuningunOrganizacja B-B")
setElementPosition(napis,1986.68,2457.66,10.82)

addCommandHandler("montuj.rh1", function(plr,cmd)
local veh getPedOccupiedVehicle(plr)
local id getElementData(veh,"vehicle:id")
    if 
not isElementWithinMarker(plr,Markerekthen return end
    
if not veh then outputChatBox("* Wsi?d? do pojazdu!!",plr) return end
    
if getElementData(plr,"player:organization") and getElementData(plr,"player:organization") == "Grabarze" then
    outputChatBox
("* Zamontowa?e? glebe z twojego konta pobrano 15k.",plr)
    
setElementData(veh,"glebay",true)
    
query=exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET rh=1 WHERE id=?"id)
    --
setVehicleHandling(veh"suspensionLowerLimit"0.05)
    --
setVehicleHandling(veh"maxVelocity"360)
    
takePlayerMoney(plr,15000)
    
getPlayerMoney(plr,0)
end
end
)

Je?li kto? wie jak to naprawi? niech mni? nakieruje na to lub poprawi kod.