Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. You said it all.. You already know the functions and what to do, there are examples for each function in the wiki. What do you expect us to tell you now?
  2. That has nothing to do. At the moment, CLEO mods are not allowed, it's not because it's not possible. Also, allowing CLEO mods/loading them on a server isn't needed, you can re-create them with Lua.
  3. The player can't even join the server if banned, he'll get an error box while connecting to the server.
  4. MTA already has a ban system where you can ban by IP, username or serial. There is no need for that, and even if it was, it's so easy to do that even a beginner could do it.
  5. I'm sorry but I don't see why would this be any useful.
  6. A função muda a propriedade de todas as armas com o ID/nome especificado se chamar a função server-side e muda a propriedade de uma só (você passa o elemento arma, que você cria com as novas funções de criação de armas) se chamar a função client-side.
  7. Anderl

    ERROR

    That error says that you're trying to call an index/field in an array that doesn't exist (the index/field, not the array).
  8. Not a good idea, that will cancel the event from being called thus stopping any event triggered when an element hits a pickup.
  9. You could use element data, but element data does lag too AFAIK.
  10. Anderl

    [PHP]Query

    Of course it will give that error, you should not simply copy+paste things that we post here. %PATH_TO_GAMEQ% is obviously a placeholder for the path, you must change it to the path of GameQ.
  11. Anderl

    [PHP]Query

    Using command chmod should do it: chmod -R 777 %PATH_TO_GAMEQ% This will give 777 rights to all folders and files inside the folder you passed as parameter.
  12. Anderl

    Font changing

    That has completely nothing to do with what he wants, and dxDrawText already supports color codes.
  13. Ah, yes, my bad. math.random will not work with non-indexed arrays (that are not in order). You could do a function to get a random index from the array even not being in order, but it's easier to use 50p's code.
  14. Anderl

    fileOpen..

    I don't think there is, you'll most likely need to script a function to do it.
  15. This: local Weapons = {31 , 30 } local skins = { 287 , 286 } Change to: local Weapons = { [31] = true, [30] = true }; local skins = { [287] = true, [286] = true }; And this: if( playerskin == skins ) then Change to: if ( skins[ playerSkin ] ) then
  16. 50p's code is correct, but you have to add "or playerSkin == 286" after "playerSkin == 287" if you want to give that specific weapon for both 287 and 286 skins.
  17. addEventHandler( "onPlayerSpawn", root, function( ) local playerSkin = getElementModel( source ); if( playerSkin == 287 or 286 ) then giveWeapon( source, 31, 100 ); elseif( playerSkin == 285 ) then giveWeapon( source, 22, 100 ); end end ) Your code is wrong.
  18. Anderl

    Font changing

    Race resource - "textlib.lua".
  19. Hey. Your website. Isn't that nice. You would get more popular if you wrote things in a proper english instead of that ^.
  20. Anderl

    [TUT] Exports

    Your example function will ever return false in your last code because you're not passing the parameter needed. Anyway, basically, exports is a simple array that stores all exported functions (organized by resources), there isn't much more to say. Also, in my opinion you could comment more things for beginners.
  21. Use the event onPlayerChat event with cancelEvent and outputChatBox. In the event's function create an array and store player elements that are logged in, cancel the event and output the message again ONLY to the players stored in the array.
  22. Anderl

    Green Candy

    Oh, my mistake. I confused things.
  23. So, you need a Lua editor or a C++ editor? You can use any text editor to script with Lua. There are also softwares especifically made for MTA such as MTASE from 50p.
  24. Anderl

    Green Candy

    Doesn't seem very good, tho it would look pretty good:
×
×
  • Create New...