Jump to content

TimJ

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by TimJ

  1. Try looking on the wiki at the gui functions, might help... https://wiki.multitheftauto.com/wiki/Client_Scrip ... _functions Just read through what each function does, its not as hard as it looks.
  2. TimJ

    [help]logingui

    If your having trouble with gui maybe rather than jumping in at the deep end, just get accustomed to the functions and events of gui in more simple ways, e.g a welcome message when you join the server with a close button. Thats how i started any way
  3. TimJ

    Ammunation

    Or, alternatively, you could just download the one that XX3 modified to be compatible with 1.0.x which can be found here: https://community.multitheftauto.com/index.html?p ... ils&id=535 Happy new year btw
  4. Did you remember to add yourself to the admin acl?
  5. TimJ

    Bandwidth?

    Ok.. thanks for your help
  6. TimJ

    Bandwidth?

    Just out of interest, anybody know how much bandwidth an MTA 1.0.X server uses?
  7. I guess you could write an ID for the objects then use getElementByID ( string Name/ID ) in a seperate lua script file. thats what i did in my server with markers anyway
  8. pickup = createPickup ( x, y, z, theType, amount/weapon/model) -- your pickup your making setElementInterior ( pickup, 1 ) -- set its interior to 1 or whatever interior you need. First interior is 0 That should do the trick
  9. Im trying to make the cursor show but it wont and im getting: Bad argument @ 'showCursor' in the console. im typing: showCursor(source, true) help EDIT: Scrap That- Fixed
  10. Thank you that works great and thanks robhol too
  11. i thought about that then thought it might just trigger the event on the client resource start, so i just tried it and it made no difference just triggered the event on resource start
  12. i just added a command handler to the spawner function... which worked which means ive done something wrong with the button i guess...
  13. Theres no error messages. It simply doesnt work
  14. Im confused with GUI triggering server events I tried a couple of times, i tried to use the wiki to help, What i got was: Server: function greetingHandler ( message ) outputChatBox ( "lalala:", source ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), greetingHandler ) Client: button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Test", true ) function spawner ( commandName ) triggerServerEvent ( "onGreeting", getLocalPlayer(), " wowow" ) end addEventHandler ( "onClientGUIClick", button, spawner ) Help would be very kindly appreciated
  15. TimJ

    XML Help

    Well basicly the first part gets the car your in and saves it in a meta file like this: car name e.g <{TJT}Tim>Police{TJT}Tim> I've done that and it works fine, but what i want it to do now is retrieve the information so that it will give you the car saved with your name. And i didnt really understand this:
  16. TimJ

    XML Help

    Thanks all, ive got it working. Now im on the next bit of the script, which "co-incidently" im having trouble with too lol: function getcar ( source ) local name = getPlayerNametagText(source) local xmlFile=xmlLoadFile("xmlfile.xml") if xmlFile then --If it's indeed opened: local node=xmlFindSubNode(xmlFile,"somesubnode",0) local success=xmlNodeGetValue(node) if success then outputChatBox(tostring(success)) end end outputChatBox( "done", source ) warpPlayerIntoVehicle ( playerSource, success ) end addCommandHandler("getcar", getcar) i get this error: Bad Argument @ 'warpPlayerIntoVehicle' - Line: 31 Whats wrong with it ?
  17. TimJ

    XML Help

    Still screwed... Its saying its having probs making the node and editting the content, i dont understand whats wrong there at the moment...
  18. TimJ

    XML Help

    Still not working
  19. TimJ

    XML Help

    K ive changed that: function xml ( source ) local name = getPlayerNametagText(source) local vehicle = getPlayerOccupiedVehicle(source) local content = getVehicleName(vehicle) local xmlFile=xmlLoadFile("xmlfile.xml") local node=xmlCreateSubNode(xmlfile, name) local success=xmlNodeSetValue(node, content) if success then xmlSaveFile(xmlFile) end end addCommandHandler("test", xml) but i get these errors: Bad argument @ 'xmlCreateSubNode' - Line: 7 Bad argument @ 'xmlNodeSetValue' -Line: 8
×
×
  • Create New...