Advertisement
Guest User

Untitled

a guest
Oct 24th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // visual attachment stuff (currently crashes)
  2.  
  3.  
  4. void() body_think =
  5. {
  6.  
  7. self.think = self.frame = self.parent.frame; // bodies frame is "parents" frame
  8.  
  9. self.nextthink = time + 0.1; // think every 0.1 ticks
  10.  
  11. };
  12.  
  13. void() body =
  14.  
  15. {
  16.  
  17. self.pbody = spawn (); // spawn the body
  18. self.pbody.parent = self ; // the bodies owner is the player
  19.  
  20.  
  21.  
  22. setmodel (self.pbody, "progs/body.mdl"); // he will get the player body model
  23. setattachment (self.pbody, self.pbody.parent, ""); // attach the body model to "parent"
  24.  
  25. self.pbody.think = body_think; // make the body think
  26. self.pbody.nextthink = time + 0.1; // it thinks every 0.1 ticks
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement