Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. Lazy people like you should be life banned from MTA, you have the example in front of you.
  2. Te pregunte porque lo guardas como un string, no que lo guardes como un string. Sorry for spanish
  3. Feche1320

    Zona

    He means gangzones, like on the normal GTA were each gang has it's color on the minimap
  4. Hello is there any basic shaders tutorial? Just to know were to start at, thanks
  5. That's becouse I copy/pasted the code from the first post, didn't even notice that.
  6. I am already using this function you not helped in nothing You don't deserve any help with that english.
  7. On client-side script: setPlayerHudComponentVisible("area_name", true)
  8. local luaTable = { { time = 200, acc="crap", name=":~"}, { time = 300, acc="crap2", name="crapy"}, { time = 100, acc="crap5", name="shiity"} } function orderTable() local tablecache, bigger = luaTable, 0 luaTable = {} for i = 1, #tablecache do if tablecache[i].time > bigger then table.insert(luaTable, 1, { time = tablecache[i].time, acc = tablecache[i].acc, name = tablecache[i].name }) bigger = tablecache[i].time else table.insert(luaTable, { time = tablecache[i].time, acc = tablecache[i].acc, name = tablecache[i].name }) end end end BTW why are you storing time as a string?
  9. Same as mine, it's just slower with ipairs.. so WTF to you
  10. addEventHandler("onResourceStart", root, function() local players = getElementsByType("player") for i = 1, #players do setPlayerNametagShowing(players[i], false) end end ) addEventHandler("onPlayerJoin", root, function() setPlayerNametagShowing(source, false) end )
  11. No, i want to add a table to the first table! @Feche1320 - It would be much easier to have a sub-array for my own purpouses fromJSON and toJSON is what you are looking for.. -- Inserting to DB local table = { name = "Hypex", age = 23, ["eye_color"] = "white" } dbExec(yourdb, "UPDATE yourtable SET information = '" ..toJSON(table).. "'") -- Restoring from DB local qr = dbQuery("SELECT information FROM yourtable") local result = dbPoll(qr, -1) local table = fromJSON(result[1].information) That's a quick example
  12. Create a new table lol, dumb question
  13. I am checking if it is a resource by passing the resource to the function, not by the name. EDIT: I inserted into the table the resource name aswell, so your code is working, thanks.
  14. Connecting a string into a variable name? auto ban yourself from this forums for god sake, you don't even know what the hell are you doing Ontopic: You can save the values when the value changes, it will keep your data safe in case of server crash or anything else, also you can make a timer and save the data every five minutes, but take in mind that there is more data to be updated since in those five minutes the values changed and didn't get saved when it changed, so I'd rather save it when the value changes. You can make a table with the player account as index, for example: local _playerstats = {} local query = dbQuery(your_database_connection, "SELECT * FROM player_stats WHERE account = '" ..the_player_account_name.. "'") local result = dbPoll(query, -1) if #result > 0 then _playerstats[the_player_account_name] = {} _playerstats[the_player_account_name].kills = 1 _playerstats[the_player_account_name].deaths = 89 _playerstats[the_player_account_name].name = "HeyYou" end Also, I see that you are creating tables for each player stats, what you have to is make a table named stats and then insert new values in that table. I told I'm not sure. If you know minimum Lua programming, you would know that you are f*king wrong.
  15. Did you even read what I asked for?
  16. You can try onPlayerWasted.
  17. Maybe it's related to this? viewtopic.php?f=91&t=81670
  18. Ohhh, right, i just presumed since SAMP has pawno, MTA would have somthing, and that was the first thing i came across, thanks for the advice Sam. SAMP has Pawno becouse the scripts need to be compiled, in MTA there is no such thing.. you can even script with notepad
  19. Connecting a string into a variable name? auto ban yourself from this forums for god sake, you don't even know what the hell are you doing Ontopic: You can save the values when the value changes, it will keep your data safe in case of server crash or anything else, also you can make a timer and save the data every five minutes, but take in mind that there is more data to be updated since in those five minutes the values changed and didn't get saved when it changed, so I'd rather save it when the value changes. You can make a table with the player account as index, for example: local _playerstats = {} local query = dbQuery(your_database_connection, "SELECT * FROM player_stats WHERE account = '" ..the_player_account_name.. "'") local result = dbPoll(query, -1) if #result > 0 then _playerstats[the_player_account_name] = {} _playerstats[the_player_account_name].kills = 1 _playerstats[the_player_account_name].deaths = 89 _playerstats[the_player_account_name].name = "HeyYou" end Also, I see that you are creating tables for each player stats, what you have to is make a table named stats and then insert new values in that table.
  20. local scale = (1 / 1080) * sy 1 = font size in your screen 1080 = your screen height That makes the font scaled.
  21. Hello I am having a problem, I load resources at server startup, use the refreshResources function to add new maps/delete them, the problem is when a map gets deleted.. there is no isResource function or something similar to check if a resource still exists or not.. the only workaround is to use getResourceName but it throws a warning saying that the resource doesn't exist (this is obvious becose the resource got deleted), thanks
  22. You can do whatever you want with your own code. I think that releasing something compiled isn't that great, 'super hyper mega script for explosions' greaaat let's download it and learn, boom compiled, geez. And ofcourse you don't know what the heck is inside of it, what is he makes a keylogger or something like that? Ofcourse it is up to you to download it or not, but if it's on COMMUNITY, it should be at least decompiled.
  23. He didn't say when the server shutdowns. He just wants to save the data when a player leaves from the server, onClientResourceStop gets called when player disconnects/quits from MTA. You misunderstood me, I meant that server sided script will be un-loaded before client. So it will give out a error! The script that I wrote goes client-side.
×
×
  • Create New...