Jump to content

BinSlayer1

Members
  • Posts

    491
  • Joined

  • Last visited

Everything posted by BinSlayer1

  1. Clientside.. onClientRender, check if local player speed is more than 21 km/h If it is, set the element speed of the local player to 21. https://wiki.multitheftauto.com/wiki/SetElementSpeed https://wiki.multitheftauto.com/wiki/GetElementSpeed
  2. Im pretty sure it's racevoting_server.lua inside Race resource
  3. time = getRealTime() setTimer(function() setTimer(abc, 60*60*1000, 0) end, (60-time.minute)*60*1000, 1) --note the 'abc' name is the name of the ultimate function that you wish to call. also note that if you're going to take someone else's code.. I see most people here are using getTime() but you should know that that function returns the current IN-GAME hour and minute. If you want the real time then use getRealTime() and the in-game time is different so that hours are minutes and minutes are seconds
  4. Check your other topic Someone posted the code for your request there
  5. Monty: just use Axel's code. I know it can be confusing when more people give different solutions to the same (easy) problem
  6. Everything. The script begins with an "end" ?! There is no if-structure whatsoever.. There are just a few ends and elseifs that should return syntax failures anyway
  7. the reason he costs 0 is because he wants to be TRIED OUT first.. obviously, he'll put a price afterwards.. Also you shouldn't allude that he is a bad scripter if you dont know him.. It's just disrespectful
  8. BinSlayer1

    BB mode

    Whaaat? Now there's copyright for a 5-line code? What's to say he didn't write that himself?
  9. Why do you want it completely clientside? Create vehicle serverside, create ped serverside. Upon creation of both, trigger some client event, pass both ped and vehicle elements to client and use setPedControlState clientside
  10. Actually Just use Yakuza.Real's script and ignore everyone else's post.
  11. Do you have a better way? I do. Use the string manipulation library pre-included. lua-users.org/wiki/StringLibraryTutorial Scroll down to the bottom of this page. I guess what Aibo meant to say was that there's no use in creating an "useful function" for something achievable with a built-in function. Also, your 'useful function' is wrong because it doesn't use the OOP reference correctly
  12. I think I remember such an issue with MTA. But I'm sure it's been fixed in the latest nightly patches. https://nightly.multitheftauto.com/ Download latest stable 1.3 patch and install it. Then try again and get back to us.
  13. To implement default values for function parameters just check inside the function (in the header) if the parameter is nil If it is, initialize it in any way you want (this is a default value). If it's not nil, then your function will use the one supplied
  14. No need. I love MTA, I only said that GUIs are retarded, doesn't mean I don't like MTA. GUI is the least thing, but taking a big piece of everything anyways. How does one not like GUIs? it's one of the most important features of MTA If we didn't have GUIs, everything would have to be command-handled.. Imagine learning 100 commands for each server you play on. Instead, scripters can have everything stored nicely with eased access in a GUI menu or something
  15. Useless code. You could easily use # such as if the table was called pants you can call #pants and it will return the number of elements
  16. Such resource already exists: https://community.multitheftauto.com/index.php?p= ... ls&id=1821 You can basically script from in-game with it.
  17. Actually a command-based Admin Panel is a bad idea because there are many features an admin panel should have and commands generally suck because they are NOT user-friendly and they must be 'learned'. Besides, you can do just about anything with commands as it is now too. There's /mute, /freeze, /kick, /ban, /slap etc. I suppose that it could lack a few commands like /getip but it's definitely not 'a new project'. Everyone here will look forward to your work anyway. So good luck
  18. with hard work.. It will obviously require scripting skills, so start learning the basics and then get back to us https://wiki.multitheftauto.com/wiki/Scr ... troduction
  19. It's server-only due to the event you're using. -Instead of if myMarker type if getElementType(hitElement) == 'player' -@setPlayerTeam use hitElement instead of source -@setPlayerSkin use setElementModel(hitElement, 50) -@outputChatBox use getPlayerName(hitElement) instead of elementType
  20. Let me give you a piece of advice. Good scripters don't work for free. Maybe you should consider giving something in return like cash.
  21. BinSlayer1

    Loadstring

    you're nil-ing the main function, but not everything it has fired since it was called.. It may have called some addEventHandler functions so you must use removeEventHandler I could be wrong
  22. Bandi94, that doesn't explain why xmlNodeSetAttribute returns false in his code.. While what you're pointing out is indeed -another- bug, there must be something wrong with the xmlNodeSetAttribute too
  23. BinSlayer1

    Loadstring

    How can you tell it doesn't work? Stuff you pass to loadstring acts as compiling another separate (anonymous) function. When you call it, stuff(in it) gets executed. If you set the stuff that gets executed back to nil, then it should work fine (You can do so by using yet another loadstring if you want to)
  24. "Returns true if the attribute was set successfully, false if the node and/or attribute do not exist, or if they're faulty. " Your .xml file is not configured correctly I think even "if xmlNodeGetAttribute( node,"value" ) ~= "none" then" actually fails. Because for all I know you could be comparing false with 'none' so the if clause will always be executed Do this: if xmlNodeGetAttribute( node,"value" ) and xmlNodeGetAttribute( node,"value" ) ~= "none" then After you do this, you will most likely see that it won't execute the IF anymore So the problem is within the loaded xml file and not the lua script.
×
×
  • Create New...