Jump to content

Phat Looser

Members
  • Posts

    627
  • Joined

  • Last visited

Everything posted by Phat Looser

  1. Obviously, the data given to the elements is shared with the clients. Thats a do-not-want. To trigger and to trigger back might be a possibility, but somewhat it happens when you trigger an event from one resource and then trigger it from another, two different values are "called back", depending on the values the scripts gave that "callback script" before. I'll rescript the script I made from scratch, using triggers and trying to find out what happens. Maybe I made a mistake. I asked: "Is there any possibility, except using the players and the function to attach variables to players (I think it was "setElementData"), to share variables?" Obviously, the data given to the elements is shared with the clients. Thats a do-not-want.
  2. Not working, as I explained before, the function of the external resource called in script resource A and the function called in resource B give back different values. Why do I want to do this? Because my last anticheat script failed due to this stupid fact that different resources are not able to exchange data, no matter what. Why do I want to have different resources, instead of one script which contains everything? Because of the advantage that you can change and restart a script without messing with the whole concept. P.S.: Don't tell me the only way to exchange such data is an SQL access. I actually want to prevent any sort of ammo and hp hacks. Doing so via SQL is, in my eyes, a stupid idea.
  3. Hi gaize, I have a small problem. Its about the exchange of data between two running scripts, let me call the one "Script A" and the other "Script B". As you already know, it is not the intention of LUA that one script is able to access variables of the other. When I have a global variable "Pizza" in A, and a global variable "Pizza" in B, it may look the same, but they are different, and are supposed to be independent from each other. I am not common with the concept of lua, since everything just descripes how to script things (something i definitely do NOT care about, learning the syntax is a matter of hours, so its no work at all), and does not descripe how things actually work (i.e., how lua stores the variables - is it a tree or something?). Now, to put things short: I want a variable, which is accessable from outside the script. I already experimented with exporting functions, and such things, and I found out that every time you include one of that exported functions into your script, it saves the variables in a different location again. So just creating a script called "share", exporting the functions in share, and calling the (same) variables with script A and B still does give me different values. Now, back to my question: Is there any possibility, except using the players and the function to attach variables to players (I think it was "setElementData"), to share variables? The problem I have with "setElementData" is, that its not only shared with ALL clients, its also almost extremely slow compared to "serverside only" variables.
  4. Having ADHD does not mean someone is retarded. The word is just an invention of some idiots who think the human brain is not capable of debugging hardware by itself without the use of medication. Back to topic: In this case, SQL would be preferable. At least, keep that in mind and use re-usable functions that can be changed into SQL functions easily.
  5. I was wondering about one thing. Why didn't you use "tonumber(target)" ? I think, otherwise the input, "target", would be used as a string, and for a computer there is a huge difference between the number 1 and the string "1".
  6. I have servers stored in my fav list, but they are not shown until the serverlist has loaded.
  7. Local array, which gets a new sub array as soon as a player joins the game. Why should the second function return anything? It just gets called every weapon fire and kicks the player, when it supposes he cheats. Also, the array IS saved when the callbacks are used by only one script. As soon as they are used by two scripts at the same time, it kicks when you have more then the first started script which calls the function told the anticheat you have.
  8. I have a question about the "serial problem", and the next release, DP3. Since I do not intend to keep my Laptop forever, and since I DO intend to keep my current account for a while, will I still be capable to transfer my account to a different computer? Will this computer be able to switch between two accounts then? I am asking for the reason that I already fell in love with a new machine, which I would use for playing MTA, too, of course. And since I currently have one experimental account, and one real account, I would like to keep both of them.
  9. I export a function, I call the function. This is ok, for the now. The function is called, the parameters are correct, I made the function output everything. But somehow, the variables are not saved in the array I made. function givePlayerWeapon(source,type,ammount) giveWeapon(source,type,ammount) setWeaponAmmo(source,type,ammount) gtat_rba_player[source]["weapons"][type]=ammount end addEvent("gtat_rba_giveWeapon",true) addEventHandler("gtat_rba_giveWeapon", getRootElement(), givePlayerWeapon) (I tested it with both, export and EventHandler, so don't ask me why there is any "addEventHandler" in there.) Notes: getClientName(source) returns the correct player. outputChatBox(type .. ammount) returns the correct values. Now, I ask for the value of gtat_rba_giveWeapon[player]["weapons"][weapontype] for the lulz. function gunfire( hitElement, weapon, ammo) if (gtat_rba_player[source]["weapons"][weapon]) then gtat_rba_player[source]["weapons"][weapon]=gtat_rba_player[source]["weapons"][weapon]-1 if (gtat_rba_player[source]["weapons"][weapon]<ammo-1) then setWeaponAmmo ( source, weapon, gtat_rba_player[source]["weapons"][weapon] ) --outputChatBox(getClientName(source) .. "got one 'AMMO CHEAT' point") setPlayerWeaponSlot(source, 0) gtat_rba_player[source]["cheatcount"] = gtat_rba_player[source]["cheatcount"]+1 gtat_rba_player[source]["ammocheatcount"] = gtat_rba_player[source]["ammocheatcount"]+1 if (gtat_rba_player[source]["weapons"][weapon]<ammo-100) then logEvent ( source, "Ammo cheat - unknown source" ) outputConsole("Anticheat detected ammo cheat at player " .. getClientName(source) .. " This is very inconvenient. The event has been logged." .. gtat_rba_player[source]["weapons"][weapon]) kickPlayer ( source , nil , "Anticheat detected ammo cheat. This is very inconvenient. The event has been logged." .. gtat_rba_player[source]["weapons"][weapon]) end end else logEvent ( source, "Weapon cheat - unknown source" ) outputConsole("Anticheat detected ammo cheat at player " .. getClientName(source) .. " This is very inconvenient. The event has been logged." .. weapon) kickPlayer ( source , nil , "Anticheat detected ammo cheat. This is very inconvenient. The event has been logged." .. weapon) end end addEvent("gtat_rba_gunfire",true) addEventHandler ( "gtat_rba_gunfire", getRootElement(), gunfire ) This works, when the upper call is just called by ONE script, lets call it "the first script". As soon as I ask a second script to set the value to something which is higher then the previous value, the player gets kicked. I used this function on purpose, since it contains " setWeaponAmmo(source,type,ammount)". This way I prevent the mistake that may occur when different weapons use the same weaponslot and ammo. At the moment I have no idea why it happens. Using just one script to call the function/call the event works fine, using a second script results in a kick.
  10. "and secRX and" trivial, after I looked through it without the intention to save the world. You even copied and pasted this mistake twice without seeing it.
  11. At the moment, it is a little bit boring at the very beginning you start up MTA, since the server list needs some time to be loaded. My suggestion is, that the servers are stored on shutdown, until the startup, and that the old server list is shown until the new serverlist loaded (with questionmarks at "ping" and "players", maybe). This way it would be faster to join static servers, like the FMJ or the =PCP= server, or Simbads server. Of course you can build in a memory which only saves the servers when they kept their IP for more then three days, but that may be a little too much work - since everyone is already waiting for DP3.
  12. Do you really think anyone will give you precise date? Ofcourse I do. Nah, I asked when we COULD expect DP3. Duke Nukem forever release date, since its ready when its done.
  13. I think, after working through it, that I have the solution of the problem. When you call a script in LUA, it has the bug that LUA thinks this function is somewhat loaded INSIDE the script that calls it, which means you would have to put your XML file in the resource which calls the function. Since this is a theory of mine, which I developed after a few tests, I would like to hear your result. This disabled my anticheat, by the way. It made it impossible to work correctly with multiple resources.
  14. Its a common rule that variables should not begin with numbers....
  15. Its true, he reported it (and I didn't believe him, first). But it seems the Rockets already bear the speed offset of the player when they are created, which means when you fly away from the person who fires a hs at you, they have the "shooting speed" plus your speed. And since they are following you... This is absolutely stupid when you try to dodge hydra rockets. Normally the rustler is able to do so (dodging, i am talking about), but in this case, the rocket runs past you, but the explosion is at your - ass - which is quite stupid. Especially when the hydra pilot is one of those crazy-ass "i shoot everything thats near" type of player. I don't know if I'm absolutely correct with my theory, but I suppose its either that they already got a speed when they are created, and that MTA adds another speed vector to that default speed, or its that the speed is measured from the player point of view. Theories over theories.
  16. Yes, you're right. From -3000 to 3000 I thought I measured 3250 once, but for that, you need to find out where the "void" begins and read the coordinates. I'll do that later. Fact is, its a square
  17. Don't ask why, but I am looking forward to the RELEASE of DP3. I think you can guess why - DP2 is totally going on my nerves.
  18. Games always use as much CPU as possible. That means, you start any game, and the CPU is at 100%. Thats it.
  19. http://www.game-monitor.com/search.php?game=mta Problem solved.
  20. A thing that should be possible is to change the sounds. The vehicles are already changeable, I think changing the sounds should work out almost the same.
  21. Phat Looser

    Mouse Problem

    Or alt+tab plus mousekey.
  22. In that case, Vista just shuts down MTA. It happened quite often on my computer, so I can be sure about that. Also, Vista still seems to have a "spare page file" of 200 MB or more, which is used when the memory is overflowing. I don't know what XP does, though. Of course, Windows can crash when you deactivate the pagefile. But after running several tests on different computers, I'm sure it won't happen that often when you have 2 Gig RAM or more (it never happened to me).
  23. Set it to 0 MB. Especially in Vista, the pagefile eats up very much of your hard drive speed. Computer->Properties->Advanced->Settings(Visual effects, processor scheduling, memory usage, and virtual memory)->advanced->change(virtual memory)->no paging file, then press OK and restart. It may crash MTA after three to ten hours, since MTA is requesting more and more memory while its running. But it runs even faster then before, no matter how fast it was. Additionally, you can use ReadyBoost in Vista. And, of course, deactivate that SearchIndexer - but only when you really know what you are doing. If you don't want to deactivate the SearchIndexer, open the TaskManager and set its priority to "below normal". That helps a lot.
  24. That happens when someone dies near that car and does not respawn. Somehow, this player seems to be responsible for the car, which also makes the car disappear after you drove somewhere and get out of it. It just teleports back to the point you got in. I know that bug, but this only happens because MTA somewhat thinks you are inside a car, but in fact, you are not. I bashed the whole FMJ Server with that bug once - since Grenades are synced, everything exploded, and noone knew why.
  25. Especially that "Alt + TAB" feature. For the case the MTA team wants to discuss this: I have 4000 frags in MTA. I am playing the game a little bit more often then the MTA Dev Team. Maybe because I don't develop the game and use more of my sparetime playing it. All your arguments are invalid. P.S.: I know why you did what you did. But I still think MTA should be Alt+TAB-able. Maybe just try it in DP3.
×
×
  • Create New...