03-02-2013, 11:17
question here is whether to work this code?
private void CreateTurret(Vector3 location, Vector3 angles)
{
Entity turret = Call<Entity>("spawn", "script_model");
turret.SetField("angles", new Parameter(angles));
if (angles.Equals(null))
angles = new Vector3(0f, 90f, 0f);
turret = Call<Entity>("spawnTurret", "misc_turret", new Parameter(location), "pavelow_minigun_mp");
turret.Call("setmodel", "weapon_minigun");
turret.SetField("angles", angles);
}
private void CreateTurret(Vector3 location, Vector3 angles)
{
Entity turret = Call<Entity>("spawn", "script_model");
turret.SetField("angles", new Parameter(angles));
if (angles.Equals(null))
angles = new Vector3(0f, 90f, 0f);
turret = Call<Entity>("spawnTurret", "misc_turret", new Parameter(location), "pavelow_minigun_mp");
turret.Call("setmodel", "weapon_minigun");
turret.SetField("angles", angles);
}