Advertisement
ScriptzMoDz

[SPRX] Solid Models Ghosts 1.15

Aug 29th, 2014
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. opd_s G_SetModel_t = { 0x28F95C, TOC };
  2. void(*G_SetModel)(int clientIndex, const char* Model) = (void(*)(int, const char*))&G_SetModel_t;
  3.  
  4. opd_s G_Spawn_t = { 0x290D68, TOC };
  5. int(* G_Spawn)() = (int(*)())&G_Spawn_t;
  6.  
  7. opd_s SV_UnlinkEntity_t = { 0x32C320, TOC };
  8. void(*SV_UnlinkEntity)(int Entity) = (void(*)(int))&SV_UnlinkEntity_t;
  9.  
  10. opd_s SV_LinkEntity_t = { 0x32C3A0, TOC };
  11. void(*SV_LinkEntity)(int Entity) = (void(*)(int))&SV_LinkEntity_t;
  12.  
  13. opd_s SP_Script_Model_t = { 0x286620, TOC };
  14. void(*SP_Script_Model)(int Entity) = (void(*)(int))&SP_Script_Model_t;
  15.  
  16.  
  17. int strCmp(char* a, char* b)
  18. {
  19. int diff;
  20. if(a[0] == 0x00 || b[0] == 0x00){return -1;}//Strings are NULL
  21. for(int i = 0;i<0x1024;i++)
  22. {
  23. if(a[i] == 0x00 || b[i] == 0x00){break;}//Reached end of str
  24. if(a[i] != b[i]){diff++;}
  25. }
  26. return diff;
  27. }
  28.  
  29. void MakeSolid(int Entity, const char* Map)
  30. {
  31. SV_UnlinkEntity(Entity);
  32. *(char*)(Entity + 0x101) = 4;
  33. int Brush = 0;
  34.  
  35. if(strCmp((char*)Map, "mp_prisonbreak") == 0){
  36. Brush = G_Entity(0x38);
  37. }
  38. else if(strCmp((char*)Map, "mp_dart") == 0){
  39. Brush = G_Entity(0x6B);
  40. }
  41. else if(strCmp((char*)Map, "mp_prisonbreak") == 0){
  42. Brush = G_Entity(0x38);
  43. }
  44. else if(strCmp((char*)Map, "mp_dart") == 0){
  45. Brush = G_Entity(0x6B);
  46. }
  47. else if(strCmp((char*)Map, "mp_lonestar") == 0){
  48. Brush = G_Entity(0x6A);
  49. }
  50. else if(strCmp((char*)Map, "mp_frag") == 0){
  51. Brush = G_Entity(0x55);
  52. }
  53. else if(strCmp((char*)Map, "mp_snow") == 0){
  54. Brush = G_Entity(0x56);
  55. }
  56. else if(strCmp((char*)Map, "mp_fahrenheit") == 0){
  57. Brush = G_Entity(0xA8);
  58. }
  59. else if(strCmp((char*)Map, "mp_hasima") == 0){
  60. Brush = G_Entity(0x63);
  61. }
  62. else if(strCmp((char*)Map, "mp_warhawk") == 0){
  63. Brush = G_Entity(0x45);
  64. }
  65. else if(strCmp((char*)Map, "mp_sovereign") == 0){
  66. Brush = G_Entity(0x72);
  67. }
  68. else if(strCmp((char*)Map, "mp_zebra") == 0){
  69. Brush = G_Entity(0x44);
  70. }
  71. else if(strCmp((char*)Map, "mp_skeleton") == 0){
  72. Brush = G_Entity(0x3A);
  73. }
  74. else if(strCmp((char*)Map, "mp_chasm") == 0){
  75. Brush = G_Entity(0x49);
  76. }
  77. else if(strCmp((char*)Map, "mp_flooded") == 0){
  78. Brush = G_Entity(0x57);
  79. }
  80. else if(strCmp((char*)Map, "mp_strikezone") == 0){
  81. Brush = G_Entity(0x57);
  82. }
  83. else Brush = NULL;
  84. *(int*)(Entity + 0x8C) = *(int*)(Brush + 0x8C);
  85. Or_Int32(Entity + 0x11C, Entity + 0x11C);
  86. SV_LinkEntity(Entity);
  87. }
  88.  
  89. int SpawnModel(const char* Map, const char* Model, float X, float Y, float Z, float Pitch, float Yaw, float Roll)
  90. {
  91. int Entity = *(int*)(G_Spawn());
  92. *(float*)(Entity + 0) = X;
  93. *(float*)(Entity + 4) = Y;
  94. *(float*)(Entity + 8) = Z;
  95. *(float*)(Entity + 12) = Pitch;
  96. *(float*)(Entity + 16) = Yaw;
  97. *(float*)(Entity + 20) = Roll;
  98. G_SetModel(Entity, Model);
  99. SP_Script_Model(Entity);
  100. MakeSolid(Entity, Map);
  101. return Entity;
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement