Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[release] Some useful scripts for promod

Featured Replies

Опубликовано:

hello guys many ppls are asking me to get scripts applied in my server

this scripts are very usefil for promod Search & destroy

Team names

namespace InfinityScript.Examples
{
   using InfinityScript;
   using System;

   public class namesv1 : BaseScript
   {
       public namesv1()
       {
           base.Call("setDvar", new Parameter[] { "g_teamname_allies", "^1-^0[^4TG^0]^1-^2Clan" });
           base.Call("setDvar", new Parameter[] { "g_teamname_axis", "^2Visitantes" });
           base.PlayerConnected += delegate (Entity entity) {
               entity.SetClientDvar("g_teamname_allies", "^1-^0[^4TG^0]^1-^2Clan");
               entity.SetClientDvar("g_teamname_axis", "^2Visitantes");
           };
       }
   }
}

Alive players:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;
using System.Timers;

namespace Alive_Players
{
   public class Alive : BaseScript
   {
       public Alive()
       {
           PlayerConnected += new Action(entity =>
           {
               HudElem LabelA = HudElem.CreateFontString(entity, "hudbig", 0.8f);
               LabelA.SetPoint("TOPLEFT", "TOPLEFT", 30, 110);
               LabelA.SetText("FRIENDLY");
               LabelA.HideWhenInMenu = true;

               HudElem LabelB = HudElem.CreateFontString(entity, "hudbig", 0.8f);
               LabelB.SetPoint("TOPLEFT", "TOPLEFT", 30, 130);
               LabelB.SetText("ENEMY");
               LabelB.HideWhenInMenu = true;

               HudElem LabelANum = HudElem.CreateFontString(entity, "hudbig", 0.8f);
               LabelANum.SetPoint("TOPLEFT", "TOPLEFT", 110, 110);
               LabelANum.HideWhenInMenu = true;

               HudElem LabelBNum = HudElem.CreateFontString(entity, "hudbig", 0.8f);
               LabelBNum.SetPoint("TOPLEFT", "TOPLEFT", 110, 130);
               LabelBNum.HideWhenInMenu = true;

               OnInterval(50, () =>
               {
                   string sessionteam = entity.GetField("sessionteam");
                   string axis = Call("getteamplayersalive", "axis").ToString();
                   string allies = Call("getteamplayersalive", "allies").ToString();
                   LabelANum.SetText((sessionteam.Equals("allies")) ? allies : axis);
                   LabelBNum.SetText((sessionteam.Equals("allies")) ? axis : allies);
                   return true;
               });
           });
       }
   }
}

Enabling Plant Sound

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;

namespace LE3
{
   public class Learn2Code : BaseScript
   {
       public Learn2Code()
           :base()
       {
           PlayerConnected += new Action(entity =>
               {
                   entity.OnNotify("weapon_change", (player, weap) =>
                   {
                       if (weap.ToString() == "briefcase_bomb_mp")
                       {
                           Call("PlaySoundAtPos", entity.Origin, "mp_bomb_plant");
                       }
                   });
               });
       }
   }
}

Little promod:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;

namespace PingFix
{
   public class PingFix : BaseScript
   {
       public PingFix()
           : base()
       {
           PlayerConnected += new Action(entity =>
           {
               entity.SpawnedPlayer += new Action(() =>
               {
                   entity.Call("setClientDvar", "cl_maxpackets", 100);
                   entity.Call("setClientDvar", "cl_packetdup", 1);
                   entity.Call("setClientDvar", "snaps", 30);
                   entity.Call("setClientDvar", "rate", 25000);
               });
           });
       }
   }
}

messages on hud

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;

namespace messageS
{
   public class messageS : BaseScript
   {
       private HudElem info;
       public messageS()
           : base()
       {

           PlayerConnected += new Action(entity =>
           {
               info = HudElem.CreateServerFontString("hudbig", 0.6f);//TYPE AND FONT SIZE
               info.SetPoint("BOTTOMCENTER", "BOTTOMCENTER", 0, 1);//COORDINATES AND LOCATION:CENTER, LEFT, RIGHT, TOP, BOTTOM
               info.HideWhenInMenu = true;
               info.SetText("^1M^2E^3S^4S^5A^6G^7E");//HERE'S WHERE THE MESSAGE GO


           });
       }
   }
}

Credits:

Me- Idea and collecting scripts :D

apadayo/dukip- helping in alive players script

dekart811- Team names script

Aalalex- enabling plant sound

Tonejo[A]- Team names

MegMak 2907- messages on hud

Опубликовано:

You posted this on script releases section, but this fits on Script Development section.

You can't actually "release" what's already been released by others.

If you put it all in one script, keeping the credits, then it might be considered a "release".

 

EDIT: compiled and attached here (so that I don't have to lock the original post to prevent binaries swapping) 3 of the scripts.

Опубликовано:
You posted this on script releases section, but this fits on Script Development section.

You can't actually "release" what's already been released by others.

If you put it all in one script, keeping the credits, then it might be considered a "release".

There should be an official code snippets post in the development section.

Опубликовано:
  • Автор
You posted this on script releases section, but this fits on Script Development section.

You can't actually "release" what's already been released by others.

If you put it all in one script, keeping the credits, then it might be considered a "release".

ok paulo

but i posted it to let all ppls see it because every day they come to me and they want to get it

Опубликовано:

ok But how and where should I put it

Опубликовано:

Thanks. planting sounds are very good to apply for moding..^^

Опубликовано:

Ok can someone PLEASE edit the title to say something other than [realise] (maybe release?) cause its really bugging me.

And this would be better suited in compiled form because most people who can compile this can write these on their own.

Опубликовано:
this would be better suited in compiled form

True, I guess. Although I just see it as code snippets.

Anyway, I compiled 3 of the scripts and attached them on my post, so that I don't have to lock OP's post to prevent binary swapping.

That way OP can keep working and updating the source on the first post, and I'll recompile any update and replace on my post, if requested.

I didn't compile "team names" and "hud messages" because those require the text to be customized before compiling. OP should modify that, as I did here -> viewtopic.php?f=41&t=9465&start=25#p128251

Опубликовано:
  • Автор
You got my name wrong :P

Ok i fixed it :D

 

Ok can someone PLEASE edit the title to say something other than [realise] (maybe release?) cause its really bugging me.

And this would be better suited in compiled form because most people who can compile this can write these on their own.

lool apadayo only u noticed it :D

fixed now :D

Опубликовано:

Great :) but you can add new dvars too your promod script like

               player.SetClientDvar("cg_fov", "80");
               player.SetClientDvar("cg_scoreboardpingtext", "1");
               player.SetClientDvar("waypointIconHeight", "13");
               player.SetClientDvar("waypointIconWidth", "13");
               player.SetClientDvar("cl_maxpackets", "60");
               player.SetClientDvar("r_fog", "1");
               player.SetClientDvar("fx_drawclouds", "1");
               player.SetClientDvar("r_distortion", "1");
               player.SetClientDvar("r_dlightlimit", "4");
               player.SetClientDvar("cg_brass", "1");
               player.SetClientDvar("snaps", "20");
               player.SetClientDvar("com_maxfps", "91");
               player.SetClientDvar("clientsideeffects", "1");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.