Jump to content

Lietuvis

Members
  • Posts

    16
  • Joined

  • Last visited

About Lietuvis

  • Birthday 02/05/1997

Details

  • Gang
    Peace ♥
  • Location
    Lithuania Forever
  • Occupation
    Worker

Lietuvis's Achievements

Square

Square (6/54)

0

Reputation

  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
×
×
  • Create New...