Jump to content

ReZurrecti0n

Members
  • Posts

    123
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by ReZurrecti0n

  1. Thank you for the response, that's what I was thinking too. Because by changing the values of the data, only then does it appear correctly when using getElementData (Meaning the new player element is made aware of the data when it changes) But when the getElementData is called for a 2nd time around, it seems that the data is lost. Now that is something I haven't figured out at all yet. It works before (First time around), but then all of a sudden the data isnt availible anymore for that player client the second time around, I don't understand why: What would have caused it to lose the data? Perphaps the link or connection (communication) between the Server/Client is broken after all functions have been completed (Therefore I mean before clicking on any gui button)?
  2. Thank you... Okay, please ignore the simple mistakes (Such as "Set" instead of "set") I'm fixing these up though as I noticed them, but this isn't my actual code, just used as examples (Another words, I can assure you that's not the reason it doesn't work)
  3. Thank you for the response, I've been to the Wiki and even quite a few threads regarding these 2 functions and also Globals. What I don't understand is how it works the first time, but not the second time and only works if the data was changed (In the 2 examples I've just posted) UPDATE: Actually, I think I'm seeing a pattern here, at least why it doesnt work in the 2nd example the 2nd time it is run (Because its not serversidetriggered etc.), but still doesn't explain why it doesn't work in the 1st example at all
  4. I've decided that it's probably best to provide an example code, so: FIRST EXAMPLE: Server.lua function SetData() setElementData(root,"Test",100) end function PlayerSetup() triggerClientEvent("onClientStart",source) end addEventHandler("onResourceStart",getRootElement(),SetData) addEventHandler("onPlayerJoin",getRootElement(),PlayerSetup) Client.lua function Perform() Test=GetElementData(root,"Test") outputConsole(Test) end addEvent("onClientStart",true) addEventHandler("onClientStart",getRootElement(),Perform) This would print "false" in the Console Window instead of "100" SECOND EXAMPLE: Server.lua function SetData() setElementData(root,"Test",100) end function PlayerSetup() setElementData(root,"Test",getElementData(root,"Test")+1) -- NEWLY ADDED setElementData(root,"Test",getElementData(root,"Test")-1) -- NEWLY ADDED triggerClientEvent("onClientStart",source) end addEventHandler("onResourceStart",getRootElement(),SetData) addEventHandler("onPlayerJoin",getRootElement(),PlayerSetup) Client.lua function Perform() Test=GetElementData(root,"Test") outputConsole(Test) end -- The entire function below is NEWLY ADDED function ButtonClicked() -- The gui code isn't actually listed here, but exists Perform() end addEvent("onClientStart",true) addEventHandler("onClientStart",getRootElement(),Perform) This would print "100" in the Console Window, but then would print "false" in the Console Window (If that gui button were clicked) "2nd Time Around" Now you'll have a much better picture of my problem, so how could I resolve this?
  5. Perphaps if I understood the root more, so what is the root exactly? I know it's the very bottom of a tree and whatnot, but I don't know what the bottom of that tree is, the script itself maybe? Now even after all this is fixed by changing all the data just so the client acknowledges that the data exists, if I have to call the client side script again, then it seem to forget that data all over again. I guess to make this in more simplier terms for the professional Lua Scripters here to understand the question: If SetElementData(root,"Test",100) is declared on the server side script, then why doesn't GetElementData(root,"Test") work correctly on the client side script? When I repeat the client side script with something like Perform(), why does it seem to forget ElementData(root,"Test")? Is it because "root" might be pointing to something else? (I might just have to put up the entire code if I failed to paint the picture correctly)
  6. There are several concerns (Or questions) I have regarding the whole basic concept of MTA's version of Lua... First, I just open MTA and select the Host Server option selecting only the resource I'm working on to test my work/progress which I assume is the best/easiest way to do this. But the scripts don't always load correctly for some reason, I usually have to repeat the Host Server thing a 2nd time before it finally loads correctly. I've altered the scripts to run one at a time right after each other instead of all starting up at the same time, but this didn't solve that problem. Is this normal or perphaps its something I'm doing wrong? Second, I've started using GetElementData/SetElementData tied to the "root" as suggested from threads found here in order to use global vars from diffirent scripts (Basically Client/Server scripts) which only seem to work sometimes. I have data set on the server side script as soon as the script loads, for example: setElementData(root,"Test",100) Then when a player connects, a client side script is loaded that needs to know the data I've set on the server side script. So then I use getElementData for client side which only works if the data has been changed (While the player is connected?) by the server side script (onPlayerJoin). My guess, the player's client may only get this root element data from the server side if that data was first changed (known to the client?). My solution for this was to add, then subtract from every one of these Data Elements when the player connects, so that when it goes to the client side script, it knows this Data exists, otherwise it doesn't seem to know the data even exists, the getElementData doesn't seem to check/update that status alone... (More Coming, this post is too long to continue)
  7. I'm not sure if I experience the same thing, but I freeze up fairly often as well. Sometimes after waiting a few minutes it'll come back to life suddenly though, otherwise I'm forced to shut it down (Use your Windows Key). One time (Not sure if this was from a certain server or not) some announcement came on screen that read this: *** Network Trouble *** But I freeze up on several servers, I'm guessing lag although my ISP can't be THAT lousy because this happens quite often... I'm new to MTA, so not sure if these occurances are a normal thing with MTA or what though (Past Versions Etc.) ALSO: I use NO mods at all, a clean copy of GTA (Win XP)
  8. Ah... Alright, I understand you now. Thanx again for your support
  9. I appreciate the response Noddy, but what I create must be of my own designs. Although I do intend to learn from already existing resources shared by the community, but not copy (Thats how one learns to code, doing it yourself) Just so long as it's possible within reason (Excluding workarounds etc.)
  10. Ever since I performed a /afk command and then being killed afterwards on some server has caused my display for Health, Armour, Money, Weapon, Etc. to disappear. I had thought it was just for that server, but I've visited several servers which this display has never returned. Perphaps I've hit some hotkey in MTA that disables it, but I'm not certain that is the case... Does anyone know how to resolve this issue by chance? Research Results: MTA is known to have an issue which these displays simply don't show, but I was messing around with my Video Settings & seems to have corrected itself after switching the option for Windowed Mode... Therefore, resolved
  11. Thank you for the response, I appreicate it. This is good news...
  12. While exploring a bit more of MTA by browsing the servers, I've often first had to download quite a bit of files creating wait times up to at least 15 minutes before actually connecting with the server. At this rate, it was taking me forever to explore several diffirent MTA servers which I've only managed to explored 4 because I grew tired of these waiting periods... There's one server that didn't even allow me to play unless signing up at thier website after waiting a good 20 minutes at least from thier downloads, I refused to perform even more time consuming tasks because of that 20 minute thing, so I left without a thought of returning... (This is NOT a complaint, please read on) Now I'm still debating whether I want to take the time to learn MTA (Lua) in order to create a server because it's a massive amount of time to dedicate and whatnot. I want my server players to have the option of downloading any packages through the server in this manner. For example, visitors only download the very basics (If anything at all) to keep them from having any real wait time when connecting for the first time. Then later in the game (Perhaps after registering an account) these visitors download whatever packages etc. The whole point is to allow them to explore the server and decide if they're going to stay or not before having them download something that is going to take quite a while etc. So my question is: Can this be done? (Not asking how it's done, we'll cross that bridge later if nessecary) Just to verify previous answered questions of mine: Hacking MTA servers are near impossible because of great security already included in thier servers MTA servers are capable of allowing and disallowing most Mods (Cleo Mods for example) MTA is much more customizable than SAMP (Or overall just a better choice)
  13. Well, if I were seeking out a great zombie game with Zombie NPCs playing a large role then I'd probably skip GTA altogether & go play Resident Evil or whatever. So I recommend focusing more on the idea itself rather than its appearance or appeal to other zombie games out there. For instance, I loved the idea of invisible zombies (Radar Map) running around with the chainsaw as its primary weapon. Players were easily able to kill off zombies unless of course they don't see them coming & fall to the one shot kill chainsaw of a stealthy zombie. If it were more about NPCs though rather than Player Vs Player, then I might not have played previous GTA:SA Zombie Servers as much Then of course come new additions once the basic format of your zombie server is made out such as food, fuel and various other survival equipment. Missions also boost the entertainment of any type of server whether it is DM, TDM, RP, Military, Zombie & so on...
  14. F*** that, FTW! LOL, I certainly understand where you're coming from, but that's just used as an example There are many other options of course
  15. In that case, I don't know what you're talking about. But if you know the locations of the files, then why not zip them up and send them via E-Mail to whoever. Well that or upload the zipped files to services such as Mega Upload or something in order to share it over the internet by download links etc. But sounds like your computer doesn't regonize the file type thus asking if you know the program you want to use to open it or search for a recommended program over the web. If these files need to be opened outside of the MTA Map Editor, then I suggest using notepad, but must be kept simple. Otherwise use something else to open it with for proper editing... When you're uploading the files or whatever, make sure you're not trying to run them, just upload them
  16. I often go down the wrong path when searching for my saved maps, perphaps you've done the same... So double check on viewing the correct path as stated by Arran, there are directories within MTA that are very similar, but not the same. What I did was create a shortcut on my desktop for the folder where my saved map files are, lol.
  17. I don't have any experience in MTA Scripts yet (Lua), but still have the basic programming/scripting knowledge. Anyway, try setting or manually deleting the Player Idle Time varible to 0 when the player leaves? setPlayerIdleTime maybe? Either that or just create/use your own varibles...
  18. Although I'm experienced with SAMP, I highly recommend investing in MTA rather than attempting SAMP. SAMP does have a larger community because they've released work before MTA & that's because it's difficult to switch from one community to another. However, MTA is the better choice, I'm trying to make the switch over myself. You'll face countless Hackers trying to run a SAMP Server which they attack not only your Game Server, but your Website, Host, Etc. I can't speak for MTA as I don't have much exeperience just yet, but from what I've reviewed from across the internet, MTA offers much more. I would much rather deal with 100 Players rather than 1,000 Hackers, so giving MTA a shot here, you should too
  19. Even if some Hack/Cheat Program were to break through, MTA seems to be right on top of it & wouldn't pose as a problem for very long. But the whole basic point is that Hacking/Cheating is rare compared to SA-MP which the defenses are none at all. Just as a precaution though, I'm likely to build up a very basic AC such as handling the player's money etc. The Transformer Videos were a bit shocking as it wasnt at all what I expected, but certainly shows the possibilities of MTA Scripting which is very impressive. Only thing left to worry about is convincing SA-MP users to abandon years of work while starting completely fresh with another era of GTA:SA (Not at all going to be easy to do)
  20. Thank you again for the responses... All the time I would save on creating some Anti-Cheat Script, I could point towards work arounds for functions that aren't directly (Or Native) supported like the SetPlayerAttachedObject Example. I understand exactly what you mean, in SA-MP, it sometimes felt like I was scripting nothing but workarounds because of the limitations. But as I understand it, there might be some work arounds required here, but for the most part that there are no limitations compared to SA-MP's limitations. Now attaching vehicles to bones would be interesting indeed, perphaps one day when I want to create some Superman GM, lol. But thanx again, enjoy reading the reponses here, I'm more & more leaning towards dropping SA-MP for MTA-SA
  21. Thank you for all your responses... The MTA-SA Anti-Cheat seems very promising which is enough to consider switching over even though it would mean I must start from scratch again. What I specialize in is Roleplay, but may actually create something of a Military Roleplay with the option of Freeroaming as a Civilian (Or would probably be better known as Normal RP). I don't know how many of you might be familar with Civilization III Conquests (C3C), but currently involved & inspired by it to create this new genre gamemode for GTA:SA. But anyway, judging from the link I was referred to (Thanx TC), MTA-SA is capable of most SA-MP's Features. Thanx again guys Off Topic: Yes, been in Florida for the last 15 or so years now (From Wisconsin) because my parents decided to sell thier business to purchase the cheapest house they could find here (lol). It wasn't long after that which I then followed and now stay in Florida, but one positive aspect made it easy for me to stay which was to escape those cold winters. I might miss the season change & perphaps the snow, but certainly not the cold! Would you believe that my first year living in Florida was when we had those 4-5 Hurricanes that came through? Heh, I was having 2nd thoughts about Florida back then (Reside near the Lakeland Area)
  22. I've been recently considering to switch over from SA-MP to MTA-SA, but this is something very serious as it does mean that I must start from scratch again which is to familarize myself with a new GTA SA MP Modification. This might also mean alot of other players (From SA-MP) would follow me here (To MTA-SA) especially from Gaming Communities I got some influence over through my previous SA-MP Creations. Therefore, I have a few questions about MTA-SA before I can make a decision... The most important concern I have at the moment is how the Hackers/Cheaters are handled in MTA-SA compared to SA-MP. SA-MP is basically over run by this problem & offers very little defense against it. For example, SA-MP's RCON, even with it disabled Hackers are still finding ways to access it. Scripts meant to detect & act on users accessing any part of the RCON have failed which is the SA-MP Modification itself (Not the script). There are Hackers/Cheaters on just about every SA-MP Game Server & Administrators are kept busy banning offenders all day & all night. Even with great Anti-Cheat Scripts, they manage to find a way through, 100's of them. Cleo Modifications & such are also a problem which are much more difficult to detect. Now the question is: How does MTA-SA handle thier Hackers/Cheaters & how much of a problem is it here? Remember that SA-MP has alot more players than MTA-SA (From what I've read up on), so judging from numbers alone when compared with SA-MP simply won't work. But perphaps with the right Scripts, Hacking/Cheating is near impossible for MTA-SA or so I hope anyways. I've noticed how MTA-SA is capable of changing the player's client therefore believe that Hackers/Cheaters easily are detected? Furthermore, a Pros & Cons List for both SA-MP & MTA-SA for comparasion would be greatly appreciated too, thanx (As for Player Amounts, not worried, can always bring more people. Also, better to have 100 Players than 1000 Hackers)
×
×
  • Create New...