Jump to content

TimJ

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by TimJ

  1. TimJ

    XML Help

    Im playing with xml at the moment, but what im trying to do is get the players name as the name of the subnode and the content to be their current vehicle but its not working... Heres the code: function xml ( source ) local name = getPlayerNametagText ( source ) local content = getPlayerOccupiedVehicle ( source ) 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) i had a previous version that worked and made a subnode of their player name but put the content as "content" but after changing it to try and work how i wanted to it doesnt work
  2. TimJ

    addcar resource

    Nah it was one where you can just do /addcar then lay out cars and it saves them to the map automatically and in the end it was on the mta community site, just under a different name in case anyone has the same predicament as me: https://community.multitheftauto.com/index.html?p ... ils&id=168 Thanks anyway
  3. TimJ

    addcar resource

    Hi, im looking for the addcar resource for my mta server. Ihave looked all over the forums, the community site and googled it too but no luck, anyone know where i can find it?
  4. I have yet another problem with binds, this time its unbind problem: function onSpawn ( source ) unbindKey ( source, "1", "down", spawn1 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn ) it gives me bad argument... (by the way this is in the same file as the other stuff)
  5. Thanks it works perfectly now
  6. OK, i've hit my next problem. Heres the new code: function greetPlayer ( ) local joinedPlayerName = getClientName ( source ) outputChatBox ( "Welcome, " .. joinedPlayerName .. " please login or register." , source, 255, 255, 255 ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) function spawnMe () fadeCamera ( source, true, 1.0, 0, 0, 0 ) bindKey ( source, "1", "down", spawn1 ) end addEventHandler("onClientLogin",getRootElement(),spawnMe) function spawn1 () spawnPlayer ( source, 0.0, 0.0, 5.0, 90.0, 0 ) end It's telling me theres a bad argument on the spawn player again, but this is the same as it was when it worked and they spawned straight when they logged in WARNING: playerjoin.lua: Bad argument @ 'spawnPlayer' - Line:28
  7. Sorry, just realised i had "Source" not "source" that was stupid of me... oh well ill use this post when i run in to my next problem. Thanks for all your time.
  8. I dont know why it said player value in there lol, but i changed it to Source and still the same problem : [11:11:48] WARNING: playerjoin.lua: Bad argument @ 'spawnPlayer' - Line: 8
  9. The one thing i havnt really done in scripting is spawning players and its just not working out for me. Heres the code: function greetPlayer ( ) local joinedPlayerName = getClientName ( source ) outputChatBox ( "Welcome, " .. joinedPlayerName .. " please login or register." , source, 255, 255, 255 ) spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) it just says bad argument on the spawn player line. Any help will be much appreciated
  10. TimJ

    Nightly Build

    Yeah vista drives me crazy lol- my brother put it on and i have too much stuff to re-format but oh well, at the end of the day i guess it does the job... yes the end of the day because i spend most of the day trying to find out why things dont work properly! lol oh well im going to start over and see what happens, thanks anyway
  11. Im trying to get an MTA Nightly build working and i cant explain the problem apart from the fact that it says "MTA Server.exe has stopped working" Nice pretty Picture: http://the-jteam.co.uk/uploads/help.jpg
  12. i thought you couldnt make peds until MTA 1.0, unless you used a nightly build ?
  13. till you find that object wouldn't a white marker be useful at all... could work
  14. Is it possible to script on GTA3:MTA in lua like in DM?
  15. TimJ

    Help with mapping!!!

    DP 3 will hopefully be out soon but not sure exactly. And scarface, commenting that michael didnt help much wont help any better.
  16. Make it yourself- its not hard download an ingame editor or get the race editor and convert the map to DM
  17. TimJ

    Confused... Help!

    Thanks, i'll give it a go
  18. TimJ

    Confused... Help!

    Sorry to be a noob and a pain but where can i find that?
  19. TimJ

    Confused... Help!

    oh lol that explains it... is it possible to use them in the latest version?
  20. I followed a tutorial on the wiki of creating ped's but when i ran my script i got this error: [17:35:29] start: Requested by {TJT}Tim [17:35:29] Starting pedtest [17:35:29] ERROR: ...ver/mods/deathmatch/resourcecache/pedtest/pedcrt.lua:3: attempt to call global 'createPed' (a nil value) and the script was exactly as it is on the wiki: function pedLoad ( name ) createPed ( 120, 2422.7126464844, 1125.0426025391, 10.8203125 ) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) Whats gone wrong?
  21. Thanks, that kinda helped but i mean more like blink blink blink, not flash flash flash, like one side goes out other comes on, that side goes out other side comes back on if you know what i mean...
  22. Hey im quite new around these forums and a noob to scripting lua so i hope i post this right lol, anyway i have this script which is supposed to make the headlights on a car (designed for police cars really) flassh like left then right then left if you know what i mean... anyway heres the script, its not finished yet because i got stuck but i hope you get the jist of it: function Flash ( source ) playerVehicle = getPlayerOccupiedVehicle ( source ) if ( playerVehicle ) then if ( getVehicleOverrideLights ( playerVehicle ) ~= 2 ) then setVehicleOverrideLights ( playerVehicle, 2 ) state1 = setVehicleLightState ( playerVehicle, 0, 1 ) state2 = setVehicleLightState ( playerVehicle, 1, 0 ) setVehicleLightState ( playerVehicle, 1, 0 ) setTimer ( flash, 1000, 100, state1 ) setTimer ( flash, 500, 100, state2 ) else setVehicleOverrideLights ( playerVehicle, 1, state ) end end end addCommandHandler ( "flash", Flash ) Please help
  23. By the way, i was wanting to make a script like this a while ago for my server so if someone on my server was wearing my clans tag that wasnt in the clan, i could change there name but because im a noob at scripting i failed miserably, i found out about a command which anyone on your server with admin powers can use that makes a player do a command, just type in the console: axec so for example to change a name you could do: aexec n00b87 nick chaos_drift sorry if this is no use at all, Tim
  24. i just stuck all mine in a lua file and used: createVehicle ( model, x, y, z, rx, ry, rz )
  25. Hi im making a map for my server and i have this little file that tells me different object/car id's, but i want a gate like is on the police stations in gta sa that opens and closes, i couldnt find it in my object file because i didnt know what it was called and tried all sorts, so can some one please tell me the object id for this police gate?? thanks in advance. Edit: im a complete noob at this forum i should of put it in Deathmatch serverside... where ever that is...
×
×
  • Create New...