Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Yuriitwo

#1
Videos & Screenshots / TOMORROWLAND
Oct 09, 2023, 09:51 AM
#2
Script Showroom / Multi-Language System
Aug 04, 2023, 12:38 AM
Multi-Language System


Welcome to the Multi-Language System! This is a project that allows you to add 3 languages, but you can implement more languages by adding base functions. In this example, the available languages are Portuguese, English, and Spanish. This system was developed with the assistance of (LBR)Diego^.



Installation

Follow the steps below to set up the Multi-Language System on your server:

  • Download the files from the repository.
  • After downloading the repository, you will find two files. Copy the "LanguageSystem.nut" file to the scripts folder of your server. In the "Essential.nut" file, you will find everything you need to install the system.
  • Add the following code in the onScriptLoad() to load the functions from the "LanguageSystem.nut" file:
    Code (squirrel) Select
    function onScriptLoad() {
       dofile("scripts/LanguageSystem.nut");
    }

  • Also, add the following line in the onScriptLoad() to create an array "Language" with the maximum number of players, so it's possible to switch between languages:
    Code (squirrel) Select
    function onScriptLoad() {
       dofile("scripts/LanguageSystem.nut");
       Language <- array(GetMaxPlayers(), 1);
    }

  • Add the "idioma" command in the onPlayerCommand() function to allow players to change the language:
    Code (squirrel) Select
    function onPlayerCommand( player, cmd, text ) {
        if ( cmd == "idioma" || cmd == "language" || cmd == "linguagem" ) {
            if (!text) {
                MessagePlayer( "/> [#08c5ff]" + cmd + " <pt/en/es>", player);
            }
            else if (text == "pt") {
                if (Language[ player.ID ] == 0 ) {
                MessagePlayer("> [#fc3932]O idioma ja esta definido como Portugues.", player);
            }
            else {
                    Language[ player.ID ] = 0;
                    MessagePlayer("> [#08c5ff]Idioma definido como Portugues.", player);
                }
            }
            else if (text == "en") {
                if (Language[ player.ID ] == 1 ) {
                MessagePlayer("> [#fc3932]The language is already set to English.", player);
            }
            else {
                    Language[ player.ID ] = 1;
                    MessagePlayer("> [#08c5ff]Language set to English.", player);
                }
            }
            else if (text == "es") {
                if (Language[ player.ID ] == 2 ) {
                MessagePlayer("> [#fc3932]El idioma ya esta configurado en espanol.", player);
            }
            else {
                    Language[ player.ID ] = 2;
                    MessagePlayer("> [#08c5ff]Idioma configurado en espanol.", player);
                }
            }
            else MessagePlayer(getMsgByLanguage("> [#fc3932]Esse idioma nao esta na lista.", "> [#08c5ff]This language is not on the list.", "> [#08c5ff]Este idioma no esta en la lista.", player), player);
        }
    }

About the system

This is a multi-language system designed to handle different messages for players in their preferred language. The system uses an array called Language to keep track of the language chosen by each player.

  • getMsgByLanguage(ptMsg, enMsg, esMsg, player)
    This function takes four parameters: ptMsg, enMsg, esMsg, and player. It determines the message to be returned based on the player's chosen language. It first checks the Language array for the player's language preference and returns the corresponding message in that language. If the player's language is not 0 (Portuguese), 1 (English), or 2 (Spanish), it will return the ptMsg as a default fallback.

  • getMsgByLanguageAllPlayers(ptMsg, enMsg, esMsg)
    This function takes three parameters: ptMsg, enMsg, and esMsg. It iterates through all the players on the server and sends the appropriate message to each player based on their chosen language. It uses the MessagePlayer function to send the messages.

  • getMsgByLanguageAllExcept(ptMsg, enMsg, esMsg, player)
    This function is similar to the previous one, but it excludes sending the message to a specific player passed as the player parameter. It iterates through all players on the server except the specified player and sends the appropriate messages to each player based on their chosen language.

Overall, this system allows you to manage and deliver messages in different languages based on each player's preferences. By calling the appropriate functions, you can send messages to individual players, all players, or all players except a specific one, in their chosen language.
#3
Snippet Showroom / Radio Stations
Aug 02, 2023, 03:11 AM
Radio Stations


I find it quite interesting the possibility of adding customized radios using the IP addresses of the stations. Here are the IP addresses of
the 'Hunter FM' radios that I found, for those who enjoy this type of music. I'll leave them below so you can add them to your servers.




Add this function onScriptLoad()
CreateRadioStream( 11, "Pop", "https://live.hunter.fm/pop_high", true );
CreateRadioStream( 12, "Pop2K", "https://live.hunter.fm/pop2k_high", true );
CreateRadioStream( 13, "Rock", "https://live.hunter.fm/rock_high", true );
CreateRadioStream( 14, "Tropical", "https://live.hunter.fm/tropical_high", true );
CreateRadioStream( 15, "80s", "https://live.hunter.fm/80s_high", true );
CreateRadioStream( 16, "Lofi", "https://live.hunter.fm/lofi_high", true );
CreateRadioStream( 17, "Smash!", "https://live.hunter.fm/smash_high", true );
CreateRadioStream( 18, "Sertanejo", "https://live.hunter.fm/sertanejo_high", true );
CreateRadioStream( 19, "Pisadinha", "https://live.hunter.fm/pisadinha_high", true );

Photo
#4
Developer: Yuriitwo
Gamemode: Drift/Freeroam
Server IP: 51.178.65.136:8119
Discord: https://discord.gg/uS9dVfUAhR
Website: https://malibutwy.netlify.app/
Credits: (LBR)Diego^, (LBR)Naru, razorn7, Yyg, Sebastian and Shose.



Photos









#5
Fiesta in Malibu - Drift/Freeroam (Teaser)

The Dawn Is Coming

#6
Map Showroom / Angel Pine - GTA San Andreas
Jan 29, 2023, 01:35 AM
Angel Pine


Introduction
Hello, after having released the mod Del Perro Pier I went looking for a part of the GTA San Andreas map to add to my server, so I found Palomino Creek, the name of the mod is Angel Pine, but it's because Palomino Creek and Angel Pine are very similar, the difference is that Palomino Creek is a little bigger than Angel Pine, and I only put Angel Pine because it's a nice name :-D, after weeks I finally finished the map, I know the community likes this kind of map mod, so I decided to share it with you.


Video
https://youtu.be/BmYhiDwfkmQ


Images













Archives
Angel Pine


Angel Pine, Made by Yuriitwo
#7
Del Perro Pier


Introduction
Hello, this is my first time posting on the forum, I'm not very good at scripting but I'm good at mapping.
I converted "Del Perro Pier" to add to my server, so I decided to share this map with the VCMP community,
Hope you like it.


Images





Archives
Del Perro Pier