Post: Spawning Solid Models and Turrets
07-10-2016, 04:52 PM #1
matrixmods
Pokemon Trainer
(adsbygoogle = window.adsbygoogle || []).push({});
    
void MakeSolid(int Entity) {
SV_UnlinkEntity(Entity);
*(unsigned char*)(Entity + 0x101) = 4;
int Num = G_Entity(0x3Cool Man (aka Tustin); //Just trying to make it work on Prison Break first
*(int*)(Entity + 0x140) = *(int*)(Num + 0x140);
SV_SetBrushModel(Entity);
*(int*)(Entity + 0x11C) |= *(int*)(Entity + 0x11C);
SV_LinkEntity(Entity);
}
int SpawnModel(float* Origin, float* Angles, const char* ModelName, bool Solid) {
int Entity = G_Spawn();
WriteFloat(Entity + 0x138, Origin, 3);
WriteFloat(Entity + 0x144, Angles, 3);
G_SetModel(Entity, ModelName);
SP_ScriptModel(Entity);
if(Solid) {
MakeSolid(Entity);
}
return Entity;
}
void SpawnCrate(int clientNum) {
float Origin[3], Angles[3];
GetPlayerOrigin(clientNum, Origin);
SpawnModel(Origin, Angles, "carepackage_friendly_iw6", true);
}
void SpawnTurret(int clientNum) {
float Origin[3], Angles[3];
GetPlayerOrigin(clientNum, Origin);
int Entity = G_Spawn();
WriteFloat(Entity + 0x138, Origin, 3);
WriteFloat(Entity + 0x144, Angles, 3);
G_SetModel(Entity, "npc_sentry_energy_turret_base");
G_SpawnTurret(Entity, "sentry_minigun_mp");
}


So the models spawn fine like a carepackage however they are not solid. And when i try to spawn a turret it kicks me out of the game and says there is no "tag_aim" so idk about that

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo