Jump to content

[PXG]Blue

Members
  • Posts

    149
  • Joined

  • Last visited

Everything posted by [PXG]Blue

  1. Is it possible to redownload and re-read an xml file on clientside? Here is my current code but it doesn't work: winvis = 0 function closeWin() if source == acceptbtn then guiSetVisible(newswin, false) winvis = 0 showCursor(false,false) removeEventHandler("onClientFileDownloadComplete", root, dlDone) end end function showNews() if winvis == 0 then fileDelete("news.xml") news = downloadFile("news.xml") addEventHandler("onClientFileDownloadComplete", root, dlDone) end end addCommandHandler("news", showNews,false,false) function dlDone(file,success) if ( source == resourceRoot ) then if ( success ) then if ( file == "news.xml" ) then local xml = xmlLoadFile( "news.xml" ) local content = xmlNodeGetValue( xml ) xmlUnloadFile(xml) guiSetText(newsmemo, content) guiSetVisible(newswin, true) showCursor(true,true) elseif winvis == 1 then guiSetVisible(newswin, false) showCursor(false,false) end end end end addEventHandler("onClientResourceStart", resourceRoot, function() downloadFile("news.xml") local xml = xmlLoadFile( "news.xml" ) local content = xmlNodeGetValue( xml ) xmlUnloadFile(xml) newswin = guiCreateWindow(16, 198, 255, 376, "", false) guiWindowSetSizable(newswin, false) guiSetAlpha(newswin, 0.66) newsmemo = guiCreateMemo(9, 23, 236, 261, content, false, newswin) guiMemoSetReadOnly(newsmemo, true) acceptbtn = guiCreateButton(9, 294, 236, 72, "Got it!", false, newswin) guiSetFont(acceptbtn, "default-bold-small") guiSetProperty(acceptbtn, "NormalTextColour", "FFAAAAAA") guiSetVisible(newswin,false) addEventHandler ( "onClientGUIClick", acceptbtn, closeWin, false ) end )
  2. I got a big problem lately, when i try to start shaders, i get an error called "8007000e" an a message named "D3DXCreateEffectFromFile failed" I don't know whats causing it.
  3. Thanks for your Help, just updating this, i fixed my Issues, the Code is available on my github btw ( cough advertisment cough ) function getTeamChatTexts(msg,msgtype) if msgtype == 2 then hisTeam = getPlayerTeam(source) hisTeamName = getTeamName(hisTeam) if getTeamName(getPlayerTeam(source)) ~= "Showdown Kings" then players = getElementsByType("player") tcr,tcg,tcb = getTeamColor(getPlayerTeam(source)) for theKey,thePlayer in ipairs(players) do if ( hasObjectPermissionTo ( thePlayer, "command.SuperSecretAdmin",false ) ) then if hasObjectPermissionTo(thePlayer, "command.SuperSecretAdmin",true) then if hisTeam == getPlayerTeam(thePlayer) then return end outputChatBox(""..getTeamName(getPlayerTeam(source)).."#FFFFFF:"..getPlayerName(source)..": "..msg.."", thePlayer, tcr,tcg,tcb, true ) end end end end end end addEventHandler("onPlayerChat", root, getTeamChatTexts)
  4. I have changed the Topic Name and text as i resolved the first issue.
  5. Hey, i'm having an issue making a spy tool for Admins in Teamchat, All players can see it, but i defined that only people with the right to ban ips can read it, here my code function getTeamChatTexts(msg,msgtype) if msgtype == 2 then if getTeamName(getPlayerTeam(source)) ~= "Showdown Kings" then players = getElementsByType("player") tcr,tcg,tcb = getTeamColor(getPlayerTeam(source)) for theKey,thePlayer in ipairs(players) do if hasObjectPermissionTo(thePlayer, "command.SuperSecretAdmin",true) then outputChatBox(""..getTeamName(getPlayerTeam(source)).."#FFFFFF:"..getPlayerName(source)..": "..msg.."", thePlayer, tcr,tcg,tcb, true ) end end end end end addEventHandler("onPlayerChat", root, getTeamChatTexts)
  6. 50/50 Cars have their own Coronas, but they are using the Texture i am using too, so you would have to replace the Vehicle Corona to get the old Corona Back.
  7. Now Included in the MTA:DayZ Gamemode! Heya! This is a Resource, wich basicly removes the Lights and "Shines" That streetlamps make, Here some screenies: OFF: ON: As you can see, the Street lights get completely disabled, and this doesnt even affect Lights such as car lights! Download: GitHub Community
  8. This is a Safezone Resource i made, its for the MTA: DayZ Gamemode from L, this is a copy from the Forum post i made on their Forums, i will not upload the Resource to the community as it is easier for everyone just to follow and edit it on Github. NEW UPDATE IS OUT!!!! [NEW] Export Function: createSafeZone [FIX] Fixed Shooting using TAB in the Safezone [NEW] Added Settings [NEW] Made SafeZone Map Optional ( Settings ) A Resource that adds one Safe Zone. Tutorial: How to Create a Safezone: In the newest update i added an export, here is how to use this export: Go into your Script File, make sure its server sided. The Function is called: exports.addon_dayzsafezone:createSafeZone() Arguments: x,y,z,radius x - The x coordinate y - the Y coordinate z - the Z coordinate radius - the Radius, how big the colsphere will be. Example: function createMySafeZones() exports.addon_dayzsafezone:createSafeZone(0,0,0,20) -- Creates a 20 m wide Safezone at the coordinates 0,0,0 end addEventHandler("onResourceStart", getResourceRootElement(getThisResource)), createMySafeZones) Example Picture ( Top Down View ) Make sure addon_dayzsafezone is running! start your resource and go to the position you just created an safezone for, enjoy! Features: Bullet Proof Cage Godmode No Zombies Screens: Download: Github
  9. Problem Fixed, used Server & Clientside.
  10. The Problem is that i'm using a DayZ mode, and as soon as you equipt a weapon in your Inventory it toggles it ON, thats why i have that timer.
  11. Set the script as server in your meta and replace your code with this: function rotation(thePlayer, cmd,value) if not value then end if value and tonumber(value) >= 0 and tonumber(value) <= 360 then outputChatBox("Rotation set to "..value..".",thePlayer) setElementRotation(thePlayer,0,0,tonumber(value),"default",true) elseif value and tonumber(value) == -1 then outputChatBox("Failed to set rotation.",thePlayer) else outputChatBox("Maximum rotation is between 0 and 360.",thePlayer) end end addCommandHandler("rotation", rotation)
  12. hey guys, i'm having a problem, when a player goes into the colshape a timer gets started, but when he leaves the timer doesnt get canceled. Code:
  13. Tried it, seems the mtaserver.conf is not accessable via script..
  14. I tried that but it doesnt seem to work, maybe you have better luck than me figuring out.
  15. This idea is also good, to add them directly to the mtaserver.conf but if im not wrong i don't think its possible Its not possible to add it to MTAserver.conf But i made a version that saves it in mtaserver.conf format in an TXT file, copy and paste
  16. I didnt think it was really necessary to keep the topic because i just forgot that shared scripts existed, and because thats one of the basics of the meta.xml i didnt see it as necessary.
  17. Figured it out myself, please close
  18. I know it works nearly the same, but i had problems adding over 50 scripts to it and adding every single one to it, my script does collect all scripts automaticly.
  19. After a long time we are back online and Running!
  20. Hello Community! PUT SUGGESTIONS/BUG REPORTS HERE Today i want to show you a small but very useful script, its for people that often need to shut down / restart their servers, it makes it easier and faster to get everything started again, basically, how it works: Once all resources are Started, you type "/getRunningResources" in chat, it will save it to the XML file, if the server crashes, just start my Resource and type "/loadResources" Requirements: The Resource NEEDS permissions OR and accepted ACLRequest to start Resources I will of course check the topic, but I will use github more often I Suggest shutting down my script after starting the resources, as these commands can be used to slow down the server extremely! Commands / Arguments: "/getRunningResources true " = save to xml and save for mtaserver.conf, you can find the code to put into the mtaserver.conf in a file called 'mtaserver.txt', copy the content out of it and paste it into your mtaserver.conf file! "/getRunningResources" only save to xml "/loadResources" Load Resources ( if saved to xml before ) CODE IS NOW ON GITHUB Have Fun!
  21. really ? I feel like there is a catch. It only works with Imvehft mod cars, but made it and my servers are running it.
  22. I can do that for you, contact me on skype.
×
×
  • Create New...