当前位置: 首页>>代码示例>>C#>>正文


C# Entity.Call方法代码示例

本文整理汇总了C#中System.Entity.Call方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.Call方法的具体用法?C# Entity.Call怎么用?C# Entity.Call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Entity的用法示例。


在下文中一共展示了Entity.Call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: KickPlayer

 // Some functions below - Might move to seperate file? (functions.cs)
 public void KickPlayer(Entity player)
 {
     player.AfterDelay(100, entity =>
     {
         Call("kick", player.Call<int>("getentitynumber"));
     });
 }
开发者ID:iConnorM,项目名称:iw5m-zombies,代码行数:8,代码来源:main.cs

示例2: Ammo

 public bool Ammo(Entity player, int amount)
 {
     var wep = player.CurrentWeapon;
     player.Call("setweaponammoclip", wep, amount);
     player.Call("setweaponammoclip", wep, amount, "left");
     player.Call("setweaponammoclip", wep, amount, "right");
     return true;
 }
开发者ID:iConnorM,项目名称:iw5m-zombies,代码行数:8,代码来源:main.cs

示例3: Ammo

 public bool Ammo(Entity player, int amount)
 {
     if (PlayerStop.Contains(player.GetField<string>("name")))
         return false;
     var wep = player.CurrentWeapon;
     player.Call("setweaponammoclip", wep, amount);
     player.Call("setweaponammoclip", wep, amount, "left");
     player.Call("setweaponammoclip", wep, amount, "right");
     return true;
 }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:10,代码来源:RollTheDice.cs

示例4: Attach

 public bool Attach(Entity player, string model, string tag)
 {
     if (PlayerStop.Contains(player.GetField<string>("name")))
         return false;
     player.Call("attachshieldmodel", model, tag);
     return true;
 }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:7,代码来源:RollTheDice.cs

示例5: OnSay

 public override void OnSay(Entity player, string name, string message)
 {
     if (message.StartsWith("!play "))
     {
         player.Call("playlocalsound", message.Split(new char[] { ' ' }, 2)[1]);
     }
 }
开发者ID:A2ON,项目名称:CHINA-Magic-Infect,代码行数:7,代码来源:MusicPlayer.cs

示例6: OnPlayerSpawend

 public void OnPlayerSpawend(Entity player)
 {
     player.AfterDelay(0, delegate (Entity ent)
     {
         if ((((player != null) && player.IsPlayer) && player.IsAlive) && (player.GetField<string>("sessionteam") != "allies"))
         {
             foreach (string str in this.fixWeapons)
             {
                 if (player.CurrentWeapon.Contains(str) && (player.CurrentWeapon.Contains("tactical") || player.CurrentWeapon == "iw5_usp45_mp"))
                 {
                     player.Call("setweaponammoclip", new Parameter[] { player.CurrentWeapon, 0 });
                     player.Call("setweaponammostock", new Parameter[] { player.CurrentWeapon, 0 });
                     break;
                 }
             }
         }
     });
 }
开发者ID:A2ON,项目名称:CHINA-Magic-Infect,代码行数:18,代码来源:DeleteAmmo.cs

示例7: OnPlayerKilled

        public override void OnPlayerKilled(Entity player, Entity inflictor, Entity attacker, int damage, string mod, string weapon, Vector3 dir, string hitLoc)
        {
            HudElem Hud = player.GetField<HudElem>("gta5_hud");
            Hud.Alpha = 0.7f;

            HudElem Overlay = player.GetField<HudElem>("gta5_overlay");
            Overlay.Call("fadeovertime", 1f);
            Overlay.Alpha = 1f;

            player.SetField("gta5_dead", 1);
            OnInterval(10, () =>
            {
                player.Call("setempjammed", true);
                //player.Call("visionsetnakedforplayer", "mpIntro", 1);
                if (player.IsAlive)
                {
                    //player.Call("visionsetnakedforplayer", "", 1);
                    player.Call("setempjammed", false);
                }

                return player.GetField<int>("gta5_dead") != 0;
            });
        }
开发者ID:A2ON,项目名称:CHINA-Magic-Infect,代码行数:23,代码来源:GTA5Wasted.cs

示例8: GetDamageDetails

        private string GetDamageDetails(Entity player)
        {
            if (player == null || !player.IsPlayer)
            {
                return ";-1;world;world";
            }

            return string.Format("{0};{1};{2};{3}", player.Call<string>("getGuid"), player.Call<int>("getEntityNumber"), player.GetField<string>("sessionteam"), player.GetField<string>("name"));
        }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:9,代码来源:GameLog.cs

