Snow-Man Posted May 12, 2014 Posted May 12, 2014 elseif ( state == "left" ) and ( source == gridlist ) then local vehicle = tonumber(guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 2)) if vehicle then mo = getElementModel(vehicle) previewVehicle = createVehicle( mo, 1982.9794921875, 2044.2698974609 ,10.8203125) setCameraMatrix( 1971.8072509766, 2031.4422607422, 28.789499282837, 1972.1690673828, 2031.8653564453, 27.958776473999) end i post part of my script, when i click on car in gridlist it won't be created help please debugs : @getElementModel bad argument and createVehicle the same debug USC Informations Head Staff & Owner Of USC. Youtube Channel : My Channel
WASSIm. Posted May 12, 2014 Posted May 12, 2014 elseif ( state == "left" ) and ( source == gridlist ) then local id = tonumber(guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 2)) if id then previewVehicle = createVehicle( id, 1982.9794921875, 2044.2698974609 ,10.8203125) setCameraMatrix( 1971.8072509766, 2031.4422607422, 28.789499282837, 1972.1690673828, 2031.8653564453, 27.958776473999) end
Karuzo Posted May 12, 2014 Posted May 12, 2014 Creating vehicles client-side is useless. Since if you create the vehicles client-side you can't enter the car. So better trigger to the server and create it there.
Snow-Man Posted May 12, 2014 Author Posted May 12, 2014 Creating vehicles client-side is useless.Since if you create the vehicles client-side you can't enter the car. So better trigger to the server and create it there. i know, i only need when i click on car in gridlist it show me vehicle USC Informations Head Staff & Owner Of USC. Youtube Channel : My Channel
Dealman Posted May 12, 2014 Posted May 12, 2014 I think you'll need to use getVehicleModelFromName instead of getElementModel. Can't tell since I don't know how you setup the gridlist. But I'm assuming it's a list of the vehicle names. If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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