Wei Posted May 10, 2012 Posted May 10, 2012 how can I save the all cars? Diet with russian vodka, lose 3 days in one week !
Castillo Posted May 10, 2012 Posted May 10, 2012 You can use SQLite/MySQL/XML. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Wei Posted May 10, 2012 Author Posted May 10, 2012 ok. 1 question more. How can add on gridlist vehicle IDs. I know that I need to make some kind of table. Diet with russian vodka, lose 3 days in one week !
Castillo Posted May 10, 2012 Posted May 10, 2012 By vehicle ID's you mean their vehicle model? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Wei Posted May 10, 2012 Author Posted May 10, 2012 Yeah Diet with russian vodka, lose 3 days in one week !
Castillo Posted May 10, 2012 Posted May 10, 2012 getElementModel or getVehicleModelFromName San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Wei Posted May 10, 2012 Author Posted May 10, 2012 getElementModel or getVehicleModelFromName But how can I add or wich table i need to create... I've worked with players but not with vehicles Diet with russian vodka, lose 3 days in one week !
Castillo Posted May 10, 2012 Posted May 10, 2012 You want all server vehicles currently created? if so use: for index, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do -- Code here end San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Wei Posted May 10, 2012 Author Posted May 10, 2012 I want to make a list of vehicles. I want to make a kind of carshop. Diet with russian vodka, lose 3 days in one week !
Axel Posted May 10, 2012 Posted May 10, 2012 local vehs = getElementsByType("vehicle") for i,v in ipairs (vehs) do local carId = getVehicleNameFromModel(v) local row = guiGridListAddRow(yourList) -- change yourList to your list's name.. guiGridListSetItemText (yourList, row, 1, carID, false, true) guiGridListSetItemText (yourList, row, 2, v, false, true) end
Wei Posted May 10, 2012 Author Posted May 10, 2012 thanks man Diet with russian vodka, lose 3 days in one week !
Wei Posted May 10, 2012 Author Posted May 10, 2012 function carSpawn () local Acc = getPlayerAccount( source ) local x,y,z = getElementPosition (source) local theFar = getAccountData( Acc, "theCar" ) veh = createVehicle(tonumber (theFar), x,y,z) warpPedIntoVehicle( source, veh ) end addCommandHandler( "spawnMyCar", carSpawn) whats the problem ? Diet with russian vodka, lose 3 days in one week !
Axel Posted May 10, 2012 Posted May 10, 2012 function carSpawn () local acc = getPlayerAccount(source) local x,y,z = getElementPosition(source) local theCar = getAccountData(Acc,"theCar") veh = createVehicle(tostring(theCar),x,y,z) warpPedIntoVehicle(source,veh) end addCommandHandler( "spawnMyCar", carSpawn)
Edikosh998 Posted May 10, 2012 Posted May 10, 2012 function carSpawn (source) -- local Acc = getPlayerAccount( source ) local x,y,z = getElementPosition (source) local theFar = getAccountData( Acc, "theCar" ) veh = createVehicle(tonumber (theFar), x,y,z) warpPedIntoVehicle( source, veh ) end addCommandHandler( "spawnMyCar", carSpawn) WRS( World Racing Server) [server] = 8%
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