Jump to content

Help Not working ? whells system


Recommended Posts

local wheelsMarker = createMarker(-1167.3,32.4,13,"cylinder",3.5,253,71,62,100)

        oknoshin = guiCreateWindow(400, 200, 270, 520, "Tekerlek ayarı", false)
        guiWindowSetSizable(oknoshin, false)

        spisokD = guiCreateGridList(15, 25, 240, 300, false, oknoshin)
		
        razmer = guiCreateScrollBar(15, 350, 240, 20, true, false, oknoshin)
        razvall = guiCreateScrollBar(15, 445, 240, 20, true, false, oknoshin)
        shirina = guiCreateScrollBar(15, 400, 240, 20, true, false, oknoshin)
		
		
		
        guiCreateLabel(85, 335, 87, 15, "Tekerlek boyutu ", false, oknoshin)
        guiCreateLabel(85, 430, 87, 15, "Kamber ", false, oknoshin)
        guiCreateLabel(82, 385, 93, 15, "Tekerlek genişliği ", false, oknoshin)
        okay = guiCreateButton(15, 475, 100, 30, "Yüklemek", false, oknoshin)
        closeSh = guiCreateButton(155, 475, 100, 30, "kapat", false, oknoshin)
		
		guiGridListAddColumn(spisokD, "Disk",0.9)
		
		local row = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row, 1, "1", false, false )
		local row1 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row1, 1, "2", false, false )
		local row2 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row2, 1, "3", false, false )
		local row3 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row3, 1, "4", false, false )
		local row4 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row4, 1, "5", false, false )
		local row5 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row5, 1, "6", false, false )
		local row6 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row6, 1, "7", false, false )
		local row7 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row7, 1, "8", false, false )
		local row8 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row8, 1, "9", false, false )
		local row9 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row9, 1, "10", false, false )
		local row10 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row10, 1, "11", false, false )
		local row11 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row11, 1, "12", false, false )
		local row12 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row12, 1, "13", false, false )
		local row13 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row13, 1, "14", false, false )
		local row14 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row14, 1, "15", false, false )
		local row15 = guiGridListAddRow ( spisokD )
		guiGridListSetItemText ( spisokD, row15, 1, "16", false, false )
		    
		guiSetVisible (oknoshin, false)		

addEventHandler("onClientMarkerHit", wheelsMarker,
function()  
    if guiGetVisible (oknoshin ) then  
       guiSetVisible ( oknoshin, false )  
       showCursor(false)  
	else
       guiSetVisible ( oknoshin, true )  
        showCursor(true)  
    end  
end 
)

local function setWheelsData(dataName, dataValue)
	if not tonumber(dataValue) then
		outputChatBox("Yanlış değer")
	end
	localPlayer.vehicle:setData(dataName, tonumber(dataValue))
end
addEventHandler ("onClientGUIClick", getRootElement(),
function ()
if source == okay then

local diskNumber = guiGridListGetItemText(spisokD, guiGridListGetSelectedItem(spisokD))
setWheelsData("WheelsF", diskNumber, w1 )
setWheelsData("WheelsR",  diskNumber, w2 )

local razvalS = guiScrollBarGetScrollPosition(razvall)
setWheelsData("WheelsAngleF", razvalS/100)
setWheelsData("WheelsAngleR", razvalS/100)

local razmerS = guiScrollBarGetScrollPosition(razmer)
setWheelsData("WheelsSize", (razmerS/100)*3)

local shirinaS = guiScrollBarGetScrollPosition(shirina)
setWheelsData("WheelsWidthF", (shirinaS/100)*2)
setWheelsData("WheelsWidthR", (shirinaS/100)*2)
end
if source == closeSh then
    guiSetVisible (oknoshin, false)
	showCursor (false)
end
end
)

Doesn't work. What's wrong?

Edited by Resulcan
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...