Somehow, the addon works, but it in the console it says Unknown Command: AddVelocity. Here is the Function code:
function TumbleWandImage::onFire(%this, %obj, %slot)
{
if(!isObject(%obj.client))
return;
%start = %obj.getEyePoint();
%end = vectorScale(%obj.getEyeVector(), %this.projectile.range);
%rayCast = containerRayCast(%start, vectorAdd(%start, %end), %this.projectile.mask, %obj);
%target = firstWord(%rayCast);
if(!isObject(%target))
{
return;
}
%client = %obj.client;
%pos = posFromRaycast(%raycast);
%projectile = new projectile()
{
dataBlock = %this.projectile;
initialVelocity = %obj.getEyeVector();
initialPosition = %pos;
sourceObject = %obj;
sourceSlot = %slot;
client = %client;
};
missionCleanup.add(%projectile);
%class = %target.getClassName();
if(%class $= "AiPlayer" ||%class $= "Player" && (%obj.client.isAdmin))
%target.client.addvelocity("0 0 400");
schedule(100, 0, tumble, %target.client, 0.1);
}
Fixed. And is working.