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

Wysłany: 2018-07-08, 00:08


koko7864

PSEUDO SKRYPTER






Wiek: 22
Na forum: 3230 dni
Posty: 41
Nick w MP: Mar0x

Piwa: 1

Respekt: 50

Witam mam problem ze zrobieniem RH Paczka PYS 3.0
Nie mam poj?cia jak zrobi? Rh
wy?le kilka kod?w
1 MONTOWANIEMK
addEvent("rh"true)
addEventHandler("rh"root, function()
pojazd getPedOccupiedVehicle(source)
if not pojazd then return end
if (getPlayerMoney(source) > tonumber(rh)) then
  local id getElementData(pojazd"vehicle:id")
  exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET rh=1 WHERE id=?"id)
         outputChatBox("* Pomy?lnie zaprogramowano RH1."source,true)
     outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"source,true)
         takePlayerMoneysourcerh )
    else
         outputChatBox("* Nie sta? Ci? na to."source,true)
end
end
)

Community-rh1
]function getVehicleHandlingProperty elementproperty )
    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), 255255255cancelEvent() 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"rooto)
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), 255255255cancelEvent() 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"rootp)

addEventHandler("onPlayerVehicleEnter"root,
function(carseat)
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)

Pystories-vehciles
local mk1 vehicle['mk1']
        local mk1 vehicle['mk2']
        local naped vehicle['awd']
                local rh vehicle['rhshow']

TAM JESZCZE COPO ?RODKU JEST NAPISANE ALE TO CHYBA NIE POTRZEBNE

addEventHandler("onVehicleEnter"getRootElement(), function(plr,seat,jacked)
if seat ~= 0 then return end
if getElementData(source"vehicle:id") and getElementData(source"vehicle:spawn"then
local mk2 exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk2=?",getElementData(source"vehicle:id"), "1")
local mk1 exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk1=?",getElementData(source"vehicle:id"), "1")
local naped exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND naped=?",getElementData(source"vehicle:id"), "1")
local np exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND naped=?",getElementData(source"vehicle:id"), "1")
local rh exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(source"vehicle:id"), "1")
if #mk1 > 0 then outputChatBox(" Pomy?lnie zaprogramowano MK1",plr,255,255,255) end
if #mk2 > 0 then outputChatBox(" Pomy?lnie zaprogramowano MK2",plr,255,255,255) end
if #naped > 0 then outputChatBox(" Pomy?lnie zaprogramowano Nap?d 4x4",plr,255,255,255) end
if #rh > 0 then outputChatBox(" Pomy?lnie Gwintowe zawieszenie",plr,255,255,255) end
end
end)



Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-11, 09:50


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4699 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

W czym tu tkwi problem??

[ Dodano: 2018-07-11, 09:55 ]
Z tego co wiem to w PYS jest chyba od tego jaki? system montowania tego je?li nie ma to ?ap komende dla admin?w:


addCommandHandler("rh", function(plr,cmd)
  if not getElementData(plr,"player:logged"then return end
  local adm=getElementData(plr,"player:admin")
  if not adm then return end
  local veh=getPedOccupiedVehicle(plr)
  if not veh then return end
  if (getPlayerMoney(plr) > tonumber(rh)) then
    local id=getElementData(veh,"vehicle:id")
    exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET rh=1 WHERE id=?"id)
    outputChatBox("* Pomy?lnie zaprogramowano RH1."plr255255255,true)
    outputChatBox("* Oddaj auto do przecho aby zobaczy? efekty!"plr255255255,true)
  else
    outputChatBox("* Nie sta? Ci? na to."plr255255255true)
  end
end)



[ Dodano: 2018-07-11, 09:55 ]
Wystarczy wej?? do pojazdu zalogowany jako admin, i wpisa? /rh

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Tagi: gwintowe :: 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 » Gwintowe zawieszenie 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