Hey guys, i've got some problems with creating entity with CreateEntityByName, for example, i'm trying to create an "env_fog_controller" but it doesnt work, here is the code:
PHP Code:
public Action:Cmd_Cre(client, args)
{
new Particle = CreateEntityByName("env_fog_controller");
if(IsValidEntity(Particle))
{
DispatchKeyValue(Particle, "fogstart", "1.0");
DispatchKeyValue(Particle, "fogend", "5000.0");
DispatchKeyValue(Particle, "fogcolor", "172 185 194");
DispatchSpawn(Particle);
ActivateEntity(Particle);
}
}