 |
|
Veteran Member
Join Date: Jun 2018
Location: Romania
|

08-29-2018
, 15:07
Re: Block team move while alive
|
#3
|
Quote:
Originally Posted by dustinandband
What Game is it? Does this work?
PHP Code:
#include <sourcemod>
public Plugin:myinfo =
{
name = "block team change",
author = "dustin",
description = "blocks team change command when players are alive",
version = "1.0",
url = "",
};
public OnPluginStart()
{
AddCommandListener(CommandJoinTeam, "jointeam");
}
public Action CommandJoinTeam(client, const char[] command, args)
{
if (IsPlayerAlive(client))
{
ReplyToCommand(client, "You Can't Use this command while alive.")
return Plugin_Handled;
}
return Plugin_Continue;
}
|
You should check first if the client != 0 and if the client is in game.
|
|
|
|