so this?
PHP Code:
function getCoordinates(xOffset, yOffset) {
if (playerdir==0)
{
this.x=player.x+0.5;
this.y=player.y-yOffset;
}
elseif (playerdir==1)
{
this.x=playerx-xOffset;
this.y=player.y+0.5;
}
elseif (playerdir==2)
{
this.x=player.x+0.5;
this.y=player.y+yOffset;
}
elseif (playerdir==3)
{
this.x=player.x+xOffset;
this.y=player.y+0.5;
}
}
function onWeaponFired()
{
setani("lift", Null);
getCoordinates(7, 7)
putexplosion2(1,2,this.x,this.y);
freezeplayer(0.5);
player.chat = "Kaboom!";
}
you put xOffset in this.y at playerdir == 3 tho :P, but everyone makes error specialy me.