Ped Versuch2

This commit is contained in:
Mac_Slash
2020-05-04 16:00:26 +02:00
parent 62b69fe781
commit 10129fde42
2 changed files with 23 additions and 3 deletions

View File

@@ -345,6 +345,15 @@
dimension dimension
); );
} }
/*let dynamicPed = mp.peds.new(mp.game.joaat('mp_m_freemode_01'), mp.players.at(0).position, { dynamic: true });
dynamicPed.controller = mp.players.at(0);
let staticPed = mp.peds.new(mp.game.joaat('player_zero'), mp.players.at(0).position,
{
dynamic: false, // still server-side but not sync'ed anymore
frozen: true,
invincible: true
});*/
if (model == 40) { if (model == 40) {
ped = mp.peds.new( ped = mp.peds.new(
mp.game.joaat('cs_bankman'), mp.game.joaat('cs_bankman'),

View File

@@ -851,8 +851,8 @@ namespace ReallifeGamemode.Server.Commands
} }
} }
[Command("addped", "~m~Benutzung: ~s~/addped [model] [dimension]")] [Command("addpped", "~m~Benutzung: ~s~/addpped [model] [dimension]")]
public void CmdAdminSetSkill(Player player, int model, int dimension = 0) public void CmdAdminAddPPed(Player player, int model, uint dimension = 0)
{ {
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{ {
@@ -860,8 +860,19 @@ namespace ReallifeGamemode.Server.Commands
return; return;
} }
player.TriggerEvent("CLIENT:AddPed", model, player.Position.X, player.Position.Y, player.Position.Z, player.Heading, dimension); player.TriggerEvent("CLIENT:AddPed", model, player.Position.X, player.Position.Y, player.Position.Z, player.Heading, dimension);
//NAPI.Ped.CreatePed(PedHash.Bankman, new Vector3(player.Position.X, player.Position.Y, player.Position.Z), player.Heading, dimension);
}
[Command("addgped", "~m~Benutzung: ~s~/addgped [model] [dimension]")]
public void CmdAdminAddGPed(Player player, int model, uint dimension = 0)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
//player.TriggerEvent("CLIENT:AddPed", model, player.Position.X, player.Position.Y, player.Position.Z, player.Heading, dimension);
Ped Peter = NAPI.Ped.CreatePed(PedHash.Bankman, new Vector3(player.Position.X, player.Position.Y, player.Position.Z), player.Heading, dimension);
} }
[Command("setskill", "~m~Benutzung: ~s~/setskill [Playerid] [Bus/Pilot] [Menge]")] [Command("setskill", "~m~Benutzung: ~s~/setskill [Playerid] [Bus/Pilot] [Menge]")]
public void CmdAdminSetSkill(Player player, string name, string Skill, int SkillLevel) public void CmdAdminSetSkill(Player player, string name, string Skill, int SkillLevel)
{ {