For shooting a projectile, before calling shoot you need to set the parameters that will be recieved when the projectile lands:
PHP Code:
setshootparams(param1, param2, etc);
shoot(x, y, z, angle, zangle, power, aniname, aniparam1, aniparam2, etc);
Practical example would be:
PHP Code:
setshootparams("clientside", player.account, damageamount);
shoot(player.x, player.y, player.z, getangle(vecx(player.dir),vecy(player.dir)), 0, 1, "aniname");
While on an advanced level there is the issue of the detection being serverside or clientside among other things such as abstracting all projectile landing occurrences into a single system, the simplest way to do this would be to have the following code within a weapon:
PHP Code:
//#CLIENTSIDE
function onActionProjectile(param1, param2, etc){
player.chat = "Im hit!";
}
Parameters being what was set before the projectile was shot via setshootparams.
I don't think Clientside onActionProjectile is either accurate or synced with the serverside version of the function however, on Classic I use custom detection on the onActionProjectile2(x, y, params) event which occurs whenever a projectile hits anything and not just your player.