Jump to content

jwalks

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by jwalks

  1. jwalks

    HELP LUA

    [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:168: Bad argument @ 'xmlNodeFindChild' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:169: Bad argument @ 'xmlNodeGetChildren' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:123: Bad argument @ 'xmlNodeFindChild' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:124: Bad argument @ 'xmlCreateChild' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:125: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:126: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:127: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:128: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:129: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:130: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:131: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:132: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:133: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:134: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:135: Bad argument @ 'xmlNodeSetAttribute' [2011-01-09 16:31:27] WARNING: lolmode\gui_s.lua:136: Bad argument @ 'xmlNodeSetAttribute' when i try to create a new player this pops up i can see the players i already have but trying to make a new one fails i can see the character's that i placed in the players.xml
  2. jwalks

    HELP LUA

    function findPlayerIndexByName (playeraccountname) local root = xmlLoadFile ("players.xml") local allPlayers = xmlNodeGetChildren (root) local k = -1 for i,v in ipairs (allPlayers) do k = k+1 if (xmlNodeGetAttribute (v,"name") == playeraccountname) then return k end end xmlUnloadFile (root) end
  3. jwalks

    HELP LUA

    <players> <player name="JasperNL=D"> <character name="JasperNL=D" skin="106" cr="255" cg="127" cb="0" px="-1959.99609375" py="284.21875" pz="36.46875" pi="0" pd="0" cash="99999549" bank="6255" health="54.117649078369" armor="0" house="0"> <weapons w="0" wammo="1" /> </character> <character name="JasperNL=O" skin="106" cr="127" cg="255" cb="0" px="-1973.9951171875" py="294.1162109375" pz="36.171875" pi="0" pd="0" cash="703" bank="92501496" health="65.098037719727" armor="0" house="1"> <weapons w="0" wammo="1" /> </character> </player> </players>
  4. jwalks

    HELP LUA

    --[[ Hello downloader:> When you want to set something to the "character data", you need to do the following things local accountName = getAccountName(getPlayerAccount(source)) local characterindex = getCharacterIndexByCharacterName (accountName,charactername) local root = xmlLoadFile ("players.xml") local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName(accountName)) if (characterindex) then local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) xmlNodeSetAttirbute (characterRoot,"tag",thingyouwanttosave) -- You can load with this local loadedpart = xmlNodeGetAttirbute (characterRoot,"tag") -- You can load with this end ]]-- addEvent ("lolmodLoginPlayer",true) addEventHandler ("lolmodLoginPlayer",getRootElement(), function(username,password) local account = getAccount (username,password) if (account) then logIn (source,account,password) local root = xmlLoadFile ("players.xml") if (xmlFindChild (root,"player",findPlayerIndexByName (tostring(username)))) then local playerNode = xmlFindChild (root,"player",findPlayerIndexByName (tostring(username))) triggerClientEvent ("lolmodOpenInfoWindow",source,"Welcome back! click your character to start!") local character = xmlNodeGetChildren (playerNode) if (character[3]) then triggerClientEvent (source,"lolmodOpenCharacterSelectWindow",source,username,xmlNodeGetAttribute(character[1],"name"),xmlNodeGetAttribute(character[2],"name"),xmlNodeGetAttribute(character[3],"name")) elseif (character[2]) then triggerClientEvent (source,"lolmodOpenCharacterSelectWindow",source,username,xmlNodeGetAttribute(character[1],"name"),xmlNodeGetAttribute(character[2],"name")) elseif (character[1]) then triggerClientEvent (source,"lolmodOpenCharacterSelectWindow",source,username,xmlNodeGetAttribute(character[1],"name")) else triggerClientEvent (source,"lolmodOpenCharacterSelectWindow",source,username) end else local playerNode = xmlCreateChild (root,"player") xmlNodeSetAttribute (playerNode,"name",tostring(username)) triggerClientEvent ("lolmodOpenInfoWindow",source,"Welcome!\nWe see it's your first time here, welcome to Lolmode!\nYou haven't got a character yet, but you can make one when you click New Character!\nGood luck in the game!") triggerClientEvent (source,"lolmodOpenCharacterSelectWindow",source,username) xmlSaveFile (root) end xmlUnloadFile (root) else triggerClientEvent (source,"lolmodOpenInfoWindow",source,"Sorry, your login values are invalid!\n\nMake sure the account is exist, and if the password is spelled well.\nThere also are some illegal strings, these you mayn't have in your name. Only A-Z a-z _ - and 0-9 (When you found a string which isn't in, we aren't responsible for when you lose all data!)\nsorry for the inconvenience.") end end) -- © JasperNL=D addEvent ("lolmodRegisterPlayer",true) addEventHandler ("lolmodRegisterPlayer",getRootElement(), function(username,password) local account = getAccount (username) if (account) then triggerClientEvent ("lolmodOpenInfoWindow",source,"We're sorry, but this account is already in use!\nPlease take another one \n\nNOTE: This is not your in-game name! so every name is good :D") else addAccount (username,password) triggerClientEvent ("lolmodOpenInfoWindow",source,"That's all! Your account is registered! You can log in now by clicking the Log In! button! then you can create a character which you play the game with!\nGood luck!") end end) -- © JasperNL=D addEvent ("lolmodSpawnCharacter",true) addEventHandler ("lolmodSpawnCharacter",getRootElement(), function(charactername) if (charactername) then local accountName = getAccountName(getPlayerAccount(source)) local characterindex = getCharacterIndexByCharacterName (accountName,charactername) local root = xmlLoadFile ("players.xml") local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName(accountName)) if (characterindex) then local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) spawnPlayer (source,tonumber(xmlNodeGetAttribute (characterRoot,"px")),tonumber(xmlNodeGetAttribute (characterRoot,"py")),tonumber(xmlNodeGetAttribute (characterRoot,"pz")),0,tonumber(xmlNodeGetAttribute (characterRoot,"skin")),tonumber(xmlNodeGetAttribute (characterRoot,"pi")),tonumber(xmlNodeGetAttribute (characterRoot,"pd")),nil) toggleControl (source,"chatbox",true) createBlipAttachedTo (source,0,2,tonumber(xmlNodeGetAttribute (characterRoot,"cr")),tonumber(xmlNodeGetAttribute (characterRoot,"cg")),tonumber(xmlNodeGetAttribute (characterRoot,"cb")),255) setPlayerMoney (source,tonumber(xmlNodeGetAttribute (characterRoot,"cash"))) setPlayerNametagText (source,tostring(xmlNodeGetAttribute (characterRoot,"name"))) setPlayerNametagColor (source,tonumber(xmlNodeGetAttribute (characterRoot,"cr")),tonumber(xmlNodeGetAttribute (characterRoot,"cg")),tonumber(xmlNodeGetAttribute (characterRoot,"cb"))) setPedArmor (source,tonumber(xmlNodeGetAttribute (characterRoot,"armor"))) setElementHealth (source,tonumber(xmlNodeGetAttribute (characterRoot,"health"))) local weapons = xmlFindChild (characterRoot,"weapons",0) if (weapons) then local weapon = xmlNodeGetAttributes (weapons) giveWeapon (source,weapon["w"],weapon["wammo"],true) end setCameraTarget (source,source) outputChatBox (getPlayerNametagText (source) .. "#FF0000 has joined the game [Logged In]",getRootElement(),255,0,0,true) local cash = xmlNodeGetAttribute (characterRoot,"cash") local bank = xmlNodeGetAttribute (characterRoot,"bank") local housenumber = xmlNodeGetAttribute (characterRoot,"house") if not (housenumber) then local housenumber = nil local housenumber = "No house Availible" end triggerClientEvent (source,"lolmodHideCharacterSelectWindow",source) triggerClientEvent (source,"lolmodRefreshBankInfoMenu",source,cash,bank,housenumber) xmlUnloadFile (root) end else triggerClientEvent ("lolmodOpenInfoWindow",source,"You need to select a character first!") end end) -- © JasperNL=D addEvent ("createNewCharacter",true) addEventHandler ("createNewCharacter",getRootElement(), function(skin,colred,colgreen,colblue,charactername) local accountName = getAccountName (getPlayerAccount(source)) if (getCharacterCount (accountName) < 3) then if not (checkCharacterNameIsFake(charactername) == "FAKE") then local root = xmlLoadFile ("players.xml") local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName))) local newCharacter = xmlCreateChild (playerRoot,"character") xmlNodeSetAttribute (newCharacter,"name",charactername) xmlNodeSetAttribute (newCharacter,"skin",skin) xmlNodeSetAttribute (newCharacter,"cr",colred) xmlNodeSetAttribute (newCharacter,"cg",colgreen) xmlNodeSetAttribute (newCharacter,"cb",colblue) xmlNodeSetAttribute (newCharacter,"px",2000.51) xmlNodeSetAttribute (newCharacter,"py",1567.37) xmlNodeSetAttribute (newCharacter,"pz",15.367185) xmlNodeSetAttribute (newCharacter,"pi",0) xmlNodeSetAttribute (newCharacter,"pd",0) xmlNodeSetAttribute (newCharacter,"cash",1000) xmlNodeSetAttribute (newCharacter,"bank",1500) setTimer (logOut,1000,1,source) xmlSaveFile (root) xmlUnloadFile (root) else triggerClientEvent ("lolmodOpenInfoWindow",source,"Sorry, this character name is already in use.") end else triggerClientEvent ("lolmodOpenInfoWindow",source,"Sorry, the character max is 3 characters!\nYou have: 3 characters!\nYou can't add new ones any more!") end end) -- © JasperNL=D function getCharacterIndexByCharacterName (playeraccountname,charactername) local root = xmlLoadFile ("players.xml") local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (playeraccountname)) local allCharacters = xmlNodeGetChildren (playerRoot) j = 0 for i,v in ipairs (allCharacters) do j = j+1 if (xmlNodeGetAttribute (v,"name") == charactername) then return j end end xmlUnloadFile (root) end -- © JasperNL=D function getCharacterCount (playeraccountname) local root = xmlLoadFile ("players.xml") local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (playeraccountname)) local allCharacters = xmlNodeGetChildren (playerRoot) if (allCharacters) then k = 0 for i,v in ipairs (allCharacters) do i keep getting this error mesage and i have attempted it [2011-01-08 05:07:27] WARNING: lolmode\gui_s.lua:152: Bad argument @ 'xmlNodeFindChild' [2011-01-08 05:07:27] WARNING: lolmode\gui_s.lua:153: Bad argument @ 'xmlNodeGetChildren' [2011-01-08 05:07:27] ERROR: lolmode\gui_s.lua:155: bad argument #1 to 'ipairs' (table expected, got boolean) [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:168: Bad argument @ 'xmlNodeFindChild' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:169: Bad argument @ 'xmlNodeGetChildren' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:123: Bad argument @ 'xmlNodeFindChild' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:124: Bad argument @ 'xmlCreateChild' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:125: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:126: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:127: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:128: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:129: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:130: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:131: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:132: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:133: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:134: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:135: Bad argument @ 'xmlNodeSetAttribute' [2011-01-08 05:07:42] WARNING: lolmode\gui_s.lua:136: Bad argument @ 'xmlNodeSetAttribute'
  5. the resources fail to start i cant find why and shuts the server down
  6. jwalks

    HELP

    no the older viersoin like the same way paradise roleplay was released
  7. jwalks

    HELP

    does anyone know where i can find the game mode the vallhalla released please and thank you
  8. jwalks

    [HELP]LUA

    function spawnVehs() for k, v in ipairs (getElementsByType("veh")) do createVehicle(getElementData(v,"model"),getElementData(v,"posX"),getElementData(v,"posY"),getElementData(v,"posZ"),0,0,getElementData(v,"rotation")) end for k, v in ipairs (getElementsByType("vehicle")) do toggleVehicleRespawn(v,true) setVehicleIdleRespawnDelay(v,120000) end end addEventHandler("onResourceStart",getResourceRootElement(),spawnVehs) function respawnVeh() setTimer(respawnVehicle,5000,1,source) end addEventHandler("onVehicleExplode",getRootElement(),respawnVeh) [2011-01-21 17:05:42] WARNING: Bad 'element' pointer @ 'respawnVehicle'(1) i get this warning symbol
  9. im not sure wat line ur telling me to fix cuz its the same thing i got
  10. Editor = {} Gate = {} Gate2 = {} Precision = {} status = {} coll = {} coll2 = {} coll3 = {} coll4 = {} -- this script mod is (no longer) PRIVATE -- - Deject3d function startBuilding(playerSource, commandName, objectid) if not objectid then outputChatBox("usage: /addgate objectid teamname", playerSource) return false end local team = getTeamName(getPlayerTeam(playerSource)) if team then team = getTeamName(team) else team = "" end end for i = 1,20 do if Editor[i] == playerSource then destroyElement(Gate[i]) Gate[i] = null Editor[i] = null Precision[i] = null end if Editor[i] == null then Editor[i] = playerSource -- set Editor[i] to who made the object --creating object -v local x,y,z = getElementPosition(playerSource) object = createObject ( objectid, x + 3,y + 3,z) interior = getElementInterior ( playerSource ) setElementInterior(object,interior) --created object -^ Gate[i] = object -- added object identifier to the array, corresponds to who created it Precision[i] = .5 -- default precision bindKey(playerSource, "i", "down", moveIt) bindKey(playerSource, "j", "down", moveIt) bindKey(playerSource, "k", "down", moveIt) bindKey(playerSource, "l", "down", moveIt) bindKey(playerSource, "mouse_wheel_up", "down", moveIt) bindKey(playerSource, "mouse_wheel_down", "down", moveIt) bindKey(playerSource, "pgup", "down", moveIt) bindKey(playerSource, "pgdn", "down", moveIt) bindKey(playerSource, "u", "down", moveIt) bindKey(playerSource, "o", "down", moveIt) bindKey(playerSource, "[", "down", moveIt) bindKey(playerSource, "]", "down", moveIt) bindKey(playerSource, "enter", "down", nextPosition ,objectid, team) bindKey(playerSource, "delete", "down", removeIt, playerSource) break -- done adding our object and who created it to the arrays... stop the loop end end end function nextPosition(playerSource, key, keyState, objectid, team)
  11. wat am i sopose to fix in the script to make it work?
  12. 18:09:13] SCRIPT ERROR: gatemaker\server.lua:20: ')' expected near 'kw2' [18:09:13] WARNING: Loading script failed: gatemaker\server.lua:20: ')' expected near 'kw2' this comes up wen i put it in
  13. jwalks

    House_system

    is anyone releasing a house system?
  14. Editor = {} Gate = {} Gate2 = {} Precision = {} status = {} coll = {} coll2 = {} coll3 = {} coll4 = {} -- this script mod is (no longer) PRIVATE -- - Deject3d function startBuilding(playerSource, commandName, objectid) if not objectid then outputChatBox("usage: /addgate objectid teamname", playerSource) return false end local team = getTeamName(getPlayerTeam" class="kw2">getPlayerTeam(playerSource)) if team then team = getTeamName(team) else team = "" end end for i = 1,20 do if Editor[i] == playerSource then destroyElement(Gate[i]) Gate[i] = null Editor[i] = null Precision[i] = null end if Editor[i] == null then Editor[i] = playerSource -- set Editor[i] to who made the object --creating object -v local x,y,z = getElementPosition(playerSource) object = createObject ( objectid, x + 3,y + 3,z) interior = getElementInterior ( playerSource ) setElementInterior(object,interior) --created object -^ Gate[i] = object -- added object identifier to the array, corresponds to who created it Precision[i] = .5 -- default precision bindKey(playerSource, "i", "down", moveIt) bindKey(playerSource, "j", "down", moveIt) bindKey(playerSource, "k", "down", moveIt) bindKey(playerSource, "l", "down", moveIt) bindKey(playerSource, "mouse_wheel_up", "down", moveIt) bindKey(playerSource, "mouse_wheel_down", "down", moveIt) bindKey(playerSource, "pgup", "down", moveIt) bindKey(playerSource, "pgdn", "down", moveIt) bindKey(playerSource, "u", "down", moveIt) bindKey(playerSource, "o", "down", moveIt) bindKey(playerSource, "[", "down", moveIt) bindKey(playerSource, "]", "down", moveIt) bindKey(playerSource, "enter", "down", nextPosition ,objectid, team) bindKey(playerSource, "delete", "down", removeIt, playerSource) break -- done adding our object and who created it to the arrays... stop the loop end end end i get this error message [18:57:32] SCRIPT ERROR: gatemaker\server.lua:66: '' expected near 'end' [18:57:32] WARNING: Loading script failed: gatemaker\server.lua:66: '' expe cted near 'end'
  15. jwalks

    help

    im just a beginner level at scripting and still learning
  16. jwalks

    help

    what am i sopose to do with that
  17. jwalks

    help

    can somebody help me because i am trying to get how to make all the vehicles in your game server respawn
  18. how will i add the rescource
  19. function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("You must be logged in to change your password.", player) return end end end function loginHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then outputChatBox("If you want to change your password, use /changepw", player) triggerClientEvent (player, "hideLoginWindow", getRootElement()) else triggerClientEvent (player, "unknownError", getRootElement()) end else triggerClientEvent (player, "loginWrong", getRootElement()) end end function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then warning at lines 31,32
×
×
  • Create New...