Jump to content

Gravestone

Members
  • Posts

    467
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Gravestone

  1. Code has got to do nothing with that. All the scripts are different. It changes everything when a gamemode is changed or another map is started. Playing custom sounds as well as original. Showing original hud aswell as custom. Showing original nametags as well as custom. And every other thing. I don't know what's causing this.
  2. Gravestone

    security

    Oh you mean people around you in real life. Well that's another case. We are not responsible for that, you can hide your keyboard and then type. (That's what most people do)
  3. I've seen that /whowas and /whois is not an admin panel command, it is somewhere in MTA. I want to change the output of /whois and /whowas. Is there anyway I can change it? If I use onPlayerCommand and cancel event if the command is /whowas then will it also cancel if I create my own /whowas?
  4. onGamemodeMapStart is a shared event. The best way to load objects is client side.
  5. I don't see any panels in the image. What are you talking about?
  6. There are multiple functions for this. Many are shared, many are client sided. For e.g createObject. It is a shared function and handler of this can be server sided and client sided both. (onResourceStart, onClientResourceStart)
  7. Gravestone

    security

    The changed password outputs in the chatbox of the client only. It doesn't appear in server logs or any other place, so this is not dangerous.
  8. The data is liked saved. When I logout, my time is set to 47 minutes and when I restart the resource, my time is set to 47 minutes.
  9. I edited the code... I post the code after I have tried my best and when I am not able to understand what is causing the bugs. So when I get a reply, I understand how to fix it next time when I face the same problem.
  10. Well it should save the data as well as set it to 0 since the account the player was using isn't being used.
  11. Another problem. The data isn't saving when the resource stops or the client logs out. addEventHandler("onPlayerLogout", root, function(acc) local timer = getElementData ( source , "timer:onlineTime" ) if isTimer ( timer ) then killTimer ( timer ) end setElementData(source, "Online Time", "0 minutes") setAccountData(acc, "Online Time", getElementData(source, "Online Time")) end) addEventHandler("onResourceStop", root, function() local players = getElementsByType("player") for i,v in ipairs(players) do setAccountData(getPlayerAccount(v), "Online Time", getElementData(v, "Online Time")) end end)
  12. Alright its working now. Thanks.
  13. Are you sure? I created a new account just incase the data might be bugged, but the problem is the same. This appears after every minute in the debugscript Error at line 13, attempt to perform arithmetic on a string value.
  14. onlineTime will not work since the scoreboard columns accept the element data which are named as the column, that means, it should be 'Play Time' instead of 'onlineTime'. I changed it but in both ways, it doesn't work. Error at line 13, attempt to perform arithmetic on a string value.
  15. This increases the playtime in seconds only.
  16. The following code counts the player's playing time. I want it like this: If the playing time is less than 1 hour then it should display in scoreboard the time in 'x minutes'. If the playing time is more than an hour then it should display in scoreboard the time in 'x hours'. If the playing time is more than 24 hours then it should display in scoreboard the time in 'x days'. Days will be the maximum counting number.
  17. It's working now. Thanks for the help.
  18. Alright. Setting alpha back to normal when the mouse moves works. What about when the player moves?
  19. I tried it already. In both cases, it will return the value true. The problem is something else, which I can't figure out.
  20. This code sets the player's alpha to 100 who goes afk for more than 45 seconds. It should set his alpha back to 255 when he moves hi mouse, moves himself or clicks any button. Client side: function removeAFK (player) if getElementData(player, "AFK") == "true" then setElementAlpha(player, 255) end end addEventHandler("onClientMouseMove", root, removeAFK) The server side code does detect the movement but a bit late. And this client side scripts isn't detecting the movement. Thanks in advance.
  21. You might wanna learn how to help first. This forum is to help, and I'm here to learn. Stop being rude.
×
×
  • Create New...