View Single Post
  #4  
Old 03-01-2009, 02:54 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
Quote:
Originally Posted by oo_jazz_oo View Post
This. And also, the error comes from clientr.m16on=1
You have no semicolin to end that line, so it reads as an error. But also fix what tsadmin said too.
Indeed.

Also, please style the script next time, so it's easier to read for others.

PHP Code:
//#CLIENTSIDE
if (weaponfired) {
  
this.attackpower 15;
  
clientr.m16on=1
  
if (this.m16on 1) {
    function 
onKeyPressedcodekey ) {
      if ( 
key == "f" ) {
        
setani dg_m16-fire,;
        
freezeplayer 0.1;
        
setshootparams bullet2;
        
shoot playerx,playery,playerz,getangle(vecx(playerdir),vecy(playerdir)),0,0,dg_bullet,dg_m16-fire;
        
setani dg_m16-fire,;
        
freezeplayer 0.1;
      }
    }
  }
  else if (
this.m16on == ) {
    
setani dg_punch,;
  }

The use of an event inside an event is not good either, and I don't see any use to check when the player presses D while the default system is enabled, as you're trying to use the key F..
__________________
Reply With Quote