LabiVila Posted August 8, 2014 Posted August 8, 2014 Hello my comrades; function wdw () local window = guiCreateWindow (0.25, 0.25, 0.50, 0.50, "Cars Paintjob", true) local preview = guiCreateButton (0.65, 0.10, 0.30, 0.13, "Preview", true, window) local buy = guiCreateButton (0.10, 0.65, 0.30, 0.13, "Buy", true, window) buyLabel = guiCreateLabel (0.10, 0.83, 0.40, 0.15, "Price: 50.000$", true, window) local selectList = guiCreateGridList (0.10, 0.10, 0.40, 0.50, true, window) local id = guiGridListAddColumn (selectList, "Car's ID", 0.80) local row1 = guiGridListAddRow (selectList) local row2 = guiGridListAddRow (selectList) local row3 = guiGridListAddRow (selectList) local row4 = guiGridListAddRow (selectList) local row5 = guiGridListAddRow (selectList) guiGridListSetItemText (selectList, row1, id, "Elegy", false, false) guiGridListSetItemText (selectList, row2, id, "Flash", false, true) guiGridListSetItemText (selectList, row3, id, "Jester", false, true) guiGridListSetItemText (selectList, row4, id, "Sultan", false, true) guiGridListSetItemText (selectList, row5, id, "Uranus", false, true) showCursor (true) guiGridListSetSortingEnabled (selectList, false) function previewClick () if (source == preview) then if (guiGridListGetSelectedItem (selectList) == row1) then local elegy = guiCreateStaticImage (0.65, 0.30, 0.30, 0.30, "elegy.png", true, window) elseif (guiGridListGetSelectedItem (selectList) == row2) then local flash = guiCreateStaticImage (0.65, 0.30, 0.30, 0.30, "flash.png", true, window) elseif (guiGridListGetSelectedItem (selectList) == row3) then local jester = guiCreateStaticImage (0.65, 0.30, 0.30, 0.30, "jester.png", true, window) elseif (guiGridListGetSelectedItem (selectList) == row4) then local sultan = guiCreateStaticImage (0.65, 0.30, 0.30, 0.30, "sultan.png", true, window) elseif (guiGridListGetSelectedItem (selectList) == row5) then local uranus = guiCreateStaticImage (0.65, 0.30, 0.30, 0.30, "uranus.png", true, window) end end end addEventHandler ("onClientGUIClick", getRootElement(), previewClick) function buyClick () if (source == buy) then --??????? end end addEventHandler ("onClientGUIClick", getRootElement(), buyClick) end addEventHandler ("onClientResourceStart", getRootElement(), wdw) here's all my script and it shows this: http://www.upload.ee/image/4198840/gta_ ... -04-47.png I'm stuck here and can't seem to find the solution... How can I set the paintjob at a car once I click buy Button forever? With forever I mean no matter if you disconnect... you still have the same "Elegy paintjob" or other car's painjob. I'd really appreciate any answer, feel free to ask for details if you need them. Thanks further
xXMADEXx Posted August 8, 2014 Posted August 8, 2014 You just need to use the function setVehiclePaintjob on a the server-side code. The Ultimate Lua Tutorial! | MTA PHP SDK
LabiVila Posted August 8, 2014 Author Posted August 8, 2014 I mean even if I'm in any other car, when I buy that Elegy paintjob or whatever, next time I use Elegy, it has the paintjob. You know what I mean? I need that for Race gamemode
Max+ Posted August 8, 2014 Posted August 8, 2014 I mean even if I'm in any other car, when I buy that Elegy paintjob or whatever, next time I use Elegy, it has the paintjob. You know what I mean? I need that for Race gamemode use , setElementData --- to set paint data to the car getElementData --- to get the paint data from the car -----if get the data then setVehiclePaintjob - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
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