Thank you for your replay,
I ended up using left4dhooks
PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <left4dhooks>
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart()
{
RegConsoleCmd("sm_boomer", Command_Boomer, "Spawn as a boomer ghost");
}
public Action Command_Boomer(int client, int args)
{
if (GetClientTeam(client) == 3 && !IsPlayerAlive(client))
{
L4D_State_Transition(client, STATE_GHOST);
L4D_SetClass(client, 2); //2 = Boomer
}
else PrintToChat(client, "only dead infected can use this command");
}
__________________