Quote:
Originally Posted by oo_jazz_oo
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 onKeyPressed( code, key ) {
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 == 0 ) {
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..