Jump to content

Gamesnert

MTA Contributors
  • Posts

    2,035
  • Joined

  • Last visited

Everything posted by Gamesnert

  1. The only thing I can think of then is an error in the XML file.
  2. xmlNodeSetAttribute fails because xmlCreateChild fails. xmlCreateChild seems ok, though. So I'm expecting that for some reason, test.xml couldn't be loaded. Perhaps you haven't this file yet? Or perhaps you've just got the wrong name / directory?
  3. Frankly, does it matter much? You know what you entered in , don't you? Is there any real problem with the IP not showing beside that it might be intended? Also, why are you using the parameter in the first place?
  4. So what message do you get? Do you see "Welcome", or "Failed. Relog." Or don't you get either? If you don't get any, try changing "root" in line 23 to "getRootElement()", as "root" doesn't appear to be defined. (also, I think you forgot setCameraTarget in function loginHandler)
  5. Because MTA's model replacing is not 100% perfect, it will fail from time to time, resulting in for instance white objects, collisionless objects or even in rare cases crashes. In these cases (except for the crashes) I recommend making a command (like /replace) to re-load the custom models again. This way, if people experience problems with the custom models, they can type the command and hope it'll be better if they try again, for as long as it takes to have the custom model working completely. You can do something like this: function replaceObjects() -- Replace objects code here end addCommandHandler("replace",replaceObjects) function resourceStart() setTimer(replaceObjects,1000,3) -- Reload the custom models several times, slightly increases the chance it works without having to type a command end addEventHandler("onClientResourceStart",getResourceRootElement(),resourceStart)
  6. Make sure you're logged in. Furthermore, you can keep on guessing like this, but finding it will take longer than trying to win the jackpot in the lottery. I suggest you to debug your script. It will make us help you. Also, don't just say things like "don't work", because we can't do anything with that. We're not psychic, and we shouldn't have to run your code at our own servers either. Just telling us in what way it doesn't work, any of the conditions or whatever helps a lot.
  7. He means, don't use functions like callServerFunction. It will make your server an easy target for hackers, because if the ACL isn't configured properly, the hacker can just kick/ban random players and do things like shutting down your server etc.
  8. For players: Cancel onClientPlayerDamage event. For vehicles: setVehicleDamageProof Only objects don't have anything yet.
  9. If you want to run something at a player who just joined, check when the resource starts. onClientResourceStart
  10. Server-side: Slower Safer Generally more synced Required for things like spawning No downloading required Client-side: Faster Easier to get hacked Not too much is synced Optional Capable of a lot more graphical functions. For instance GUI and dx rendering "Open-source" (aka, players can find the client scripts on their harddisk after download) Generally, I think you should run all things client-side except: Sensitive code Things you want to keep secret Things that can not be done client-side But the speed and flexibility usually makes it worthwhile to script most things client-side. Although this is how I see it, it can be seen differently for every individual.
  11. Could you give us a bit more info on what happens? Like what message do you get in the chatbox? Or at least a more accurate description of what doesn't work? It would really help us help you.
  12. newping=getPlayerPing(getLocalPlayer) -- always returns false, try putting () behind getLocalPlayer if newping>=pinglimit then -- Error: Comparing a boolean with a number value
  13. And here, we see the use of requested in suggestions forum bounding box for images. You should then create one sprite image, and save ~230KB, then alter it with bounding box. I don't know what you think he was talking about, but he was talking about if you right-click a file and select properties, you can see "Size" and "Size on disk" for as far as I can see. No bounding box that can change any of that.
  14. I have been scripting something with onClientGUIDoubleClick just yesterday. Works fine, for gridlists, that is. Are you sure you didn't mistype it? Otherwise, just check the time between clicks. The F11 map image in there isn't big. (± 100 kB if I recall correctly) But no, except for copying there is no other way. Nope, should be fixed by someone IMO too. I've ran across this problem some time ago too, and was annoyed. (expressed VERY softly) I found a way around it, however. I've got to nominate it to the Guinness Book Of Records as dirtiest hack ever sometime, but oh well, it works. (It can be seen in my maximap resource) function keepImageLoaded() dxDrawImage(0,0,0,0,"imagefile.ext") end addEventHandler("onClientRender",getRootElement(),keepImageLoaded) This is basically what it comes down to. You just draw *cough* the image with size 0x0. This means you can't see it, but the picture is still being loaded. I prefer having something like: image = fileOpen("lol.png") ... dxDrawImage(x, y, w, h, image) Would at least be less hacky, and easier to come up with. But that might just be me.
  15. In what way isn't setElementAlpha suitable?
  16. I sure hope that's not the Titanic attached to MTA. We don't want to go down like that... D:
  17. Replace: setPedAnimation(ochrona,"PED","Idle_Armed",-1,true,false,true) setPedAnimation(babka,"SHOP","SHP_Serve_Loop",-1,true,false,true) with: setTimer(setPedAnimation,500,1,ochrona,"PED","Idle_Armed",-1,true,false,true) setTimer(setPedAnimation,500,1,babka,"SHOP","SHP_Serve_Loop",-1,true,false,true) For some reasons peds can't take on stuff like animations at the time they're being created. So a small timer should do the trick. P.S. If type is not specified, it defaults to being server-side. Frankly I don't see how it has anything to do with the issue at hand, anyway.
  18. How about the big fat ban button? And of course don't forget to notify your players that it's a fake.
  19. We could of course spend our whole afternoon trying to figure out what you mean by "it isn't working", but saying what's wrong by yourself is so much faster. So, what's wrong with the script? P.S. isTimer is a MTA function now, you can delete line 31 up to and including 39.
  20. Gamesnert

    Help?

    Extract it to the "data" folder in your GTA San Andreas installation folder. By default: C:\Program Files\Rockstar Games\GTA San Andreas\data Overwrite all files.
  21. Gamesnert

    Help?

    I already gave you the link, but just for the heck of it: https://community.multitheftauto.com/data.zip You will still have your car mods, texture mods etc etc etc. As you said, it's (mostly) harmless for servers.
  22. I'm not sure if I understand what you mean, but the name shouldn't matter. Naming a variable "player" or "killer" or "cake" won't change its content. EDIT: Ok, that was a stupid mistake of mine. Thanks 50p.
  23. Gamesnert

    Help?

    Your data files are not the original, otherwise you can't get the error. Meaning they have been edited some time.
×
×
  • Create New...