23.02.2017, 05:34
This command creates 10 arrows one after another in player facing angle. Try it in game and combine its code with your.
PHP код:
CMD:arrow(playerid, params[])
{
new Float:pX,Float:pY,Float:pZ, Float:a;
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid,pX,pY,pZ);
for(new i = 1; i < 10; i++) {
pX += floatmul(2, floatsin(-a, degrees));
pY += floatmul(2, floatcos(-a, degrees));
CreateObject(1318, pX, pY, pZ, 0, 90, 90-a);
}
return 1;
}