Prawy

Untitled

Mar 4th, 2022
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None
  1. spawnPlayer()
  2. {
  3. self notify("spawned");
  4. self notify("end_respawn");
  5.  
  6. resettimeout();
  7.  
  8. self.sessionteam = self.pers["team"];
  9. self.sessionstate = "playing";
  10. self.spectatorclient = -1;
  11. self.archivetime = 0;
  12. self.friendlydamage = undefined;
  13.  
  14. spawnpointname = "mp_teamdeathmatch_spawn";
  15. if( self.pers["team"] == "allies" && level.hunterSpawns.size > 0 )
  16. spawnpointname = "mp_brax_hunter_spawn";
  17. else if( self.pers["team"] == "axis" && level.zombieSpawns.size > 0 )
  18. spawnpointname = "mp_brax_zombie_spawn";
  19.  
  20. spawnpoints = getentarray(spawnpointname, "classname");
  21. if( !spawnpoints.size )
  22. {
  23. spawnpointname = "mp_deathmatch_spawn";
  24. spawnpoints = getentarray(spawnpointname, "classname");
  25. }
  26. if( self.pers["team"] == "allies" )
  27. spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_NearTeam(spawnpoints);
  28. else
  29. spawnpoint = getZomSpawn( spawnpoints );
  30.  
  31. if(isDefined(spawnpoint))
  32. self spawn(spawnpoint.origin, spawnpoint.angles);
  33. else
  34. maps\mp\_utility::error("NO " + spawnpointname + " SPAWNPOINTS IN MAP");
  35.  
  36. // BraX
  37. /*
  38. if( level.map == "o'fuck" || level.map == "o'shit" )
  39. {
  40. trace = bulletTrace( self.origin + (0,0,20), self.origin - (0,0,2048), false, self );
  41. self setOrigin( trace["position"] );
  42. }
  43. */
  44. if( self getWeaponSlotWeapon("primary") == "none" && self getWeaponSlotWeapon("pistol") == "none" )
  45. self giveWeapon( self.pers["weapon"] );
  46.  
  47. self giveMaxAmmo(self.pers["weapon"]);
  48. self setSpawnWeapon(self.pers["weapon"]);
  49.  
  50. self thread maps\mp\gametypes\_zombie::spawnPlayer();
  51. if(self.pers["team"] == "allies")
  52. self setClientCvar("cg_objectiveText", "Hunt ^1Zombies^7 or be hunted!");
  53. else if(self.pers["team"] == "axis")
  54. self setClientCvar("cg_objectiveText", "Eat some human's brains!");
  55.  
  56. if(self.pers["team"] == "allies")
  57. {
  58. self.headicon = game["headicon_allies"];
  59. self.headiconteam = "allies";
  60. self.statusicon = "gfx/hud/hud@hunter.dds";
  61. }
  62. else
  63. {
  64. self.headicon = game["headicon_axis"];
  65. self.headiconteam = "axis";
  66. self.statusicon = "gfx/hud/hud@zombie.dds";
  67. }
  68. }
RAW Paste Data Copied