lolek565


Wiek: 29 Na forum: 3900 dni Posty: 5
Nick w MP: lolek565
Piwa: 1
|
|
|
|
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 |
|