PHP Code:
if(key = "d"){
setshootparams("callihelimissle", player.account);
shoot(this.plane_x + vecx(this.plane_dir), this.plane_y + vecy(this.plane_dir), playerz, (this.plane_dir+1) * pi / 2 + random( 0,0), NULL, NULL, "callihelimissle", 2);
}
function onActionProjectile()
{
player.hearts-=0.5;
setAni("hurt",NULL);
}
becomes
PHP Code:
if(key == "d"){
setshootparams("callihelimissle", player.account);
shoot(this.plane_x + vecx(this.plane_dir), this.plane_y + vecy(this.plane_dir), player.z, (this.plane_dir+1) * pi / 2 + random( 0,0), NULL, NULL, "callihelimissle", 2);
}
You should learn to script rather than just taking other peoples' code without understanding it.