Stranger Posted October 24, 2013 Posted October 24, 2013 hello guys i need help in this code cause i don't know what the problem the code : GRID2 = guiCreateGridList(10, 27, 292, 227, false, Wind2) guiGridListAddColumn(GRID2, "Vehicle :", 0.4) guiGridListAddColumn(GRID2, "Cost", 0.4) for i = 1, 15 do guiGridListAddRow(GRID2) end guiGridListSetItemText(GRID2, 0, 2, "$1500000", false, false) guiGridListSetItemColor(GRID2, 0, 2, 22, 243, 11, 255) guiGridListSetItemText(GRID2, 1, 2, "$3500000", false, false) guiGridListSetItemColor(GRID2, 1, 2, 22, 243, 11, 255) guiGridListSetItemText(GRID2, 2, 2, "$4500000", false, false) guiGridListSetItemColor(GRID2, 2, 2, 22, 243, 11, 255) guiGridListSetItemText(GRID2, 3, 2, "$6000000", false, false) guiGridListSetItemColor(GRID2, 3, 2, 22, 243, 11, 255) guiGridListSetItemText(GRID2, 0, 1, "Maverick", false, false) guiGridListSetItemText(GRID2, 1, 1, "Police Maverick", false, false) Select2 = guiCreateButton(10, 264, 292, 25, "Buy", false, Wind2) guiSetFont(Select2, "clear-normal") guiSetProperty(Select2, "NormalTextColour", "FF16F30B") Close2 = guiCreateButton(10, 291, 292, 25, "Close", false, Wind2) guiSetFont(Close2, "clear-normal") guiSetProperty(Close2, "NormalTextColour", "FFFF0000") guiSetVisible(Wind2, false) addEventHandler("onClientGUIClick", root, function() if(source == Select2)then local row, col = guiGridListGetSelectedItem(GRID2) local Veh2 = guiGridListGetItemText(GRID2, row, col) if(Veh2 and Manster4[Veh2])then guiSetVisible(Wind2, false) guiSetInputEnabled(false) if(Veh2 == "Police Maverick")then if (getPlayerMoney(localPlayer) >= 1500000) then takePlayerMoney(localPlayer, 1500000) triggerServerEvent("Vehiclee2", localPlayer, Manster4[Veh2], "Cars2") elseif(Veh2 == "Maverick")then if (getPlayerMoney(localPlayer) >= 3500000) then takePlayerMoney(localPlayer, 3500000) end triggerServerEvent("Vehiclee2", localPlayer, Manster4[Veh2], "[Manster2]") end elseif(source == Close2)then guiSetVisible(Wind2, false) guiSetInputEnabled(false) end end end end )
myonlake Posted October 24, 2013 Posted October 24, 2013 And the problem is...? If I helped you, please click the like button on the right Thanks!
Stranger Posted October 24, 2013 Author Posted October 24, 2013 When i click the button , nothing happens
ViRuZGamiing Posted October 24, 2013 Posted October 24, 2013 Are you sure that u have a server side? If Yes then is there a Function Vehiclee2? don't you mean Vehicle2? triggerServerEvent("Vehiclee2", localPlayer, Manster4[Veh2], "[Manster2]") Maybe a small writing mistake "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now