Jump to content

ixjf

Members
  • Posts

    647
  • Joined

  • Last visited

Everything posted by ixjf

  1. ixjf

    The last reply

    You won a cookie for no.1 B.L.A.S.T. thread.
  2. Don't tell me to read that, because I honestly have read that million times already. You can directly use next instead of pairs/ipairs.
  3. for _,veh in next, getElementsByType ( 'vehicle' ) do use ipairs What's the problem with next?
  4. ixjf

    Animation

    The library can be used as a cheat so I wouldn't allow its use. Everything (or almost everything) that can be made with the library can also be made in Multi Theft Auto.
  5. ixjf

    Problem in MTA

    I was asking you when does the error appear.
  6. ixjf

    Problem in MTA

    When?
  7. ixjf

    Problem in MTA

    You forgot to install your graphics driver. Try these drivers (install both): AMD Radeon HD 8730M Intel HD Graphics 4000 These may not be the latest drivers, but I just did a quick search.
  8. He doesn't want it client side, because he's using server side event... think... You're trying to compare function with number... just add () to call the getPlayerCount. So it will be getPlayerCount() I was answering to the guy above, in case you didn't saw.
  9. Retrieving the number of players in-game is possible in the client-side, but I wouldn't recommend it for servers with too many players: #getElementsByType 'player'
  10. ixjf

    Roads

    If you aren't an experienced user, perhaps you may want to check CrystalMV's traffic resource instead (though, unfortunately, his website seems to be offline at the moment).
  11. Indeed, I'm sorry for the mistake, I haven't seen the code carefully.
  12. createExplosionFunc is the handler of the command - you want to call createExplosion inside of that function. You were recursively calling itself (since you overwrote createExplosion, you were now calling itself) and it will end up throwing an error.
  13. Did you mean milliseconds? ( ms / 1000 / 60 )
  14. ixjf

    Scripter

    Experience - keep learning and doing stuff and you'll gain it. EDIT: My argument is still valid, if you ask other users to do it, then you'll gain no experience.
  15. Install screen or use nohup command: nohup ./mta-server &;
  16. A razão pela qual o disco rígido se danificou podem ser muitas, além disso os da marca Hitachi nunca foram grande coisa. P.S. Nenhum monitor mostra qualquer informação sobre o disco rígido, você deve estar a confundir-se com qualquer outra coisa.
  17. Só porque aconteceu isso não se pode afirmar que foi do jogo. Veja minha resposta no post abaixo.
  18. ixjf

    Return break

    return keyword is used to return one (or more) values from a function. break, as its name explicitly says, breaks a loop.
  19. I'm sorry for the misunderstanding, I didn't read carefully. Just read the file with the MTA file functions and send the bytes with triggerLatentClientEvent. Then, on the client side, re-create the file.
  20. And why would you save the script on the client's computer? The script can't be run on the client side.
  21. triggerLatentClientEvent ( Player, 'onClientReceiveMap', 9999999999999, false, Player, g_Vehicles, g_Spawnpoints, g_Checkpoints, g_Objects, g_Pickups, g_RaceScriptFiles, g_RaceFiles ) Doing this doesn't help much, triggerLatentClientEvent is useless the way you're using it. And server scripts aren't supposed to be downloaded to the client's cache, they're run from the server.
  22. Each resource has its own space (called environment), thus all code is shared between files, except when it is explicitly declared as local. Note: 'require' function has been disabled in Multi Theft Auto for security reasons.
  23. You are welcome.
  24. arg is a Lua pre-defined variable, it has the same meaning of '...' which is a table of variables. Indeed, I didn't think about the most efficient way to do it, I firstly had that idea and this code is supposed to give you an idea of how you could do it.
  25. You can make wrappers of blip functions, here's an example of how would createBlipAttachedTo seem like: _createBlipAttachedTo = createBlipAttachedTo function createBlipAttachedTo ( ... ) if ( type ( arg [ #arg ] ) ~= 'table' ) then return _createBlipAttachedTo ( ... ) end local pElement = createElement ( "blip" ) local blipArray = {} for i,v in ipairs ( arg [ #arg ] ) do local newArg = arg newArg [ #newArg ] = nil blipArray [ #blipArray + 1 ] = createBlipAttachedTo ( unpack ( newArg ), v ) end setElementData ( pElement, "blips", blipArray ) return pElement end The con is that you have to modify other functions that has a blip element as parameter.
×
×
  • Create New...