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

Messages - Yuriitwo

#1
Videos & Screenshots / TOMORROWLAND
Oct 09, 2023, 09:51 AM
#2
Script Showroom / Re: Multi-Language System
Aug 20, 2023, 02:15 AM
#3
Script Showroom / Re: Multi-Language System
Aug 20, 2023, 02:15 AM
Quote from: 2b2ttianxiu on Aug 11, 2023, 01:24 AMbut, why use the nut code made it? u can try custom file. belike:

en-us.lang:

hello-world=hello world

zh-cn.lang:

hello-world=你好,世界

I found this way more interesting, because it is easier to implement other languages, and it is also easier to understand.
#4
The error occurred because the variable 'cp' is directly receiving the text of the checkpoint (the command 'local cp = text;' is assigning 'text' directly to the variable 'cp'). However, to remove a checkpoint, you need the checkpoint object that was created earlier, not the string with the representation of the 'CreateCheckpoint' command.

The corrected command should use the 'FindCheckpoint' function to find the checkpoint object corresponding to the specified ID. Here is the corrected command:
else if (cmd == "delcp") {
    if (text) {
        local cpID = text.tointeger();
        local cp = FindCheckpoint(cpID);

        if (cp) {
            cp.Remove();
            MessagePlayer("[#FFFFFF]Checkpoint has been removed!", player);
        } else {
            MessagePlayer(format("[#FFFFFF]Checkpoint with ID %d not found!", cpID), player);
        }
    } else {
        MessagePlayer("[#FFFFFF]Write the checkpoint ID to remove it!", player);
    }
}

With this correction, the code will search for the correct checkpoint using the 'FindCheckpoint' function, and if the checkpoint is found (i.e., if the specified ID corresponds to a valid checkpoint), it will be removed using the 'cp.Remove()' function. Otherwise, a message indicating that the checkpoint was not found will be sent to the player.



Please also replace these two lines in the /addcp command script:
CreateCheckpoint(null, 1, true, Vector(PosX.tofloat() , PosY.tofloat() , PosZ.tofloat()), ARGB(255,255,255,255), 2);
MessagePlayer("[#FFFFFF]Check point has been created.!", player);
MessagePlayer("CreateCheckpoint(null, 1, true, Vector("+ PosX.tofloat() +", " + PosY.tofloat() + ", "+ PosZ.tofloat() +", ARGB(255,255,255,255), 2);", player);
print("CHECKPOINT: " + PosX + ", " + PosY + ", " + PosZ);

With these two lines:
CPMapping <- CreateCheckpoint(null, 1, true, Vector(PosX.tofloat() , PosY.tofloat() , PosZ.tofloat()), ARGB(255,255,255,255), 2);
MessagePlayer("[#FFFFFF]Check point has been created, ID: [#f0d1d1]" + CPMapping.ID + "[#FFFFFF].", player);
MessagePlayer("CreateCheckpoint(null, 1, true, Vector("+ PosX.tofloat() +", " + PosY.tofloat() + ", "+ PosZ.tofloat() +", ARGB(255,255,255,255), 2);", player);
print("ID: " + CPMapping.ID + " CHECKPOINT: " + PosX + ", " + PosY + ", " + PosZ);

Now, with the corrected lines, the checkpoint creation message will include the ID of the newly created checkpoint.
#5
Script Showroom / Re: Multi-Language System
Aug 04, 2023, 08:59 AM
Quote from: habi on Aug 04, 2023, 06:55 AMGood system.
You could replace the original msg function also this way:
MessagePlayer("Bem-vindo", "Welcome", "Bienvenido", player );

local msgplayer = MessagePlayer
rawset("MessagePlayer", function (...){
switch(vargv.len())
{
case 2: return msgplayer(vargv[0], vargv[1] );break;

case 4: return msgplayer(getMsgByLanguage(vargv[0], vargv[1], vargv[2], vargv[3]), vargv[3] );

default: throw("Invalid no:of parameters");
}
});

Thanks for the tip, I didn't think of that at the time lol
#6
Script Showroom / Re: Multi-Language System
Aug 04, 2023, 03:40 AM
Quote from: Ridwan Rz on Aug 04, 2023, 03:08 AMThanks for the language system yuriitwo,  I was about to ask you about this on DC. :DD

You're welcome, my friend. I just want to contribute in some way.
#7
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.
#8
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
#9
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









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

The Dawn Is Coming

#11
Thank you very much, I'm glad that you and the entire community enjoyed it. I really liked that this map was used in a DM event. It took a bit of work to build it due to some objects that were bugging, but in the end, it all worked out.

Soon, the download link will be updated. I will add trees around the city to make it a bit more interesting. In this case, adding trees is not really necessary since players can manually place them wherever they want, but I will still add them soon.

I am researching a nice place in GTA SA to be added in VCMP, and I plan to make something more elaborate like Angel Pine.
#12
Thank you very much, I'm glad to have helped you.
#13
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
#14
Thanks :3
#15
That would be really cool, and thank you.