Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. startX, startY = 0, 0; -- starting position endX, endY = 300, 300; -- ending position t = 1; -- time addEventHandler ( "onClientReosurceStart", resourceRoot, function ( ) local startTime = getTickCount ( ); local duration = t * 1000; local render = function ( ) local elapsedTime = getTickCount ( ) - startTime; local progress = elapsedTime / duration; local x, y = interpolateBetween ( startX, startY, 0, endX, endY, 0, progress, "OutBounce" ); dxDrawImage ( x, y, 197, 105, "logo.png", 0, 0, 0, tocolor ( 255, 255, 255, 255 ), false ); end addEventHandler ( "onClientRender", root, render ); end ); Should work, didn't test.
  2. Well, what do you want? Logo jumping all the time or only once?
  3. You have to use interpolateBetween. You have nice examples on wiki.
  4. Yes. Exactly. But remember to save file (xmlSaveFile) after editing.
  5. Did you save money to accountData somehow?
  6. songList = { } function updateSongs ( ) local file = xmlLoadFile ( "songs.xml" ) for _, v in ipairs ( xmlNodeGetChildren ( file ) ) do local name, length, played = xmlNodeGetAttribute ( v, "name" ), xmlNodeGetAttribute ( v, "length" ), xmlNodeGetAttribute ( v, "played" ) songList[name] = {length, played} end xmlUnloadFile ( file ) end function loadSongsInGridlist() updateSongs ( ) for name, v in pairs ( songList ) do table.insert(songListGridlist,name) end end -- on click event local name = -- get name here local length, played = songList[name][1], songList[name][2] -- on click event
  7. localPlayer is global definied variable which means player who is using this script right now. After entering the marker you are checking if hit player is this 'localPlayer'. If so, it sets the animation.
  8. setPedAnimation( player, "ped", "WOMAN_walknorm") 'player' isn't defined on this event. Use 'hitPlayer' instead. BTW: Use [lua ] [ /lua] for highlighting.
  9. ALw7sH code would work.
  10. I'll be on computer after 3-4 hours. Then I'll do code for you. Try to understand what I want to do. I want to load all items from XML to table like I mentioned before. Then you said that after clicking you get name. If you have name you can get values from table. If you don't understand you have to wait until I'll get on the computer.
  11. So make like that table["Song name"] = {length, TimesPlayed} And then get values table["Song name"][1] --length table["Song name"][2] --times played
  12. Delete 'for' serverside and trigger table to client. Make loop (for) clientside. Just trigger 'result' only.
  13. Well you can insert all values onto table like that table = {} table["Song name"] = times_played_here And after just get data from table using song's name.
  14. WhoAmI

    mini-games

    I don't understand what are you asking for.
  15. If you are using gridlist you can use https://wiki.multitheftauto.com/wiki/Gu ... etItemData
  16. You can post it here imo.
  17. WhoAmI

    HUD

    If you are using custom radar/HUD it won't work.
  18. Level Of Details CUV
  19. Source of onMarkerHit event is marker and hitElement is an element which has entered the marker.
  20. WhoAmI

    Table

    Oh damn! Forgot about that. Thanks.
  21. WhoAmI

    Table

    loggedAccounts[id]["username"] = username; loggedAccounts[id]["token"] = token; loggedAccounts[id]["email"] = a[1]["email"]; loggedAccounts[id]["serial"] = a[1]["serial"]; loggedAccounts[id]["ip"] = a[1]["ip"]; loggedAccounts[id]["activated"] = a[1]["activated"]; Am I doing something wrong? All values returns correct things. Error is: on line loggedAccounts[id]["username"] = username; As I said, everything return correct values and table 'loggedAccounts' exist.
  22. He wants always its rounding up I'll show you something. local n = 5.9; print ( math.floor ( n ) ); Output: 5 local n = 5.9; print ( math.floor ( n + 0.5 ) ); Output: 6 For correct rounding number you have to add this 0.5.
  23. WhoAmI

    PHP return

    Yea, I think it can using 'return' in function.
  24. Pokaż mtaserver.conf i zrzut ekranu istniejącego modułu w folderze.
×
×
  • Create New...