Fix target -> player

This commit is contained in:
VegaZ
2018-09-24 20:38:46 +02:00
parent 98303100fe
commit fbfbd6cf47

View File

@@ -250,7 +250,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
@@ -284,7 +284,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
@@ -310,7 +310,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
@@ -336,7 +336,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
@@ -387,7 +387,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
if (target == player) if (target == player)
@@ -415,7 +415,7 @@ namespace reallife_gamemode.Server.Commands
Client target = ClientService.GetClientByName(name); Client target = ClientService.GetClientByName(name);
if (target == null) if (target == null)
{ {
ChatService.PlayerNotFound(target); ChatService.PlayerNotFound(player);
return; return;
} }
player.RemoveAllWeapons(); player.RemoveAllWeapons();
@@ -487,7 +487,11 @@ namespace reallife_gamemode.Server.Commands
NAPI.Chat.SendChatMessageToAll("Serverzeit auf " + hour + ":" + min + ":" + sec + " gestellt"); NAPI.Chat.SendChatMessageToAll("Serverzeit auf " + hour + ":" + min + ":" + sec + " gestellt");
} }
[Command("val")]
public void Val(Client player)
{
NAPI.Chat.SendChatMessageToAll("Value of " + player.Name + ": " + player.Handle.Value);
}
[Command("rgiveweapon", "~m~Benutzung: ~s~/rgiveweapon [Radius] [Waffe] [Munition]")] [Command("rgiveweapon", "~m~Benutzung: ~s~/rgiveweapon [Radius] [Waffe] [Munition]")]
public void CmdAdminRangeGiveWeapon(Client player, float radius, string weapon, int munition) public void CmdAdminRangeGiveWeapon(Client player, float radius, string weapon, int munition)
{ {