Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-08-11, 10:37


lolek565







Wiek: 29
Na forum: 3900 dni
Posty: 5
Nick w MP: lolek565

Piwa: 1

Respekt: 50

Siemka tak jak w temacie nie dzia?a mi z 4x4z i gwintowane zawieszenie.Mam paczk? PYS-A i gdy wchodz? do blipu z montowaniem mk i 4x4 to gdy wbieram opcje 4x4 to pisze ze mam odda? auto do przecho a potem jak wyci?gam to nie mam tego 4x4. I nie wiem jak doda? do gui mo?liwo?ci zamontowania rh. A jak dodaje rh w bazie danych to tylko mi pisze na czacie jak wyci?gam samoch?d ?e rh jest zainstalowanie a nie dzia?a.Nie wiem jak to naprawi?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-11, 17:29


Mezo.

Mod-Team






Wiek: 24
Na forum: 3211 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6070

Respekt: 517
Respekt: 517

W tym wlasnie nie ma prawdopodobnie tabeblki w sql.

Podpis
- Na forum pomagam na miarę swoich możliwości, oraz bezpłatnie.
- Jeżeli potrzebujesz pomocy, pisz do mnie w prywatnej wiadomości, pomoc uzyskasz szybciej.
Współpraca - [email protected]


Użytkownik - 19.08.2017
GTAO MEMBER - 29.03.2019
Support-Team - 03.02.2019 - 07.05.2019
Moderator - 07.05.2019 - 02.08.2020
Mod-Team - 02.08.2020 - 25.03.2022

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-11, 18:13


lolek565







Wiek: 29
Na forum: 3900 dni
Posty: 5
Nick w MP: lolek565

Piwa: 1

Respekt: 50

A jak to zrobi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-11, 19:20


Allansso







Wiek: 24
Na forum: 3938 dni
Posty: 386

Piwa: 1537

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 100%
Podpis
https://www.youtube.com/TheMikol
https://www.facebook.com/TheMikol1337
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-12, 01:36


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

Podaj kod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-08-12, 11:08


lolek565







Wiek: 29
Na forum: 3900 dni
Posty: 5
Nick w MP: lolek565

Piwa: 1

Respekt: 50

montowanie mk/ nitros.lua
[lua] --[[
@author Mikael <[email protected]>
Skrypt wykonany dla New World 2016
]]

mk1 = 65000
mk2 = 85000
rh = 100000


local licz = {}
local t=createElement('text')
setElementData(t,'name','Automatyczny monta? tuningu mechanicznego')
setElementPosition(t,-2052.77, 159.02, 28.84+0.5)

--createBlip(-1770.96,1205.90,25.13, 53) -- fancy workshop blip

addEvent("mk1", true)
addEventHandler("mk1", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk1)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano MK1.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, mk1 )
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)


addEvent("mk2", true)
addEventHandler("mk2", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk2)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano MK2.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, mk2 )
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)

addEvent("rh", true)
addEventHandler("rh", root, function()
pojazd = isPedInVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(rh)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano nap?d 4x4.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, rh)
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)/lur

/lur s.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 outputChatBox("* Osi?gn??e?(a?) limit regulacji zawieszenia !", getVehicleController(c), 255, 255, 255) cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) - 0.24)
setElementData(c, "rh:up", gora+1)
outputChatBox("* Auto zosta?o obni?one.",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")
if tonumber(gora) == -8 then outputChatBox("* Osi?gn??e?(a?) limit regulacji zawieszenia !", getVehicleController(c), 255, 255, 255) cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) + 0.24)
setElementData(c, "rh:up", gora-1)
outputChatBox("* Auto zosta?o podwy?szone.",getVehicleController(c),255,255,255,true)
end
end
addEvent("rh:p", true)
addEventHandler("rh:p", root, p)

addEventHandler("onPlayerVehicleEnter", root,
function(car, seat)
if seat ~= 0 then return end
if getElementData(car, "vehicle:id") and getElementData(source, "player:uid") then
local qr = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(car, "vehicle:id"), "1")
if #qr == 1 then
triggerClientEvent(source,"rhshow", root)
end
end
end)
[/lua]
[lua]
Dodano: 2018-08-12, 11:08
/lur
montowanie mk/ nitros.lua
--[[
@author Mikael <[email protected]>
Skrypt wykonany dla New World 2016
]]

mk1 = 65000
mk2 = 85000
rh = 100000


local licz = {}
local t=createElement('text')
setElementData(t,'name','Automatyczny monta? tuningu mechanicznego')
setElementPosition(t,-2052.77, 159.02, 28.84+0.5)

--createBlip(-1770.96,1205.90,25.13, 53) -- fancy workshop blip

addEvent("mk1", true)
addEventHandler("mk1", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk1)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET mk1=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano MK1.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, mk1 )
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)


addEvent("mk2", true)
addEventHandler("mk2", root, function()
pojazd = getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(mk2)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET mk2=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano MK2.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, mk2 )
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)

addEvent("rh", true)
addEventHandler("rh", root, function()
pojazd = isPedInVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(rh)) then
local id = getElementData(pojazd, "vehicle:id")
exports["pystories-db"]:dbSet("UPDATE ogrpg_vehicles SET naped=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zamontowano nap?d 4x4.", source,true)
outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!", source,true)
takePlayerMoney( source, rh)
else
outputChatBox("* Nie sta? Ci? na to.", source,true)
end
end
)/lur

/lur s.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 outputChatBox("* Osi?gn??e?(a?) limit regulacji zawieszenia !", getVehicleController(c), 255, 255, 255) cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) - 0.24)
setElementData(c, "rh:up", gora+1)
outputChatBox("* Auto zosta?o obni?one.",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")
if tonumber(gora) == -8 then outputChatBox("* Osi?gn??e?(a?) limit regulacji zawieszenia !", getVehicleController(c), 255, 255, 255) cancelEvent() return end
setVehicleHandling(c,"suspensionForceLevel",tonumber(s) + 0.24)
setElementData(c, "rh:up", gora-1)
outputChatBox("* Auto zosta?o podwy?szone.",getVehicleController(c),255,255,255,true)
end
end
addEvent("rh:p", true)
addEventHandler("rh:p", root, p)

addEventHandler("onPlayerVehicleEnter", root,
function(car, seat)
if seat ~= 0 then return end
if getElementData(car, "vehicle:id") and getElementData(source, "player:uid") then
local qr = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(car, "vehicle:id"), "1")
if #qr == 1 then
triggerClientEvent(source,"rhshow", root)
end
end
end)
[/lua]

Ostatnio zmieniony przez FrosteR 2018-08-12, 12:29, w całości zmieniany 4 razy  
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: 4x4 :: gwintowane :: zawieszenie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku