TheTren
Wiek: 35 Na forum: 3516 dni Posty: 17
Nick w MP: TheTren
Piwa : 1604
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 ?
Kod: 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")
if tonumber(gora) == -8 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("Podwy?szy?e? auto gnojuwo",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, "auto:id") and getElementData(source, "player:kid") then
local qr = exports['ogrpg-db']:dbGet("SELECT * FROM ogrpg_vehicles WHERE id=? AND rh=?",getElementData(car, "vehicle:id"), "1")
if #qr == 1 then
end
end
end)