Witam aktualnie ucz? si? robienia Gui po wej?ciu w marker oraz po klikni?ciu w przycisk przyk?adowo daje auto i jestem na etapie wy?wietlenia gui w markerze a jakiej funkcji mam u?y? aby po klikn?ciu w dany przycisk dawa?o auto dodam ?e robi? to wszystko na dxdrawimage nie klasycznym guieditorze
function mysz(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
addEventHandler("onClientClick", root, function(btn, state)
if btn == "left" and state == "down" then
if przepisywanie == true then
if mysz(screenW * 0.2792, screenH * 0.6037, screenW * 0.0818, screenH * 0.0370) then
...
Cze??, wiecie jak tu zrobic by te przyciski dzia?a?y w te dwa sposoby?:
1. Torba PSP R-1 mo?na by?o wykona? skrypt: [lua]function weztorba (plr)
local login = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup("user."..login,aclGetGroup("torba", plr)) then
local auto = getPedOccupiedVehicle(plr)
if isPedInVehicle(plr) then
if (getElementModel(auto) == 416) or (getElementModel(auto) == 427) or (getElementModel(auto) == 407) then
local torba = createObject(1210, 0, 0, 0, 0, 0, 0)
setElementData ( plr, "torba", torba)
exports.bone_attach:attachElementToBone(torba,plr,12,0,0.1,0.3,0,180,0)
outputChatBox("** Bierzesz torb? medyczn?", plr)
outputChatBox("** "..login.." wyci?ga torb? medyczn? z pojazdu", root)
end
end
end
end
addCommandHandler("torba", weztorba)
-------------------------------------------------
function odloztorbe(plr)
local login = getAccountName(getPlayerAccount(plr))
if isObjectInACLGroup ("user."..login, aclGetGroup ( "torba" ) ) then
local auto = getPedOccupiedVehicle(plr)
if isPedInVehicle(plr) then
if (getElementModel(auto) == 416) or (getElementModel(auto) == 427) or (getElementModel(auto) == 407) then
local torba = getElementData ( plr, "torba")
destroyElement(torba)
outputChatBox("** Chowasz torb? medyczn?", plr)
outputChatBox("** "..login.." chowa torb? medyczn? do pojazdu", root)
end
end...