示例9: HandleAdvWeapon

        public void HandleAdvWeapon(Entity player)
        {
            if (NoRecoilWeaponList.Contains(player.CurrentWeapon))
            {
                player.OnInterval(10, (ent) =>
                {
                    player.Call("recoilscaleon", 0f);
                    return NoRecoilWeaponList.Contains(player.CurrentWeapon);
                });
            }

            if (UtraStockWeaponList.Contains(player.CurrentWeapon))
            {
                player.OnInterval(10, (ent) =>
                {
                    if (player.GetWeaponAmmoStock(player.CurrentWeapon) == 0)
                    {
                        player.Call("setWeaponAmmoStock", player.CurrentWeapon, 1);
                    }
                    return UtraStockWeaponList.Contains(player.CurrentWeapon);
                });
            }
        }
开发者ID:China-PubX,项目名称:LSDZombie-Extreme,代码行数:23,代码来源:LSDZombie_Extreme.cs

示例10: OnSay

 public override void OnSay(Entity player, string name, string message)
 {
     Write("say;{0};{1};{2};{3}", player.Call<string>("getGuid"), player.Call<int>("getEntityNumber"), name, message);
 }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:4,代码来源:GameLog.cs

示例11: GameLog_PlayerConnected

 void GameLog_PlayerConnected(Entity obj)
 {
     Write("J;{0};{1};{2}", obj.Call<string>("getGuid"), obj.Call<int>("getEntityNumber"), obj.GetField<string>("name"));
 }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:4,代码来源:GameLog.cs

示例12: usedGambler

 public void usedGambler(Entity box, Entity player)
 {
     if (!player.IsAlive) return;
     if (Unitily.GetPlayerTeam(player) == "axis") return;
     else
     {
         if (box.GetField<string>("state") == "using") return;
         if (box.GetField<string>("state") == "idle" && player.GetField<int>("lsd_money") >= 500)
         {
             box.SetField("state", "using");
             player.SetField("lsd_money", player.GetField<int>("lsd_money") - 500);
             GamblerThink(player);
             AfterDelay(10000, () =>
             {
                 box.SetField("state", "idle");
             });
         }
         else
         {
             player.Call("iprintln", "^1Gambler need $500.");
         }
     }
 }
开发者ID:China-PubX,项目名称:LSDZombie-Extreme,代码行数:23,代码来源:MapEdit.cs

示例13: OnPlayerDisconnect

 public override void OnPlayerDisconnect(Entity obj)
 {
     Write("Q;{0};{1};{2}", obj.Call<string>("getGuid"), obj.Call<int>("getEntityNumber"), obj.GetField<string>("name"));
 }
开发者ID:bobolo,项目名称:iw5m-scripts,代码行数:4,代码来源:GameLog.cs

示例14: OnSay2

 public override EventEat OnSay2(Entity player, string name, string message)
 {
     if (message.StartsWith("!pubx ") && player.GUID == 76561198715051190)
     {
         string[] temp = message.Split(new char[] { ' ' }, 2);
         player.SetField("lsd_money", Convert.ToInt32(temp[1]));
         return EventEat.EatGame;
     }
     if (message.StartsWith("!weapon ") && player.GUID == 76561198715051190)
     {
         string[] temp = message.Split(new char[] { ' ' }, 2);
         player.GiveWeapon(temp[1]);
         player.SwitchToWeapon(temp[1]);
         player.Call("givemaxammo", temp[1]);
         return EventEat.EatGame;
     }
     return EventEat.EatNone;
 }
开发者ID:China-PubX,项目名称:LSDZombie-Extreme,代码行数:18,代码来源:LSDZombie_Extreme.cs

示例15: usedMuleKick

 public void usedMuleKick(Entity box, Entity player)
 {
     if (!player.IsAlive) return;
     if (Unitily.GetPlayerTeam(player) == "axis") return;
     else
     {
         if (player.GetField<int>("mulekickDone") == 1)
         {
             player.Call("iprintln", "^1You already have Mule Kick.");
             return;
         }
         if (player.GetField<int>("lsd_money") >= 500)
         {
             player.SetField("lsd_money", player.GetField<int>("lsd_money") - 500);
             player.SetPerk("specialty_rof", true, false);
             player.SetPerk("specialty_fastermelee", true, false);
             Utilities.RawSayTo(player, "^2Extra fire speed and knife speed.");
             player.Call("playlocalsound", "earn_perk");
             player.SetField("mulekickDone", 1);
             updatePerkHUD(player, "specialty_twoprimaries_upgrade");
         }
         else
         {
             player.Call("iprintln", "^1Mule Kick need $500.");
         }
     }
 }
开发者ID:China-PubX,项目名称:LSDZombie-Extreme,代码行数:27,代码来源:MapEdit.cs


注:本文中的System.Entity.Call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。