Jump to content

BinSlayer1

Members
  • Posts

    491
  • Joined

  • Last visited

Everything posted by BinSlayer1

  1. looking at the debug you posted it looks like everything gets called including the if xmlNodeGetAttribute so just check if it fails here xmlNodeSetAttribute( node,"value","none" ) do this instead of your code: local check = xmlNodeSetAttribute( node,"value","none" ) outputChatBox(tostring(check)) False/True?
  2. BinSlayer1

    Loadstring

    Check this out http://www.lua.org/pil/8.html Assuming you have this: loadedFunc = loadstring('string here') loadedFunc() It doesn't actually say how to remove the loadstring, but I think you can try this: loadedFunc = nil Just check that link, maybe I missed it
  3. I see there are issues with almost all of your resources.. http://code.google.com/p/mtasa-resource ... p&can=2&q= -download this and use the resources from here (all of them) -manually place all your maps in the newly created resource folder along with those updated -scrap dots from filenames and spaces
  4. Then don't put a random event handler without thinking.. You need to rewrite the script almost entirely
  5. The admin panel makes the user execute /nextmap and the command handler for it is in racevoting_server.lua (race resource) Check the command handler and understand how it works from there
  6. there's nothing to get.. you either know how to adapt an existent GUI script to use DX Text or you don't, in which case you're left with 2 choices: -learn lua and do it yourself -sit back, relax, enjoy life and have someone else do it for you in exchange for money (unless there's someone willing to do it for free)
  7. If that is your whole code then you have no idea where to begin, so I'm suggesting: https://wiki.multitheftauto.com/wiki/Scr ... troduction you can't use random variable names like 'player'. They must be defined somewhere or passed via other functions Just check the wiki and read some of the examples there
  8. When you script something big, you'll want to use as many functions as possible so you don't waste much time. Maybe you should start learning more about scripting concepts before you "lol" at people for no reason
  9. frate sincer imi place ce vad din poze, dar daca nu poti sa il tii 24/7 atunci mai bn o lasi balta.. iti spun din experienta cel mai naspa lucru pt un player e sa nu poata sa joace.. el poate sa indure lag, ping, de toate.. dar pur si simplu se va duce altundeva cand nu va putea sa intre la tine parerea mea e sa gasesti host 24/7 sau sa lasi balta ca muncesti degeaba
  10. Oh, then it's not possible with the way I described.. and nobody has actually given you the right answer You need to edit your own gta3.img you can find it somewhere in the gta folder Open it with some img editor (http://grandtheftauto.filefront.com/file/IMG_Tool;44920) change the dff/txd with your own, REBUILD the img and that's it I think however, servers can override ur txd/dff with scripting functions
  11. well you need to make a new resource and leave it on at all times for as long as you want the wheels to be seen also use this (addVehicleUpgrade) every vehicle enter/elementmodel change to force a certain type of tires onVehicleEnter onElementModelChange check the source passed to both events with getElementModel to only force tires for your specific vehicle model
  12. Just don't copy other people's ideas/scripts It is very bad for your reputation to even admit you're trying to do so But then again, there must be a reason why you keep changing your name. And yes, it's very obvious because you always keep the picture
  13. @NeXTreme your script will fail hard if more people type /discovehicle at the same time function rndColors(player, theVehicle) local color = {} color[1] = math.random(0,126) color[2] = math.random(0,126) color[3] = math.random(0,126) color[4] = math.random(0,126) setVehicleColor ( theVehicle, color[1], color[2], color[3], color[4] ) outputChatBox( "Enjoy the PARTY!", player, 0, 255, 0 ) end function makeTimer(player,command) theVehicle = getPedOccupiedVehicle( player ) if ( theVehicle == false ) then outputChatBox ( "Get into a vehicle first!", player, 255, 50, 0, true ) else setTimer( rndColors, 100, 1, player, theVehicle ) outputChatBox ( "You are in vehicle!!", player, 255, 50, 0, true ) end end addCommandHandler("discovehicle", makeTimer )
  14. I wouldn't blame MTA. It just wasn't designed to fit ALL your purposes/needs but it still offers the best customization yet for San Andreas Even if you can't do everything you want in MTA directly you could find workarounds or even help the developers improve it. E.g: I'd like to set ped stats to all characters not just CJ (fat/muscle/etc) but that's just not been done yet and I'm not blaming anyone
  15. I'm not sure if using fileDelete will flush it from the recycle bin too.. so to be sure, you could do open the file, write a useless string starting from byte 0, save the file and then delete it :') https://wiki.multitheftauto.com/wiki/FileOpen https://wiki.multitheftauto.com/wiki/FileSetPos https://wiki.multitheftauto.com/wiki/FileWrite fileFlush, fileClose and fileDelete This way, even if recycle bin has it, it'll be a worthless file :') Oh btw, do this in the bottom of each lua script (because if you do it onClientResourceStart, people can disconnect before resource has started and still obtain it)
  16. Rofl CapY, that returns an INTEGER. @IIYAMA: You can't set the visibility of a weapon since weapons aren't elements You'll need a workaround.. You could maybe force his weapons off when the player visibility is changed and save his weapons and ammo in an array and once you've set his visibility back on then give the player his weapons back
  17. Sorry but you just sound pretty lazy Let's face it, there aren't many resources out there that will use a setElementDimension function.. There's probably the admin panel and a couple more. And it's not like they get updated on daily basis, but on monthly/yearly basis really..
  18. If you REALLY REALLY don't wanna put that code in all resources.. then put it in 1 resource and export setElementDimension and use it like this exports.nameOfResource:setElementDimension(player, 0)
  19. Dimension change event. Put this script in the resource(s) that handle dimension changes: _setElementDimension = setElementDimension function setElementDimension(player, dimension) local bool = _setElementDimension(player, dimension) if bool then --this is used to check if the function actually worked before launching our custom event triggerEvent('onPlayerDimensionChange', player, dimension) end end addEvent('onPlayerDimensionChange', true) addEventHandler('onPlayerDimensionChange', root, function(dimension) outputChatBox(getPlayerName(source).. "'s dimension was changed to: "..dimension) end ) serverside ^
  20. No, you're wrong.. Not even Voice Chat itself is 100% working yet.. Read here about Voice roadmap: https://wiki.multitheftauto.com/wiki/User:Talidan So yes they 'can' do that and that and the other thing but since it takes so long to actually perfect voice, it's safe to assume other advanced features like voice recognition will never be done. (not that they should, pretty useless anyway)
  21. BinSlayer1

    Problems

    the link is just not working I suppose browsers should return something but mine just says "connecting"
  22. BinSlayer1

    SUGGESTIONS!

    KieronWiltshire, what you're asking is simply what wiki has to offer.. https://wiki.multitheftauto.com/wiki/AddEventHandler and https://wiki.multitheftauto.com/wiki/Event_system for your specific question https://wiki.multitheftauto.com/wiki/Scr ... troduction for general scripting stuff https://wiki.multitheftauto.com/wiki/Ser ... _Functions It's very important to go through almost all of these functions so you know what MTA has to offer on the serverside part https://wiki.multitheftauto.com/wiki/Cli ... _Functions same but clientside functions https://wiki.multitheftauto.com/wiki/Ser ... ing_Events and https://wiki.multitheftauto.com/wiki/Cli ... ing_Events for all MTA built-in events. Both client and server The reason such a tutorial (the one you request) doesn't exist in this forum and probably won't ever be created is that reading the wiki from scratch should suffice every scripter's needs. And if there are syntax-related stuff you don't understand, lua has an online tutorial itself: http://www.lua.org/manual/5.1/manual.html I know you won't read the wall of text @ tutorial, because it's simply too much, but let's say you are not familiar with Tables or Strings. Then just use the Find feature in your browser and read that chapter alone
  23. Desktop ~= Chatbox You can't write things "on the desktop", that would be the chatbox. So he was right not to understand
  24. so you'd expect to use a house element for setting? I don't think you can store that in sql so I guess you should just give each house a name or so as a correspondence because the following code works like this setHouseData(string HouseName, string Data) Note: There is no getHouseData. Make it yourself Note2: Might be some errors since I made it on the spot executeSQLCreateTable('houseData', 'dataName TEXT, value TEXT') function setHouseData(houseName, save) if not houseName or not save then return end local sql = executeSQLQuery("SELECT dataName, value FROM houseData WHERE dataName = '"..houseName.."'") if #sql == 0 then executeSQLInsert("houseData", "'"..houseName.."', '"..save.."'") else --data was already set, I'm overriding it, but maybe you'll need some checks here executeSQLUpdate("houseData", "dataName = '"..houseName.."'", "value = '"..save.."'") end end
  25. @OnePiece: Install MTA 1.2 and apply the latest patch from https://nightly.multitheftauto.com/ Make sure you get the 1.2 stable one PS: 1.2.1 doesn't really exist, what's most important is the revision number of the nightly patch http://code.google.com/p/mtasa-blue/sou ... ail?r=3591 r3591 is the first 1.2 build to have building removal functions implemented, so anything > 3591 will work
×
×
  • Create New...