Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About matucha123

  • Rank
    Advanced Member
  1. I need to read that in LUA, while gamemode running
  2. Thank you! Is there way to know which EDF (editor definitions) are added to map?
  3. How read settings from map meta? "MiniMissions" type="map" version="1.0.0"> "MiniMiss.map" dimension="0"> "#greenteamskins" value='[ "0" ]'> "#greenteamcolor" value='[ "#00FF00FF" ]'> "#maxplayers" value="[ 128 ]"> "#gamespeed" value="[ 1 ]"> "#greenteamob" value='[ "Kill other teams" ]'> "#respawndissable" value="[ 0 ]"> "#minplayers" value="[ 0 ]"> "#weather" value="[ 0 ]"> "#gravity" value="[ 0.008000 ]"> "#waveheight" value="[ 0 ]"> "#greenteamname" va
  4. In gamemode settings (in mapeditor) I select that there would be 3 teams and set their names. How make than then I put spwan point, in it's setting appears created teams.
  5. OK. I have questions about edf. Lets say in setting I chose gametype, and elements (like spawnpoint, marker and etc) change, lets say in gamemode settings I enter that there would be 3 teams. Is it possible that in definitions would be 3 teams after changing? now teams is created like this: EDF "team" type="selection:Team1,Team2" default="TeamA" />
  6. Yeah for now random would be OK. Later I will add random spawns for different teams. BTW map file: "MiniMissions,editor_main"> "minispwanpoint (2)" team="Team1" rotZ="0" model="0" posX="2480.1999511719" posY="-1658.6999511719" posZ="13.300000190735" rotX="0" rotY="0"> "minispwanpoint (3)" team="Team2" rotZ="0" model="0" interior="0" posX="2467" posY="-1657.6999511719" posZ="13.300000190735" rotX="0" rotY="0">
  7. I dont want that indexes is predefined, i want what indexes names is set while runinning script: Server full script spawnPoints = {} spawnPoints["Team1"] = {} spawnPoints["Team1"][1] = {} --[[addEventHandler( "onPlayerWasted", root, function() setTimer( spawnPlayer, 2000, 1, source, get("startx"),get("starty"), get("startz"), get("startrot")) end )]] function loadMap(startedMap) mapRoot = getResourceRootElement(startedMap) loadSpawns( ) end addEventHandler("onGamemodeMapStart", root, loadMap) function loadSpawns() local spawn = getEle
  8. How crate multiply table (in other languages 2d, 3d arrays)? I want something like that: spwanPoints[team][key]["x"] = x spwanPoints[team][key]["y"] = y spwanPoints[team][key]["z"] = z spwanPoints[team][key]["r"] = r Tried: spwanPoints = {keyss = {valuses={}}} Error:
  9. I tried to create EDF and run into problem, it wont load (no special errors): "Mygame"> "minispwanpoint" friendlyname="Teams spawnpoint" > "position" type="coord3d" required="true" default="0,0,0" /> "team" type="number" default="1" /> "model" type="skinID" required="true" default=0"/> " type="number" required="true" default="0" /> " model="!model!" rotZ="!rotZ!" /> Solved!
  10. I need that only player can see vehicle I needed cursors function thanks!
  11. I have shop. Then players enters it (pick pickup), I set camera to look at car (which is selected in GUI). How can I do rotation with mouse (You holding mouse button pressed on screen and drag it right or left and car rotates, its hard to explain...) And it should be client side because car is created in client side.
  12. Thank you This is working. But how put name and price values in table under id? (I don't know if I said whis right ) Let's say Infernus id = 411, how put "name" and "price" under this id in table?
  13. OK I'm newbie in LUA Now I'm trying to make loading from XMl file. My script(client side): local carlist = {} function updateCarsList () local meta = xmlLoadFile("carshop/settings.xml") local id = xmlNodeGetAttribute(meta, "id") local name = xmlNodeGetAttribute(meta, "name") local price = xmlNodeGetAttribute(meta, "price") carlist[tonumber(id)] = name xmlUnloadFile(meta) outputDebugString(tostring(carlist[411])) end XML file: "411" name="Infernus" price="180000" /> How can I put all 3 values in table? How read all lines? Can some
  • Create New...