Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. This is very useful. I was searching for this. Thanks!
  2. https://community.multitheftauto.com/index.php?p= ... ls&id=5413 https://community.multitheftauto.com/index.php?p= ... ls&id=5414 DONE
  3. You're now binding key to a non-existing function/command "h". I just don't get you, what are you trying to do? EDIT: That maybe? local marker = createMarker(-2596.625, 579.358, 14, 'cylinder', 2.0, 255, 0, 0, 150) addEventHandler("onClientMarkerHit",root, function(h) if h == localPlayer and source == marker then addEventHandler("onClientRender",root,drawText) setElementFrozen ( h, true ) end end ) function drawText() dxDrawText("Prees F To Exit!",423.0,601.0,623.0,637.0,tocolor(255,255,255,255),2.0,"clear","left","top",false,false,false) end function h() removeEventHandler("onClientRender", root,drawText) setElementFrozen ( localPlayer, false ) end bindKey ( "f", "down", h )
  4. Make top times first.
  5. GTX

    Weird problem...

    @Solidsnake: Yes, everything is sending fine. @UAEpro: I tried but it outputs this error: bad argument #1 to 'ipairs' (table expected, got userdata) at line 6
  6. GTX

    Weird problem...

    Hello, I've got a weird problem with a code. EDIT: Problem solved. The problem is: The script creates only the last "label". Note: There are no errors. Example: #1: user1 - 500 -- this label doesn't show #2: user2 - 400 -- this label doesn't show neither #3: user3 - 300 -- this label shows I putted a screenshot for more understanding: http://shrani.si/f/B/P8/3PnzthbC/mta-sc ... 2920-0.png Thanks in advance.
  7. Nice map but I'm wondering where's deco...
  8. This is not scripting related. Post here: viewforum.php?f=130
  9. There's only 1.4 on nightly webpage. You'll have to wait for it (I think).
  10. Nice map. Don't use AMT very often, it spoils your map.
  11. GTX

    Dobrodosli

    Bok, sada sam opazio ovaj forum lol. Ja sam slovenac I ja ne znam hrvatsku dobro >:] Pozdrav
  12. GTX

    race countdown

    Take a look in countdown_client.lua.
  13. function saytext(player, command) outputChatBox ( "[ "..getPlayerName(player).." ]: #ff0000Hello!", root, 255, 255, 255, true) end addCommandHandler ( "hi", saytext )
  14. Well, why don't you make your own pickup? And show us your code (if you have one).
  15. Search: https://community.multitheftauto.com/index.php?p=resources EDIT: Autoteams: https://community.multitheftauto.com/index.php?p= ... ls&id=5181
  16. Oh, I'm sorry, I thought he meant MySQL. My bad. EDIT: I think it has that, I'll try.
  17. SELECT * FROM table ORDER BY points DESC This will sort everything by points and make a toplist.
  18. GTX

    dbPoll

    Okay, I got it. EDIT: Nevermind, it works now. Thank you Cadu!
  19. GTX

    dbPoll

    This gets my points, and I want to make a "top list". Example: a = 100 points b = 101 points Element data: b = 1 a = 2
  20. Why don't you try it? Maybe it does what you exactly want.
  21. Do: /start global /start logs for 3th one: show us your script.
  22. function func() local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( source ) ) ) if (gang == "SWAT" ) then setPedStat ( source, 24, 200 ) end end addEventHandler("onPlayerSpawn", root, func)
  23. GTX

    dbPoll

    Then: attempt to index field '?' (a nil value)
  24. GTX

    dbPoll

    function updateRank() for i, v in ipairs(getElementsByType("player")) do if getElementData(v, "guest_") ~= 1 then local res = sqlC:query("SELECT * FROM accounts WHERE username='"..getElementData(v, "username_").."'") if res then local result = mysql_fetch_assoc(res) local rank = sqlC:query("SELECT * FROM accounts WHERE points>='" .. result["points"].."'") local r = #mysql_fetch_assoc(rank) if r then setElementData(v, "Rank", r) end end end end end That? It shows 0 for me.
  25. GTX

    dbPoll

    Okay, nevermind for that. The code below returns this error: attempt to get length of a userdata value. Why? function updateRank() for i, v in ipairs(getElementsByType("player")) do if getElementData(v, "guest_") ~= 1 then local res = sqlC:query("SELECT * FROM accounts WHERE username='"..getElementData(v, "username_").."'") if res then local result = mysql_fetch_assoc(res) local rank = #sqlC:query("SELECT * FROM accounts WHERE points>='" .. result["points"].."'") if rank then setElementData(v, "Rank", rank) end end end end end
×
×
  • Create New...