Thread: Shoots
View Single Post
  #2  
Old 02-11-2009, 04:25 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
// Will shoot a projectile in the direction of the player
//#CLIENTSIDE
function onCreated() {
  
temp.startx = player.x+vecx(player.dir);
  
temp.starty = player.y+vecy(player.dir);
  
temp.startz = player.z;
  
temp.angle = getangle(vecx(player.dir), vecy(player.dir));
  
temp.zangle = 0;
  
temp.power  = 0;
  
temp.ani = "arrow"; // projectile ani
  
temp.aniparam0 = 0;
  
temp.aniparam1 = 0;
  
// etc
  
shoot(temp.startx, temp.starty, temp.startz, temp.angle, temp.zangle, temp.power, temp.ani, temp.aniparam0, temp.aniparam1); // etc with the aniparams
} 
__________________
Reply With Quote