Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Mizudori

  1. He is talking about this. http://www.troubleshooters.com/codecorn/lua/luaif.htm Oh thanks I didn't know that. I know C but new in lua so I used that Np mate ^^ happens
  2. He is talking about this. http://www.troubleshooters.com/codecorn/lua/luaif.htm
  3. Mizudori

    Sql table

    So if you are not begginer in scripting go to https://community.multitheftauto.com/ download random atm script analyse it and do it?
  4. function close_p(button, state) if (source == atmGUI_Button1[3]) then guiSetVisible(atmGUI_Window[1],false) showCursor(false) end end addEventHandler ( "onClientGUIClick", atmGUI_Button1[3],false)
  5. you need to use for Look at example https://wiki.multitheftauto.com/wiki/DbPoll
  6. you did not trigger function createatmGUI() when entering on marker. So there is no gui created and no GUI element called atm_Window[1]
  7. https://wiki.multitheftauto.com/wiki/SetGarageOpen
  8. function SpawnOnBeach() spawnPlayer (source,2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288), 0, 0) end addEventHandler("OnPlayerJoin", getRootElement(), SpawnOnBeach) addEventHandler("OnPlayerWasted", getRootElement(), SpawnOnBeach)
  9. http://www.lua.org/pil/19.2.html
  10. Mizudori

    Won't Spawn

    You mean screen is black or what?? fadeCamera(source, true) setCameraTarget(source, source)
  11. triggerClientEvent (hitPlayer,"openWindow",hitPlayer,hitPlayer)
  12. Yeah, so I guess I should use setElementData ? Maybe like, setElementData(theVehicle "owner") ? Or setAccountData or sth? I am going to use MySQL for this problems but I am new for MySQL Well you can use setVehiclePlateText and getVehiclePlateText, then just add setElementData to owner of the car text-plate + serial, so you will avoid, doing it by nickname and what Citizen said.
  13. You want all cars from the game to be in gridList?? local car_c = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local cars = getElementsByType("vehicle") local column = guiGridListAddColumn( car_c, "Cars_id", 0.85 ) for numb, car in iparis(cars) do local id = getElementModel(car) local row = guiGridListAddRow ( car_c ) guiGridListSetItemText ( car_c, row, column, id, false, true ) end Then you just use form from wiki example of gridList to get data from car_id table. You create server event and trigger it when ID is choosen from gridlist + button clicked
  14. mysql,sql,xml recommend mysql or sql, faster If you want to use mysql and sql you need to use serial of player to recognize the owner of car.
  15. Check that you give it to yourself in code. If this is good mlotov id, and if you are doing it server-side(giveWeapon) not client-side.
  16. You need to save element of car in player element data. While creating car for player, or while first enter, or while player targeting the car. There is many possibilities. Those in lua are just examples of couple function that you can use to get car element. setElementData() onPlayerTarget() onVehicleEnter() onClientVehicleEnter() Or you can just setDataElement for car with owner serial, then loop through all cars searching for the right one with owner serial. Yep but this is less efficient way. For exiting you need to check if car is locked on onClientVehicleStartExit event if yes then cancelEvent() with information. onClientVehicleStartExit() cancelEvent
  17. Then you need to pay money for the scripter. I wonder if you help people all the time for free. This section of forum is about helping with code errors etc not a "get a script for free".
  18. It shows panel from the start beacuse you did not use after creating gui guiSetVisible(GUIEditor.window[1],false) and for buttons function onClickBtn ( button, state ) if (source == button_name) then -- when button click function end end addEventHandler ( "onClientGUIClick", button_name, onClickBtn, false )
  19. Mizudori

    Blips Help

  20. Server-Side https://wiki.multitheftauto.com/wiki/OnResourceStart There was topic about it already if you create object client-side and the object will be destroyable, localPlayer will destroy it and walktrought him, then others client will still have the object and see how the one player who destroyed it is walking inside of that object.
  21. Add this to your meta.xml and restart server client="1.3.0-9.04491" />
  22. Maybe it's resets when they EXIT? addEventHandler("onClientVehicleExit", getRootElement(),StopFunc) addEventHandler("onClientVehicleExit", getLocalPlayer(),StopFunc)
  23. Mizudori

    [HELP] Table

    hmm why no creating normal database and retriev or save data that you need in exact moment?
  24. No problem mate, sometimes those things like to be a pain in the a** Good luck wkth your mysql adventure. It gets better later!
  • Create New...