Jump to content

Bean

Members
  • Posts

    13
  • Joined

  • Last visited

Bean's Achievements

Square

Square (6/54)

0

Reputation

  1. If you still need an alternative way to do this: Go to http://www.convertffs.com then convert your .map file to MTA createObject. Place that converted code into a table then set the dimension of all of the objects to 50, here's an example. objects = { createObject( 123, 0, 0, 0 ), createObject( 321, 0, 0, 0 ) } for k, v in pairs( objects ) do setElementDimension( v, 50 ) end
  2. Full support, would be an great scripting feature to be made available to the community.
  3. http://puu.sh/2xt6s Enough said.
  4. I read through that page, and thank you very much.
  5. Derp, another question: what would I do if I wanted to just display "test", and disregard the ":110", I tried to turn (pos+1) into (pos-1) but that didn't work.
  6. Ah, awesome. Thank you so much!
  7. Hi, so I'm still learning how to script, and I've been messing around with different functions etc, and I have this: function stringTest(p) local text = "test:110" local found = string.find(text, ":") if (found) then local realtext = text:gsub(":", "") outputChatBox(realtext, p) end addCommandHandler("strings", stringTest) I tried using the gsub function for what I'm trying to do but it didn't really work, but basically. I'm trying to turn " test:110 " into " 110 ", so just removing the ":" and everything behind it, if that makes any sense. I'm guessing I have to use string.format, but I'm not familiar with it. Can anyone at least point me in the right direction please? Thanks.
  8. I'm trying to write an integer, in a meta.xml file. I'm trying to make a command that will overwrite the bolded text. The command would be like /setzombienumber the integer, and that integer would replace the value which is 20. I can't seem to figure out how to overwrite an xml file with the set function like you said.
  9. The reason I have it like that, is because I'd like to be able to change the value of "MaxZombies" even when the 'zombie' resource isn't running, hence I have the script listed above in a resource called 'c-zombies', as in the configuration of it. The reason it's like this is because, if I can only set the value while the resource is running, then people will be flooded with zombies the entire time, I'd like to be able to just set it while the resource 'zombies' isn't running.
  10. Got it working thanks guys.
  11. So pretty much what I'm trying to do, is make an in-game command, that would edit part of the configuration .xml for the zDay script. I think this can be pretty useful, and am wondering if I could get some help with it? I looked through the wiki, and found several XML commands, can someone point out where I went wrong? config = xmlLoadFile("C:\Users\MTAServer\Desktop\server\mods\deathmatch\resources\zombies\meta.xml") function changeMaxZombies(thePlayer, commandName, zombiemax) if not (zombiemax) then outputChatBox("SYNTAX: /" .. commandName .. " [max numbers of zombies to spawn]", thePlayer, 255, 194, 14) else local markernode = xmlFindChild(config, "setting", 0) xmlNodeSetAttribute(markernode, "name="*MaxZombies" value="[" .. zombiemax .. "]"") xmlSaveFile(config) outputChatBox("Done.", thePlayer, 255, 194, 14) end end end addCommandHandler("setzombienumber", changeMaxZombies) And this is the line of XML I am trying to replace: "*MaxZombies" value="[20]" /> I'm trying to replace the integer where 20 is, with the integer of my choice, or zombiemax. So pretty much where it's stuck is, when I type the command with an incorrect syntax, it will give me the syntax to type it in, but when I give it the correct syntax, "Done." does not get outputted, so my problem lies within the XML parts. I'd appreciate any help on this.
  12. I'm basically trying to make it so the player can toggle their own radar GUI, here's the code I made, and I'm very, very new to this, if I could possibly get some help here? function toggleradar(command, onoff, thePlayer) if onoff="1" then setPlayerHudComponent(root, "radar", true, thePlayer) outputChatBox("Radar was turned on.") else if onoff="0" then setPlayerHudComponent(root, "radar", false, thePlayer) outputChatBox("Radar was turned off.") else outputChatBox("Syntax: /setradar [1=on], [0=off]" end addCommandHandler("setradar", toggleradar)
  13. Yeah, there's this big gaping hole where IGS should be, and whenever you drive there, you just fall through the map. I really don't know what to do about it, I'd just like there to be the gas station, like there normally is.
×
×
  • Create New...