opd_s G_SetModel_t = { 0x28F95C, TOC };
void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;
opd_s G_Spawn_t = { 0x290D68, TOC };
int(* G_Spawn)() = (int(*)())&G_Spawn_t;
opd_s SV_UnlinkEntity_t = { 0x32C320, TOC };
void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;
opd_s SV_LinkEntity_t = { 0x32C3A0, TOC };
void(*SV_LinkEntity)(int Entity) = (void(*)(int))&SV_LinkEntity_t;
opd_s SP_Script_Model_t = { 0x286620, TOC };
void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;
int strCmp(char* a, char* b)
{
int diff;
if(a[0] == 0x00 || b[0] == 0x00){return -1;}//Strings are NULL
for(int i = 0;i<0x1024;i++)
{
if(a[i] == 0x00 || b[i] == 0x00){break;}//Reached end of str
if(a[i] != b[i]){diff++;}
}
return diff;
}
void MakeSolid(int Entity, const char* Map)
{
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
int Brush = 0;
if(strCmp((char*)Map, "mp_prisonbreak") == 0){
Brush = G_Entity(0x3;
}
else if(strCmp((char*)Map, "mp_dart") == 0){
Brush = G_Entity(0x6B);
}
else if(strCmp((char*)Map, "mp_prisonbreak") == 0){
Brush = G_Entity(0x3;
}
else if(strCmp((char*)Map, "mp_dart") == 0){
Brush = G_Entity(0x6B);
}
else if(strCmp((char*)Map, "mp_lonestar") == 0){
Brush = G_Entity(0x6A);
}
else if(strCmp((char*)Map, "mp_frag") == 0){
Brush = G_Entity(0x55);
}
else if(strCmp((char*)Map, "mp_snow") == 0){
Brush = G_Entity(0x56);
}
else if(strCmp((char*)Map, "mp_fahrenheit") == 0){
Brush = G_Entity(0xA;
}
else if(strCmp((char*)Map, "mp_hasima") == 0){
Brush = G_Entity(0x63);
}
else if(strCmp((char*)Map, "mp_warhawk") == 0){
Brush = G_Entity(0x45);
}
else if(strCmp((char*)Map, "mp_sovereign") == 0){
Brush = G_Entity(0x72);
}
else if(strCmp((char*)Map, "mp_zebra") == 0){
Brush = G_Entity(0x44);
}
else if(strCmp((char*)Map, "mp_skeleton") == 0){
Brush = G_Entity(0x3A);
}
else if(strCmp((char*)Map, "mp_chasm") == 0){
Brush = G_Entity(0x49);
}
else if(strCmp((char*)Map, "mp_flooded") == 0){
Brush = G_Entity(0x57);
}
else if(strCmp((char*)Map, "mp_strikezone") == 0){
Brush = G_Entity(0x57);
}
else Brush = NULL;
*(int*)(Entity + 0x8C) = *(int*)(Brush + 0x8C);
Or_Int32(Entity + 0x11C, Entity + 0x11C);
SV_LinkEntity(Entity);
}
int SpawnModel(const char* Map, const char* Model, float X, float Y, float Z, float Pitch, float Yaw, float Roll)
{
int Entity = *(int*)(G_Spawn());
*(float*)(Entity + 0) = X;
*(float*)(Entity + 4) = Y;
*(float*)(Entity + = Z;
*(float*)(Entity + 12) = Pitch;
*(float*)(Entity + 16) = Yaw;
*(float*)(Entity + 20) = Roll;
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
MakeSolid(Entity, Map);
return Entity;
}
opd_s G_SetModel_t = { 0x28F95C, TOC };
void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;
opd_s G_Spawn_t = { 0x290D68, TOC };
int(* G_Spawn)() = (int(*)())&G_Spawn_t;
opd_s SV_UnlinkEntity_t = { 0x32C320, TOC };
void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;
opd_s SV_LinkEntity_t = { 0x32C3A0, TOC };
void(*SV_LinkEntity)(int Entity) = (void(*)(int))&SV_LinkEntity_t;
opd_s SP_Script_Model_t = { 0x286620, TOC };
void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;
int strCmp(char* a, char* b)
{
int diff;
if(a[0] == 0x00 || b[0] == 0x00){return -1;}//Strings are NULL
for(int i = 0;i<0x1024;i++)
{
if(a[i] == 0x00 || b[i] == 0x00){break;}//Reached end of str
if(a[i] != b[i]){diff++;}
}
return diff;
}
void MakeSolid(int Entity, const char* Map)
{
SV_UnlinkEntity(Entity);
*(char*)(Entity + 0x101) = 4;
int Brush = 0;
if(strCmp((char*)Map, "mp_prisonbreak") == 0){
Brush = G_Entity(0x3;
}
else if(strCmp((char*)Map, "mp_dart") == 0){
Brush = G_Entity(0x6B);
}
else if(strCmp((char*)Map, "mp_prisonbreak") == 0){
Brush = G_Entity(0x3;
}
else if(strCmp((char*)Map, "mp_dart") == 0){
Brush = G_Entity(0x6B);
}
else if(strCmp((char*)Map, "mp_lonestar") == 0){
Brush = G_Entity(0x6A);
}
else if(strCmp((char*)Map, "mp_frag") == 0){
Brush = G_Entity(0x55);
}
else if(strCmp((char*)Map, "mp_snow") == 0){
Brush = G_Entity(0x56);
}
else if(strCmp((char*)Map, "mp_fahrenheit") == 0){
Brush = G_Entity(0xA;
}
else if(strCmp((char*)Map, "mp_hasima") == 0){
Brush = G_Entity(0x63);
}
else if(strCmp((char*)Map, "mp_warhawk") == 0){
Brush = G_Entity(0x45);
}
else if(strCmp((char*)Map, "mp_sovereign") == 0){
Brush = G_Entity(0x72);
}
else if(strCmp((char*)Map, "mp_zebra") == 0){
Brush = G_Entity(0x44);
}
else if(strCmp((char*)Map, "mp_skeleton") == 0){
Brush = G_Entity(0x3A);
}
else if(strCmp((char*)Map, "mp_chasm") == 0){
Brush = G_Entity(0x49);
}
else if(strCmp((char*)Map, "mp_flooded") == 0){
Brush = G_Entity(0x57);
}
else if(strCmp((char*)Map, "mp_strikezone") == 0){
Brush = G_Entity(0x57);
}
else Brush = NULL;
*(int*)(Entity + 0x8C) = *(int*)(Brush + 0x8C);
Or_Int32(Entity + 0x11C, Entity + 0x11C);
SV_LinkEntity(Entity);
}
int SpawnModel(const char* Map, const char* Model, float X, float Y, float Z, float Pitch, float Yaw, float Roll)
{
int Entity = *(int*)(G_Spawn());
*(float*)(Entity + 0) = X;
*(float*)(Entity + 4) = Y;
*(float*)(Entity + = Z;
*(float*)(Entity + 12) = Pitch;
*(float*)(Entity + 16) = Yaw;
*(float*)(Entity + 20) = Roll;
G_SetModel(Entity, Model);
SP_Script_Model(Entity);
MakeSolid(Entity, Map);
return Entity;
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.