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: minusie
1. Paliwo na minusie
Witam ostatnio zauwa?y?em ?e na liczniku w pojazdach pokazuje si? paliwo na " - " oraz auto nie ga?nie i mo?na dalej je?dzi?.

[lua]function wariant(plr, cmd, var1, var2)
local veh = getPedOccupiedVehicle(plr)
if not veh then return end
local var1, var2 = getVehicleVariant(veh)
if (veh and getVehicleController(veh) ~= plr) then return end
local speedx, speedy, speedz = getElementVelocity(veh)
if not speedx then speedx=0 end
if not speedy then speedy=0 end
if not speedz then speedz=0 end
speedx = tonumber(speedx);speedy=tonumber(speedy);speedz=tonumber(speedz)
local speed = (speedx^2 + speedy^2 + speedz^2)^(0.5) * 180
if speed > 2 then
outputChatBox("* St?j w miejscu !",plr) return end
local panel = {}
for i=0,6 do
panel[i] = getVehiclePanelState ( veh, i )
end
setVehicleVariant(veh, tonumber(not var1), tonumber(not var1))
for i=0, 6 do
setVehiclePanelState ( veh, i ,panel[i])
end
end
addCommandHandler("wariant", wariant)

vehicles=0
root=getRootElement()
resourceRoot=getResourceRootElement(getThisResource())

local nlOffsets={
[411]={-1,0,-0.6}, -- infernus
[470]={-1,0,-0.4}, -- patriot
[541]={-0.9,0,-0.4}, -- bulelt
[549]={-0.9,0,-0.4}, -- tampa
[587]={-1,0,-0.5}, -- euros
}

local nlIDX={
3962,2113,1784,2054,2428,2352
}

function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and...
2. Pieniądze na minusie
Siema
Ot?? mam skrypt na gre "kostka", i chcia?bym zrobi? aby gracz kt?ry nie mia? tylu pieni?dzy nie mog? ich wystawi?. Bo narazie jest tak ze nawet jak masz 10$ to mozesz zagrac o 500k.
Wie kto? jak to naprawi??
Kod po stronie serwera:
[lua]

addEvent("kostkaGra", true)
addEventHandler("kostkaGra", getResourceRootElement(), function(gracz1, gracz2, kwota)


zabierzHajs(gracz1, kwota)
zabierzHajs(gracz2, kwota)
local liczba = math.random(1,3)
if liczba == 1 then
outputChatBox("((Wygra?e?!))",gracz1)
givePlayerMoney(gracz1,kwota*2)
outputChatBox("((Przegra?e?!))",gracz2)

end if liczba == 2 then
outputChatBox("((Remis!))",gracz1)
givePlayerMoney(gracz1,kwota)
givePlayerMoney(gracz2,kwota)
outputChatBox("((Remis!))",gracz2)

end if liczba == 3 then
outputChatBox("(( Przegra?e? ))",gracz1)
outputChatBox("(( Wygra?e? ))",gracz2)
givePlayerMoney(gracz2,kwota*2)
end


end)







addCommandHandler("wyzwij", function(ktoNapisalKomende, _ , NICK, KWOTA)
local przeciwnik = findPlayer(NICK)
if not przeciwnik or przeciwnik == ktoNapisalKomende then outputChatBox("(( Nie ma przeciwnika/Jeste? nim ty! ))", ktoNapisalKomende)
return
end

local x,y,z = getElementPosition( przeciwnik )
if getDistanceBetweenPoints3D(x,y,z,1954.09,1040...
3. Kasa na minusie
Mam problem gdyz ktos maluje i ma 0$ to mu zostawie pieniadze na minusie.

[lua]
createBlip (-2715, 221.75, 3.4, 63)

setGarageOpen ( 15, true )

local strefyLakiernicze = {
LakierniaDoherty = {
cuboid = {-2730.0549, 210.62022, 3.234375, 14.25, 11.5, 3},--cuboid
marker = {-2715, 221.75, 3.4}, --marker
},
}

for i,v in pairs(strefyLakiernicze) do
l_cuboid = createColCuboid(unpack(v.cuboid))
l_wybor = createMarker(v.marker[1], v.marker[2], v.marker[3], "cylinder", 1, 0, 0, 0, 100)
end

addEventHandler("onMarkerHit",l_wybor,
function ( player )
outputChatBox("> Aby zmieni? kolor pojazdu, wpisz odpowiedni? komend?.",player, 0, 120, 255, true)
outputChatBox("> Koszt malowania: 150 z?.",player, 0, 120, 255, true)
outputChatBox("> Kolory: #ffff00/zolty #ff9900/zloty #ff6600/pomaranczowy #ff0000/czerwony #ff00ff/rozowy #b803ff/fioletowy #800080/purpurowy #0000ff/niebieski #00ffff/niebieski2 #000080/granatowy #00ff00/limonkowy #00b400/zielony #006400/zielony2 #000000/czarny #ffffff/bialy",player, 0, 120, 255, true)
end
)

addCommandHandler("zolty",
function (player, cmd)
local pojazd = getElementsWithinColShape(l_cuboid, "vehicle")
if isElementWithinMarker(player,l_wybor) then
local pojazd = getElementsWithinColShape(l_cuboid, "vehicle")
if #pojazd&l...
4. Kasa na minusie i wszystkim wyświetla się GUI
Skrypt wy?wietla ka?dym GUI montowania, gdy? kto? inny wjedzie w marker. Drugi problem polega na tym, ?e gdy kto? nie ma danej kwoty to mu bierze pieni?dze i zostawia mu na minusie.
Kod strona clienta (GUI):
[lua]

GUIEditor = {
button = {},
window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(339, 179, 499, 460, "", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.83)

GUIEditor.button[1] = guiCreateButton(25, 37, 115, 58, "MK-1 Przy?pieszenien (3900$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(140, 37, 113, 58, "MK-1 Pr?dko??n (4600$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[3] = guiCreateButton(261, 38, 220, 57, "Demont", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[4] = guiCreateButton(25, 103, 115, 51, "MK-2 Przy?pieszenien (5100$)", false, GUIEditor.window[1])
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[5] = guiCreateButton(138, 1...