[release] Some useful scripts for promod
Featured Replies
Сейчас на странице 0
- Нет пользователей, просматривающих эту страницу
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Используя этот сайт, вы соглашаетесь Условия использования.
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
apadayo/dukip- helping in alive players script
dekart811- Team names script
Aalalex- enabling plant sound
Tonejo[A]- Team names
MegMak 2907- messages on hud