Hello guys,
I have been trying to spawn dead infected into the spawnable ghost form, but with no luck
tried to manipulate with these EntProps but still:
PHP Code:
//SetEntProp(client, Prop_Send, "m_isGhost", 1);
//SetEntProp(client, Prop_Send, "m_lifeState", 1);
//SetEntProp(client, Prop_Send, "m_ghostSpawnState", 0);
This is the script
PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#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))
{
int CmdFlags = GetCommandFlags("z_spawn_old");
SetCommandFlags("z_spawn_old", CmdFlags & ~FCVAR_CHEAT);
FakeClientCommand(client, "z_spawn_old boomer auto");
}
else PrintToChat(client, "only dead infected can use this command");
}
__________________