本文整理汇总了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"));
});
}
示例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;
}
示例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;
}
示例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;
}
示例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]);
}
}
示例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;
}
}
}
});
}
示例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;
});
}
示例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"));
}
示例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);
});
}
}
示例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);
}
示例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"));
}
示例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.");
}
}
}
示例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"));
}
示例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;
}
示例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.");
}
}
}