Jump to content

Lietuvis

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by Lietuvis

  1. Well thats was an idea Thanks for your suggestion i will try that next time
  2. Hello since the project wich i was scripting for closed i decided to sell that system Advantages: * Saves car (owner, position, color1, color2, damage, upgrades, paintjobs) * GUI shows an picture of every car so players can know what they buy * Edit Prices * Ability to sell vehicle * Other players wont be able to drive your car * New Interior Screenshots: http://imgur.com/a/Q973s#0 I will give full uncompiled script and i will help if you need to edit/change something. Contact me on skype gytislt14 or by PM. We will deal about price
  3. Tested everything and it looks working fine now -.- Thanks.
  4. Kinda interesting.. When i bought car it output true but when i come to marker it writes that im owner hehe wtf Works i guess
  5. Sure. function Buy1 () local money = getPlayerMoney(source) if (money > 5000) then takePlayerMoney(source,5000) local vehicleModel = 602 local x,y,z = getElementPosition(source) y = y + 10 z = z + 5 local veh = createVehicle(tonumber(vehicleModel),x,y,z) setElementData(veh, "owner", getPlayerName(source)) else outputChatBox ( "You need more cash bro..", source, 255, 255, 255, true ) end end addEvent("Car1",true) addEventHandler( "Car1", getRootElement(), Buy1 )
  6. God the same again.. lol Might this will help: function enterVehicle ( player, seat, jacked ) --when a player enters a vehicle if ( getElementData(source, "owner") and getPlayerName(player) ~= getElementData(source, "owner") ) then cancelEvent() outputChatBox ( "You dont have this vehicle keys..", player, 255, 255, 255, true ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle This works perfectly .. I'am trying to make a script to sell owned car i guess you understand that
  7. false Error getting data or player name.
  8. Still same.. And you forgot end
  9. Error getting data or player name. Everytime sellMarker = createMarker ( -2658.1999511719,-48.599998474121,3.3000001907349, "cylinder", 1.5, 255, 0, 0 ) function sellVeh(source) local gData = getElementData(source, "owner") local gPlayerName = getPlayerName(source) if (gPlayerName ~= false) and (gPlayerName ~= nil) and (gData ~= false) and (gData ~= nil) then if (gPlayerName == gData) then outputChatBox("You are owner so bla bla", source) -- i will put more things later here else outputChatBox("You are not the owner.", source) end else outputChatBox("Error getting data or player name.", source) end end addEventHandler( 'onMarkerHit', sellMarker, sellVeh)
  10. setElementData(veh, "owner", getPlayerName(source)) I set the element data. How do i getElementData exactly ? Edited..
  11. Oh right Sorry thats my bad
  12. Uhm you don't understand my question
  13. Lietuvis

    Q About GUI

    What function should i use if i want to show an image if cursor on the GUI Element ? Thanks for answers
  14. Yup! I made a Car System (Car Shop) Call it however you want ^^ To buy a car you have to walk on a pickup. (You have to be registered and logged in) /register /login Then a GUI window will pop up. If you have enough cash to buy, car will spawn near you otherwise it will output that you need some more cash. Nobody will be able to drive your car, only you. When it blows up it will disappear Also i have added saving system so it will save your car position, color, upgrades, damage. Thanks goes to (GA_Justus) for that. Resource: https://community.multitheftauto.com/index.php?p= ... ls&id=9875 P.S Thats my first release
×
×
  • Create New...