Jump to content

AJXB

Members
  • Posts

    367
  • Joined

  • Last visited

Everything posted by AJXB

  1. AJXB

    Playtime

    It won't save/load The time adds to ElementData But when I reconnect the time is gone.
  2. AJXB

    Playtime

    function loadPlayTime(account) local minutes = getAccountData(account, "playTime") if (tonumber(minutes)) then minutes = tonumber(minutes) local hours = math.floor(minutes / 60) if (hours > 0) then setElementData(source, "playTime", hours.." Hours") else setElementData(source, "playTime", minutes.." Minutes") end else setAccountData(account, "playTime", 0) setElementData(source, "playTime", "0 Minutes") end playTimeTimer[source] = setTimer(incrementPlayTime, 60000, 0, source) end addEventHandler("onPlayerLogin", root, loadPlayTime) Save side: function incrementPlayTime(player) if (not player or not isElement(player)) then return end if (isGuestAccount(getPlayerAccount(player))) then return end local account = getPlayerAccount(player) local minutes = getAccountData(account, "playTime") or 1 minutes = tonumber(minutes) minutes = minutes + 1 local hours = math.floor(minutes / 60) if (hours > 0) then setElementData(player, "playTime", hours.." Hours") else setElementData(player, "playTime", minutes.." Minutes") end setAccountData(account, "playTime", minutes) end What's wrong with this?
  3. AJXB

    Timer?

    Yeah it its, thanks!
  4. AJXB

    Timer?

    You're calling this function via what? 'Event - Command - Handler?' addEventHandler("onPlayerWasted",root,test)
  5. AJXB

    Timer?

    Main function and a sub function works on timer, what's the problem? function test () local curAcc = getPlayerAccount(source) setAccountData(curAcc,"Test",true) setTimer ( function () spawnPlayer(source,1186, -1323, 14 + 0.5,0,skin) setElementHealth (source,100) end,7500,1) end Bad argument for spawnPlayer and setElementHealth, expected element
  6. AJXB

    GUI Thing

    What won't be?
  7. AJXB

    GUI Thing

    Worked, thanks!
  8. AJXB

    GUI Thing

    It shows the cursor?
  9. AJXB

    GUI Thing

    I have this client side event: mainLoginWindow = guiCreateWindow(0,0,100,100,"Window",false) addEvent ( "setLoginWindowVisable", true ) function showLoginWindow () guiSetVisible (mainLoginWindow, true) enableCursor ( true ) end addEventHandler( "setLoginWindowVisable", root, showLoginWindow ) It's triggered using this on the server side: addEventHandler ("onPlayerJoin",root, function () triggerClientEvent( source, "setLoginWindowVisable", source ) end ) Yet GUI Window doesn't show, problem?
  10. AJXB

    Save Code

    Thanks, I missed that point
  11. AJXB

    Save Code

    Here is the code:
  12. Steps: 1. Install another server with another dir. 2. Change server port from mta-server.conf 3. you can simply use screen for starting multiple servers. I don't understand where is the problem?
  13. You can use "screen" command to manage windows. Install it using: #sudo apt-get install screen screen-profiles screen-profiles-extras to list the screens: #screen to choose: #screen -S [screen Number] Wish I'm being correct. Just to point out the ports thing [each server different ports].
  14. AJXB

    Map?

    Is there a command to show/hide the F11 Map Window?
  15. AJXB

    Debugscript Problem

    When I execute the command: /debugscript 3 the box on the bottom of the screen appears but with no text at all Solution?
  16. http://pastebin.mtasa.com/310244020 Omg that log is everything on my PC MTADiag is simply awsome!
  17. http://pastebin.mtasa.com/error[No code2 specified] I'm not sure that it gave me a working URL, it just copied this to my clipboard Still the same problem
  18. Thanks for your reply! I re installed MTA:SA Client, the problem stays It started just a while earlier.
  19. An error I get each time I connect to a server, other servers work fine Any Solution?
  20. AJXB

    Settings Error

    Any Solution? Why the script is not connecting to in meta?
×
×
  • Create New...