Jump to content

ixjf

Members
  • Posts

    647
  • Joined

  • Last visited

Everything posted by ixjf

  1. C'mon, you're only embarrasing yourself more. You've been told many times here that you don't have the knowledge for what you're asking. Nobody in its right mind will pay a newbie to code. Just leave it alone. P.S. A Concerned Citizen meant sane, from the verb sanity, he was not referring to a particular person.
  2. Don't want to demotivate you, but The_GTA is implementing dynamic lighting on MTA:Eir already. Eir will merge with Blue once that is done.
  3. Yes, your code is indeed not correct. To be honest, that code is garbage - we expect you to show work you have done in the past, not code copied from GUI Editor output with changed variable names.
  4. No. It is your responsability to secure your code.
  5. Personally, I think selling and buying resources as well as requesting resources in this section (paid or free) should be completely forbidden from MTA, or at least these forums, since we can't do anything to anyone out of here, but regardless, no support should be provided to those who would still do this - was warned, still sent money to a stranger, got scammed -> not our fault, we can't do anything about it. This only causes problems. If you want to share something cool you just made, put it on the community, after all that was the purpose of the community, otherwise, leave it alone. You can learn anything you want, it takes time, but you will eventually do it. Everybody had to go through that. Most programmers learned everything by themselves, nobody teached them. They read, experimented stuff and learned with their mistakes, by themselves. I read, experimented stuff and learned with my mistakes, by myself. If you don't know something and you don't try to learn how to do such thing yet you want to achieve something big without moving your ass, I'm sorry but you aren't going anywhere, never. Check out the community, see if it has got anything like what you want. P.S. I'm entitled to my own opinion, I'm just sharing it, so please don't turn this topic into another of those endless discussions that can be seen around here.
  6. There you have your code, fixed: Server: function _downloadFile ( player ) local file = fileOpen ( "BUyJfGFCMAEe5BI.jpg", true ) if ( file ) then local content = fileRead ( file, fileGetSize ( file ) ) triggerLatentClientEvent ( player, "runMod", resourceRoot, content ) -- You can now use 'getLatentEventHandles' and 'getLatentEventStatus' -- to get the status of the latent event -- You may as well mess with triggerLatentClientEvent's bandwidth parameter -- if the download speed is too slow else outputChatBox ( "Couldn't find file to download", player ) end end addCommandHandler ( "dicks", _downloadFile ) Your mistake here was the use of the file name in file functions where they expected a file element, which was returned in the fileOpen call. Client: function runMod ( content ) local file = fileOpen ( "BUyJfGFCMAE5BI.jpg" ) if ( file ) then outputDebugString ( "You already have the file" ) fileClose ( file ) else file = fileCreate ( "BUyJfGFCMAE5BI.jpg" ) fileWrite ( file, content ) fileClose ( file ) outputDebugString ( "Done" ) end end addEvent ( "runMod", true ) addEventHandler ( "runMod", root, runMod ) Here, you forgot to close the file handles and you messed up everything in the part where you write the content to the file. I would suggest you to check whether the files the client has are not modified, by the way.
  7. ixjf

    [REL] Login System

    Did you three realise you just bumped a more than a year old topic?
  8. Some parts of that "quote" were actually added now, they were not on the original message
  9. _G is a normal table, you can loop through all of its fields and copy the functions you need.
  10. Are you aware maps' scripts can access your global variables that way?
  11. You don't. Just loop through the default environment and copy all functions but the ones made by you. Or a more flexible way would be to make a copy of the environment at resource startup, before defining anything, and then using that.
  12. Load your code in a sandbox so you can clean it up once it's over: http://lua-users.org/wiki/EnvironmentsTutorial
  13. You shall rather write your function like this: local _setTimer = setTimer function setTimer ( ... ) local timer = _setTimer ( ... ) if ( timer ) then table.insert ( g_Timers, timer ) end return timer end
  14. ixjf

    Can't start Map Editor

    The error message tells you the steps to fix the issue - did you follow them yet?
  15. ixjf

    Only "image" ...

    You're using the generic video driver provided by Windows, thus Direct3D functionality is not available. Please install this video driver and retry: http://us.download.nvidia.com/Windows/3 ... l-whql.exe
  16. ixjf

    DirectX

    GTA: San Andreas uses DirectX 9.
  17. ixjf

    Mafia 2 Multiplayer

    It's Squirrel, not Pawn.
  18. It's great to hear this ain't dying. I hope you find some developers to help you finish this. VC ftw.
  19. MTA isn't coming to phones, ever.
  20. I know, yet I doubt most people can do it, fortunately (yet unfortunate that they can't even do that "basic" stuff). When I said "a mere Windows reinstall won't do it" I meant without hacks.
  21. ixjf

    Client Crash

    That's the usual.
  22. The MTA serial is based on the hard disk unique serial number, or a mashup of device serials, hashed, not the volume serial, so no, a mere Windows reinstall won't do it. If it was like that, a serial would be pretty much pointless.
  23. ixjf

    Sorting table

    That topic has nothing to do with what is being asked here.
  24. ixjf

    Sorting table

    It does not, because non-numerical indexed tables don't have an order. However, you can organise your table like this: local racers = { { player = somePlayer, rank = 20 }, -- "somePlayer" would be a player element { player = anotherPlayer, rank = 5 }, -- "anotherPlayer" would be a player element { player = me, rank = 30 }, -- "me" would be a player element { player = cheater, rank = 140 } } -- "cheater" would be a player element You can then sort this table: table.sort (racers, function (a, b) return a.rank > b.rank end)
×
×
  • Create New...