Jump to content

JoaoZanetti

Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by JoaoZanetti

  1. Aqui voce pode ver os eventos do lado do client. E esse outro link mostra os eventos do servidor.
  2. Meu caso de uso é: preciso utilizar skins diferentes (TXD, DFF) no mesmo veiculo ou se possivel criar um novo ID de veiculo para alocar a skin. O motivo é: Quero ter mais carros customizados do que os disponiveis no GTA. Com esse novo update é possivel de alguma forma aumentar o numero de carros no GTA e poder dar replace em mais skins? Vejo que ja existia algumas perguntas em relacao a isso mas faz um bom tempo, entao com esse ultimo update talvez teria algo que suprisse essa necessidade.
  3. I created a Discord bot that convert a YouTube link to .mp3. That was the only way i found to use musics from YouTube on MTA. You can invite my bot to your server. Bot URL: https://discordapp.com/api/oauth2/authorize?client_id=676796912250388503&permissions=8&scope=bot Create a channel and use command #transcodechannel on the recently created channel. BOT will listen for conversion just on this channel. You can change the channel using this command again on another channel. To convert a link use #conveter <link youtube>. Bot currently don't support +10min videos, private videos, unlisted and age restricted videos.
  4. I don't think OGP has a built-in feature to open ports. I never used OGP but i think you just need to open ports using native CentOS firewall. Nginx port to download files firewall-cmd --zone=public --add-port=20080/tcp --permanent Download files firewall-cmd --zone=public --add-port=22005/tcp --permanent Join port firewall-cmd --zone=public --add-port=22003/udp --permanent Browse port firewall-cmd --zone=public --add-port=22126/udp --permanent Save configs firewall-cmd --reload
  5. I don't think its a good idea to use Nginx on Windows, but you just need to download Nginx for Windows and use the same configs i provided.
  6. Do you use dedicated server/VPS or a game panel? What SO, Kernel version, network adapter (if u know)
  7. Replace "workler" to "worker" in first line.
  8. Post your nginx.conf file (/etc/nginx/nginx.conf
  9. JoaoZanetti

    MTA Crash

    Today game crashed 2x in 30 min. Using CTRL R + CTRL L didn't worked, process keep not responding and no crash screen showed up.
  10. JoaoZanetti

    MTA Crash

    Thanks! I will keep this thread updated if crashes don't stop.
  11. JoaoZanetti

    MTA Crash

    Most of the time its not a crash screen, MTA just freeze and you need to close on task manager, i think this type of crash don't log anything to report files. I just run this command on F8 and MTA started a update, i will keep track if this reduce the number of crashes.
  12. JoaoZanetti

    MTA Crash

    Some players on my server just reported a intermittently crash, we didn't changed anything on server for 5 months, and from 1~2 month ago i'm receiving many crash reports. I crashed today, that's the link for my diag: https://pastebin.mtasa.com/883184729. I'm using GTA Steam version.
  13. I didnt understand that part but i will implement what you said on first reply. Thanks.
  14. Thanks for your answer! But, if someone spawn a car i receive a onClientElementStreamIn event, and when i receive this i call setVehicleGhost() function again, when i use getElementsByType("vehicle") shoudnt be returned all online server vehicles?
  15. Hi everyone! Im trying to make a resource that remove your vehicle collision when you press H. The purpose of this resource is that no one can crash in your vehicle, this function is working fine, but when you hit someone that dont have ghost activated, his car get crashed. I want to make possible if you have ghost activated no one can crash in your car and you cant crash each others cars. I added line 11 because i think that making this function again changing sides would work, but didnt happen.
  16. You can install a web interface to cron too. https://github.com/alseambusher/crontab-ui
  17. To install some packages and edit firewall you need to have root permissions. But yeah, you can run your server without root privileges, its better if you keep minimum needed permissions.
  18. Use this subforum to post in portuguese.
  19. Maybe bootcamp.
  20. JoaoZanetti

    help me

    Post your mtaserver.conf here.
  21. It's a good alternative. Another option: connect to SFTP and edit with File Zilla.
  22. This tutorial will guide you to install MTA-Server 64 bits and NGINX as external web server. What is NGINX? Is a high performance web server, it can be used to make players download your server at full available link speed with a high compression rate. Droplet used: 512MB Ram 1vCore 100/100 Uplink Centos 7.3.1611 x64 Requirements: Root permissions. Here is the resources used in IDLE (6 hours graph). 1 - Lets prepare our system! Change to root user. $ sudo su We need to update our distro, we want the latest packages. $ yum -y update Now we will install some packages that we will use along this tutorial (screen to manage screens, unzip to .zip and EPEL for extra RHEL packages). $ yum -y install screen $ yum -y install unzip $ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm $ rpm --install --nosignature epel-release-latest-7.noarch.rpm Start your firewall (You can check firewall status with service firewalld status). $ service firewalld start Lets open just ports that we use on MTA and NGINX. 22126 for MTA Query list, 22003 for MTA Server, 22005 for HTTP files and 20080 for NGINX server. $ firewall-cmd --permanent --zone=public --add-port=22126/udp $ firewall-cmd --permanent --zone=public --add-port=22003/udp $ firewall-cmd --permanent --zone=public --add-port=22005/tcp $ firewall-cmd --permanent --zone=public --add-port=20080/tcp You should see "success" at the end of each command from firewall Now we will reload firewall to make active our new rules. $ firewall-cmd --reload 2 - Setting up MTA Server. Now we will download all necessaries files to start our MTA Server. Navigate to /home and create a directory called MTA. $ cd /home $ mkdir MTA $ cd MTA Download all files (Server, base config and resources). $ wget https://linux.multitheftauto.com/dl/multitheftauto_linux_x64.tar.gz $ wget https://linux.multitheftauto.com/dl/baseconfig.tar.gz $ wget https://mirror.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip Extract everything. $ tar -xvf multitheftauto_linux_x64.tar.gz $ tar -xvf baseconfig.tar.gz $ unzip mtasa-resources-latest.zip Rename multitheftauto_linux_x64 to server. $ mv multitheftauto_linux_x64 server Now we will move our baseconfig files to server folder and remove old files. $ cd baseconfig $ mv * ../server/mods/deathmatch $ cd .. $ rm baseconfig -f -r $ rm baseconfig.tar.gz -f Now we will do the same thing as we did above, but with our resources files, just create folder, and move everything. $ mkdir server/mods/deathmatch/resources $ mv -t server/mods/deathmatch/resources [admin] [editor] [gameplay] [gamemodes] [managers] [web] Ok, now that we finished with server files, we will move our server folder to / and remove MTA folder (MTA folder is inside /home directory). $ mv server / $ cd .. $ rm * -f -r We need to set 777 permission to mta-server64 bin file. $ cd /server $ chmod -R 777 mta-server64 Now we will create a screen called "server-screen" and start our server (Just for test). $ screen -S server-screen $ ./mta-server64 We expect to see a message like this: Server started and is ready to accept connections! Now that everything is working we will stop MTA server and minimize our screen. CTRL + c $ clear CTRL a + CTRL d 3 - The fun part. Lets install NGINX and create a server file. (NGINX uses modular server files). $ yum -y install nginx $ service nginx stop $ cd /etc/nginx/conf.d $ vi mta-server.conf Lets insert some lines of code inside our .conf file. Don't break the indentation of the file. (Use INSERT in your keyboard to insert files and not replace) server { listen 20080; root /server/mods/deathmatch/resource-cache/http-client-files; server_name localhost; access_log off; } Save and exit. Press ESC Press : Type wq and hit enter Now we will change our global NGINX server configs. $ vi /etc/nginx/nginx.conf On the top of the file put this: worker_rlimit_nofile 5000; Increase worker_connections 1024 to 5000 worker_connections 5000; Below access_log /var/log/nginx/access.log main; insert this lines: gzip on; gzip_types *; We don't want to use NGINX as public web server, so lets change the default port. Change: listen 80 default_server; and listen [::]:80 default_server; to listen 8081 default_server; listen [::]:8081 default_server; The top of your config file need to look like this: Start your NGINX server. $ service nginx start Test NGINX config. If you open this address and download a file, MTA Server block is ok. http://YOUR_SERVER_IP:20080/admin/client/admin_ACL.lua To test compression, navigate to: http://www.whatsmyip.org/http-compression-test/ And use this URL: http://YOUR_SERVER_IP:20080/admin/client/admin_ACL.lua 4 - Change MTA config file. Now we will point our download URL to NGINX URL. $ cd / $ vi /server/mods/deathmatch/mtaserver.conf Change <httpdownloadurl></httpdownloadurl> to: <httpdownloadurl>http://YOUR_SERVER_IP:20080</httpdownloadurl> 5 - Starting MTA Server. Resume screen. $ screen -r server-screen Start MTA Server. $ ./mta-server64 Minimize screen. CTRL a + CTRL d Its done, now your server is ready to accept connections and download all mods with fast speed. Useful links:
×
×
  • Create New...