Very simple plugin purely based on what you said.
Will gag on death, ungag on spawn.
Does not take gagged people (by other plugins/admins) into account with gagging/ungagging.
PHP Code:
#include <sourcemod>
public OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath);
HookEvent("player_spawn", OnPlayerSpawn);
}
public Action:OnPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
int userid;
userid = GetEventInt(event, "userid");
int client;
client = GetClientOfUserId(userid);
ServerCommand("sm_gag %i", client);
}
public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
int userid;
userid = GetEventInt(event, "userid");
int client;
client = GetClientOfUserId(userid);
ServerCommand("sm_ungag %i", client);
}
__________________
No longer taking requests due to lack of time and interrest.
Only helping out with minor things through forum.