Skip to content

Instantly share code, notes, and snippets.

@aurorapar
Created October 2, 2025 01:06
Show Gist options
  • Save aurorapar/eafb4fdbe0d893de7a3d9a37dbe0f5cc to your computer and use it in GitHub Desktop.
Save aurorapar/eafb4fdbe0d893de7a3d9a37dbe0f5cc to your computer and use it in GitHub Desktop.
public static void SpawnSomething(CCSPlayerController player)
{
var playerStats = PlayerStats.GetPlayerStats(player);
var locationV3 = Dndcs2.GetViewLocation(player);
var location = new Vector(locationV3.X, locationV3.Y, locationV3.Z);
playerStats.DragonbornInferno = location;
if (location == null)
return;
//var location = new Vector(target.PlayerPawn.Value.AbsOrigin.X, target.PlayerPawn.Value.AbsOrigin.Y, target.PlayerPawn.Value.AbsOrigin.Z);
var grenade = Dndcs2.SpawnMolotovGrenade(location, new QAngle(0,0,0), new Vector(0,0,0), player.Team);
grenade.DetonateTime = 0;
grenade.Thrower.Raw = player.PlayerPawn.Raw;
Server.NextFrame( () =>
{
var infernoLocations = Utilities.GetPlayers()
.Where(p =>
CommonMethods.RetrievePlayer(p).DndSpecieId == (int)constants.DndSpecie.Dragonborn
&& PlayerStats.GetPlayerStats(p).DragonbornInferno != null)
.Select(p => PlayerStats.GetPlayerStats(p).DragonbornInferno).ToList();
var infernos = Utilities.GetAllEntities()
.Where(e => e.DesignerName == "inferno");
if (!infernos.Any())
{
BroadcastMessage("No infernos found");
return;
}
foreach (var i in infernos)
{
var inferno = Utilities.GetEntityFromIndex<CInferno>((int)i.Index);
if (inferno == null)
{
BroadcastMessage("No inferno found");
continue;
}
infernoLocations.ForEach(l =>
{
if (!(Vector3.Distance((Vector3)inferno.AbsOrigin, (Vector3)location) > 1))
return;
BroadcastMessage("Found the inferno");
Server.NextFrame(() => { inferno.Remove(); });
});
}
BroadcastMessage("Done processing next frame");
});
}
@Annabel369
Copy link

Special Thanks to AuroraPar
I’d like to extend my heartfelt thanks to the developer AuroraPar for her valuable contribution to the module. Her code served as a solid foundation for enhancing the inferno visualization and control system within the server, allowing for greater precision and flexibility.
The clarity of her structure, the efficiency of her logic, and the attention to performance reflect a high level of technical skill. This collaboration was instrumental in making the project more robust and accessible to the community.
Thank you, AuroraPar, for sharing your talent and strengthening open development with generosity and professionalism!

https://github.com/Annabel369/DragonbornRPG/tree/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment