Author Topic: carried away  (Read 735 times)

i was wondering if it was possible that u could make a script that if u hit someone with a weapon(for example a sword) u lift them up and carry them on your back or something if it is possible anyone willing to script it?

Look at my terrorist mod.

or that old [AT] mounter wand

Code: [Select]
function serverCmdKidnap(%client){
if(%client.isAdmin || %client.isSuperAdmin){
%start = %client.player.getEyePoint();
%end = vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 5), %start);
%hostage = ContainerRayCast(%start, %end, $TypeMasks::playerObjectType);
if(%hostage && !%client.hostage){
%client.hostage = %hostage;
%client.player.mountObject(%hostage, $backSlot);
%hostage.canDismount = 0;
%hostage.isKidnapped = 1;
} else if(isObject(%client.hostage)){
%hostage = %client.hostage;
%client.player.unMountObject(%hostage);
%hostage.canDismount = 1;
%hostage.isKidnapped = 0;
%client.hostage = 0;
}
}
}