diff --git a/plugin/setteam.smx b/plugin/setteam.smx index 6f8bf4e..b92da9d 100644 Binary files a/plugin/setteam.smx and b/plugin/setteam.smx differ diff --git a/plugin/setteam.sp b/plugin/setteam.sp index 04ba900..2d48c33 100644 --- a/plugin/setteam.sp +++ b/plugin/setteam.sp @@ -13,6 +13,8 @@ public Plugin:myinfo = { KeyValues force_team; public OnPluginStart() { + LoadTranslations("common.phrases"); + RegServerCmd("sm_setteam", SetTeam, "Set a players team"); RegServerCmd("sm_forceteam", ForceExec, "Set a players team and keep them there"); @@ -75,7 +77,19 @@ public Action:SetTeam(args) { return Plugin_Handled; } - int client = FindTarget(0, player, false, true); + int client = StringToInt(player); + + if (client <= 0) { + client = FindTarget(0, player, false, true); + } else { + client -= 1; // status starts client ids with + } + + if (client <= 0) { + PrintToServer("Player '%s' not found", player); + + return Plugin_Handled; + } set_force(client, 0); ChangeClientTeam(client, team);