vec3 Origin = entityArray[0].r.currentOrigin;
entNum* spawnedEnt = Main::Call<entNum*>(spawn, (constStr*)"script_model", Origin);
printf("Spawned Entity: %i\n", (int)spawnedEnt);
Object::Call<null*>(setmodel, (int)spawnedEnt, CT_ENTITY, "test_sphere_silver");
Object::Call<null*>(solid, (int)spawnedEnt, CT_ENTITY);
Object::Call<null*>(moveto, (int)spawnedEnt, CT_ENTITY, Origin+vec3(0, 0, 40), 5.00);
vec3 Origin = entityArray[0].r.currentOrigin;
entNum* spawnedEnt = Main::Call<entNum*>(spawn, (constStr*)"script_model", Origin);
printf("Spawned Entity: %i\n", (int)spawnedEnt);
Object::Call<null*>(setmodel, (int)spawnedEnt, CT_ENTITY, "test_sphere_silver");
Object::Call<null*>(solid, (int)spawnedEnt, CT_ENTITY);
Object::Call<null*>(moveto, (int)spawnedEnt, CT_ENTITY, Origin+vec3(0, 0, 40), 5.00);
int SpawnEntity( float* Origin, float* Angles, const char* Model = "com_plasticcase_friendly", int Index = 2)
{
int Entity = (int)G_Spawn();
*(float*)(Entity + 0x138, Origin, 3);
*(float*)(Entity + 0x144, Angles, 3);
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
*(int*)(Entity + 0x8C) = Index;
SV_SetBrushModel(Entity);
SV_linkEntity(Entity);
return Entity;
}
int SpawnEntity( float* Origin, float* Angles, const char* Model = "com_plasticcase_friendly", int Index = 2)
{
int Entity = (int)G_Spawn();
*(float*)(Entity + 0x138, Origin, 3);
*(float*)(Entity + 0x144, Angles, 3);
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
*(int*)(Entity + 0x8C) = Index;
SV_SetBrushModel(Entity);
SV_linkEntity(Entity);
return Entity;
}
Copyright © 2025, NextGenUpdate.
All Rights Reserved.