nasserdfdd Posted August 7, 2015 Share Posted August 7, 2015 hi all so i made a veh spawn i made not custom gui cuz idk how so please any could help me cuz i dont know how to make custom gui script client local client = getLocalPlayer() local rootElement = getRootElement() local theMarker = nil vehicle_selector_window = guiCreateWindow(0.3555,0.2318,0.3027,0.4479,"Vehicles Spawner",true) guiWindowSetSizable(vehicle_selector_window,false) guiSetVisible(vehicle_selector_window,false) vehicle_selector_grid = guiCreateGridList(0.029,0.0698,0.9419,0.7762,true,vehicle_selector_window) guiGridListAddColumn(vehicle_selector_grid,"Vehicle name:",0.9) vehicle_selector_select = guiCreateButton(0.1194,0.8779,0.3194,0.0756,"Use",true,vehicle_selector_window) vehicle_selector_close = guiCreateButton(0.5742,0.8808,0.3194,0.0756,"Close",true,vehicle_selector_window) addEventHandler("onClientGUIClick",rootElement, function () if (source == vehicle_selector_close) then guiSetVisible(vehicle_selector_window,false) showCursor(false) elseif (source == vehicle_selector_select) then local row,col = guiGridListGetSelectedItem(vehicle_selector_grid) if row and col and row ~= -1 and col ~= -1 then local vehicleName = guiGridListGetItemText(vehicle_selector_grid, row, col) triggerServerEvent("vehicle_spawn",client,client,getVehicleModelFromName(vehicleName),theMarker) guiSetVisible(vehicle_selector_window,false) showCursor(false) end end end) addEvent("show_vehicle_selector",true) addEventHandler("show_vehicle_selector",rootElement, function (vehiclesTable,marker) theMarker = marker guiSetVisible(vehicle_selector_window,true) showCursor(true) guiGridListClear(vehicle_selector_grid) for i,v in pairs(vehiclesTable) do local row = guiGridListAddRow(vehicle_selector_grid) guiGridListSetItemText(vehicle_selector_grid, row, 1, getVehicleNameFromModel(v), false, false) end end) note i wont put server cuz server does not have gui but if u need it i will put it Link to comment
HUNGRY:3 Posted August 7, 2015 Share Posted August 7, 2015 what's the problem? and why you can't fix it when your scripting skills is 92% ._. Link to comment
SpecT Posted August 7, 2015 Share Posted August 7, 2015 what's the problem?and why you can't fix it when your scripting skills is 92% ._. There is no problem with the script but he wants "custom" gui a.k.a. DX. To the author of this topic : https://wiki.multitheftauto.com/wiki/Tu ... _DX_Window You can find there all the dx drawing functions that you could use to remake your gui. Link to comment
nasserdfdd Posted August 7, 2015 Author Share Posted August 7, 2015 can any one edit my script so he give me example cuz iam very bad customgui Link to comment
nasserdfdd Posted August 8, 2015 Author Share Posted August 8, 2015 pls anyone help ,me edit:also if i used dxgui i just need it custom Link to comment
GTX Posted August 8, 2015 Share Posted August 8, 2015 This is not a request forum. We won't script for you. Use pre-made DX GUI. Link to comment
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