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: dxy
1. dx'y
Witam, jak zrobi? "ruchome" dx'y. A mianowicie chc? zrobi? prac? np. malarza. I robi? tam dx, i chce gdy gracz kliknie na tego dx'a zamalowa? ta cz??? gdzie klikn?? gracz. I jak wywo?a? jakas funkcje gdy dx b?dzie ca?y zamalowany? :piwo: i R* za pomoc
2. Pojazd, dxy, dystans
[lua]
local screenW, screenH = guiGetScreenSize()

function dxy()
dxDrawLine((screenW * 0.5380) - 1, (screenH * 0.5694) - 1, (screenW * 0.5380) - 1, screenH * 0.6000, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.6698, (screenH * 0.5694) - 1, (screenW * 0.5380) - 1, (screenH * 0.5694) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.5380) - 1, screenH * 0.6000, screenW * 0.6698, screenH * 0.6000, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.6698, screenH * 0.6000, screenW * 0.6698, (screenH * 0.5694) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.5380, screenH * 0.5694, screenW * 0.1318, screenH * 0.0306, tocolor(52, 80, 202, 255), false)
dxDrawText("Otw?rz baga?nik", 1043, 625, 1276, 646, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false)
end

function komenda ( theVehicle, seat, jacked, thePlayer, cmd )

local x1,y1,z1 = getElementPosition(thePlayer)
local x2,y2,z1 = getElementPosition(theVehicle)
distance = getDistanceBetweenPoints3D(x,y,z,x2,y2,z2)
if tonumber(distance) <= 5 then
addEventHandler("onClientRender", root, dxy)

elseif tonumber(distance) > 6 then
removeEventHandler("onClientRender", root, dxy)
outputChatBox("Jeste? za daleko od pojazdu!", theVehicle)
end
end
addCommandHandler("tes...