Jump to content

Arran

MTA Contributors
  • Posts

    590
  • Joined

  • Last visited

Everything posted by Arran

  1. If you specifically want a new CPU for playing MTA look for the one that has a high single threaded performance because GTA SA only uses 1 core of a CPU: https://www.cpubenchmark.net/singleThread.html However any of the above you linked to should be more than sufficient considering a lot of people that play MTA have much much older CPU's than that.
  2. Thanks. If there's any other tasks like this, let me know.
  3. Turns out that MTA has a lot of redundant if statements like: if ( pPed ) { // Blah } else m_pScriptDebugging->LogBadPointer ( luaVM, "ped", 1 ); These checks have been unnecessary since the introduction of argStream and I'm guessing they're only still in the code because it's so time consuming to remove them all. I volunteer to go through all the files and delete any of these unnecessary checks but before I do that I want a developer with access to confirm that if I do this, they will merge my pull request(s). I have done 1 file reducing the file by 286 lines: https://github.com/ArranTuna/mtasa-blue/commit/ef83cee0b6024e73230d77b6225debc81e3d6492 I'm guessing removing them will have virtually no performance impact but removing so many redundant lines definitely improves code readability and I am happy to spend many hours finding and removing all of these statements I just need a confirmation from a developer.
  4. Don't you get a debug warning from setElementData? You're missing argument 3 which is setting what argument 2 should be. It needs to be setElementData(source, "admin.level", adminLevelHere) however your "setalevel" command doesn't save their admin level any where. Add this to "setalevel": setAccountData(getAccountPlayer(targetPlayer), "admin.level", tonumber(szint)) Then when they login get it and set it like this: setElementData(source, "admin.level", tonumber(getAccountData(getPlayerAccount(source), "admin.level"))))
  5. https://wiki.multitheftauto.com/wiki/Compiling_MTASA This page has info on how to get it all working, however the MTA wiki has been down for hours. http://webcache.googleusercontent.com/search?q=cache:https://wiki.multitheftauto.com/wiki/Compiling_MTASA I followed those instructions 2 days ago and everything worked.
  6. Arran

    Rocket kill

    onPlayerDamage doesn't have those parameters that's why I told you, you can't do it server side.
  7. Arran

    Rocket kill

    That is a good idea. We would need to store the last damager and the weapon used when vehicles are attacked, however onVehicleDamage doesn't give us these parameters meaning we'd need to use onClientVehicleDamage and by that point the whole thing would be too impractical for me to commit to the official killmessages resource. However you could do this for yourself. I'd recommend handling onClientPlayerWasted, basically move that function to client side and then onClientVehicleDamage would be more practical, in fact I don't even know why official killmessages has that code server side because the whole thing can be done client side. I actually moved that main function client side for my server.
  8. According to http://php.net/manual/en/function.shell-exec.php shell_exec returns some information in a string so change these 2 lines: shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/mta-server.sh"); echo 'Server started'; Into this: $result = shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/mta-server.sh"); echo 'Result of shell_exec: ' . $result; And maybe it will give you an error message.
  9. There is no such onPlayerMarkerHit function, it's onClientMarkerHit when client side. Also if those files are in the same resource you don't need the "exports.heist001" bit. Also you need to add a check in openMission to make sure that the player that is entering the marker is the local player, otherwise this GUI would open for all players whenever anyone enters it.
  10. Arran

    Rocket kill

    I have fixed this bug. To get my fix you need to go to your resources folder of the server then go into [gameplay] folder then into killmessages folder and open killmessages_server.lua and then copy all of this: https://raw.githubusercontent.com/multitheftauto/mtasa-resources/0c3abe578c8f49d18d765dd21b96693f0b153654/[gameplay]/killmessages/killmessages_server.lua Remove all text in killmessages_server.lua then paste this new text into it. If the server is running do: restart killmessages All vehicle kills and rocket kills should appear correctly.
  11. Arran

    Rocket kill

    Bumping a 2 hour topic, seriously..? killmessages is bugged and I will be fixing it.
  12. Then you'll need to add some debug, the video shows on screen XYZ which is a good start, below that you should add the Z rotation so you can see what rotation it's setting on your ped, because the script might be correct but there's a GTA or MTA bug that makes it appear wrong.
  13. In your image there is a drop down menu that says "Select One" so what are the options to select? The 3 ports you posted are the 3 rules you will need to create.
  14. What options are available in select a service? Server IP address box needs to be 192.168.10.2 Run MTA server.exe and do openports command that will tell you what to put in the table below for example: External port start: 22003 external port end: 22003 protocol: UDP Internal port start: 27015 Internal port end: 22003
  15. Then it must be another setting in the port forwarding process that is wrong, please show us all the settings that you have to put such as what IP address you entered, this should be the local IP address of the computer hosting the server such as 192.168.1.2 you can get this by doing: windows key + R, run: cmd, /ipconfig all, then search for a line like: IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)
  16. Would need the exact error message and the title of the error message for example "CL39" error codes are here: https://wiki.multitheftauto.com/wiki/Error_Codes "Anti-cheat component locked" probably means you either have a cheat program running or the anti cheat system had a problem loading due to something on your computer such as a cheat or unusual system set-up blocking it.
  17. Arran

    New SERVER NGCMTA

    Advertise your server here: https://forum.multitheftauto.com/forum/92-servers-to-play-on/ Also I suggest a bit more detail as to what the server has to offer, like a list of all the activities a player can do.
  18. Arran

    Help browser

    There is a web browser resource that comes with MTA called 'webbrowser' so you can either let players use that or you can copy some of the code that's in it as it allows players to enter a URL to play a video and there's a button to close it.
  19. I use this to make prisoner always face cop: local copX, copY, copZ = getElementPosition(cop) local prisonerX, prisonerY, prisonerZ = getElementPosition(prisoner) local copAngle = ( 360 - math.deg(math.atan2((copX - prisonerX), (copY - prisonerY))) ) % 360 You should be able to use this, copAngle is the Z rotation that you can set on the object so that it faces copX, copY, copZ but if you want it to also look up and down then you can probably clone line 3 from above and play around with copX, prisonerX, copY, prisonerY to get a combination that returns the X and Y rotation for the object.
  20. Only you can really answer that question because only you know which interface you're using, are you using a 3G dongle? If so try 3G dongle/eth4 and if it doesn't work (you can test quickly with the 'openports' server console command) then try 3G dongle/ppp7 then try the other 2.
  21. Launch "MTA server.exe" and show us everything that is at the bottom of C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\logs\server.log The last message should be: "Type 'help' for a list of commands." You can then enter this command into the server console: start editor Then open MTA and go to the 'Local' tab in server browser and you should see your local server then join it and it will be as if you had clicked on the map editor button.
  22. " attempt to index local 'wnd' (a nil value) " means what it says, 'wnd' is a nil value and you are using it as if it was a table. Why do you even have that createWindow function? I'd say something like that is more of an unnecessary complexity. Where ever your script is calling createWindow it's not passing a table as argument 1, if you don't know how to use createWindow then you need to either stop using it and call guiCreateWIndow normally, or read the documentation about it where ever you found that code.
  23. Arran

    VPS Ram

    1. This board is for suggestions, you should have posted in the support board. 2. How much RAM does it say is available? 3. As long as the answer to question 2 is above 500 MB then definitely yes, unless you had some resources that consume a lot of RAM which you can see how much they consume in performancebrowser.
  24. Arran

    Bans SQL

    Why not just use the already existing script that I made: https://wiki.multitheftauto.com/wiki/Resource:Sqlbans Or at the very least, look at how I did it in sqlbans, though I must admit the way I did it isn't as efficient as can be. My resource decrements the time remaining on a regular basis which works well and there's no need to change this but if you wanted to be super efficient you would store the time stamp of when you want them unbanning and then check on a regular basis to see if the time stamp they're due to be unbanned on is lower than the current time stamp.
  25. Should be more like: setTimer(setElementData, 60000 * 10, 1, thePlayer, "isPlayerMuted", false) But thePlayer could easily have quit within those 10 minutes. Also your entire script is fundamentally flawed because there is no verification of permission, such things should be done server side and verify permission with hasObjectPermissionTo and there is also avoid using setElementData for important stuff like whether someone is muted unless you have server side checks to prevent that element data being changed by a client. Further reading on that here: https://wiki.multitheftauto.com/wiki/Script_security
×
×
  • Create New...