S_hift
Veteran XX
any chance of using "GetItemCount" instead of "GetMountedItem"
Code:
editActionMap("playMap.sae");
bindCommand(keyboard0, make, "space", TO, "z0ddzoomsnipe::doSnipe();");
bindCommand(keyboard0, break, "space", TO, "z0ddzoomsnipe::unDoSnipe();");
$z0ddzoomsnipe::switchBackToWpn = 0;
$z0ddzoomsnipe::autoCrouch = 0;
$z0ddzoomsnipe::crouchWithoutRifle = 1;
$z0ddzoomsnipe::alwaysZoom = 1;
function z0ddzoomsnipe::getCurrentWpn()
{
%wpn = getMountedItem(0);
if (%wpn == 21)
return "Disc Launcher";
else if (%wpn == 11)
return "Blaster";
else if (%wpn == 13)
return "Chaingun";
else if (%wpn == 15)
return "Plasma Gun";
else if (%wpn == 17)
return "Grenade Launcher";
else if (%wpn == 24)
return "ELF Gun";
else if (%wpn == 23)
return "Targeting Laser";
else
return "";
}
function z0ddzoomsnipe::doSnipe()
{
if(getItemCount("Grenade Launcher")) {
$z0ddzoomsnipe::ownsLR = 1;
if($z0ddzoomsnipe::autoCrouch)
postAction(2048, IDACTION_CROUCH, 1);
if($z0ddzoomsnipe::switchBackToWpn)
$z0ddzoomsnipe::prevWpn = z0ddzoomsnipe::getCurrentWpn();
use("Grenade Launcher");
postAction(2048, IDACTION_SNIPER_FOV, 1.000000);
}