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 MenuQuote from: H.a.S.a.N on Aug 09, 2023, 04:34 PMAmazing work brother
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=你好,世界
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);
}
}
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);
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);
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");
}
});
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
function onScriptLoad() {
dofile("scripts/LanguageSystem.nut");
}
function onScriptLoad() {
dofile("scripts/LanguageSystem.nut");
Language <- array(GetMaxPlayers(), 1);
}
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);
}
}
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 );