Post: [HELP] Weapons Wheel ported from zm to mp
03-09-2017, 11:47 PM #1
Xx-GIPPI-xX
Modding Passion
(adsbygoogle = window.adsbygoogle || []).push({}); I all NGU people
i have a trouble with this script!!!!!

Every time that inject on BO2 freeze opr not* show the weapons if inject correctly i not know where script is bad
If anyone have advice .........i appreciate iit

    pickRealWeapon() 
{
self endon("disconnect");


self exitMenu();
self freezeControls(true);
self iPrintln("Press [{+speed_throw}]/[{+attack}] To Scroll");
self iPrintln("Press [{+reload}] To Select");
self iPrintln("Press [{+melee}] To Exit");
id = random(level.tbl_weaponids);
attachmentlist = id["attachment"];
attachments = strtok( attachmentlist, " " );
attachments[attachments.size] = "";
attachment = random(attachments);
basePoint = (self.origin);
randy = (id + attachment);
self setStance("stand");
self setPlayerAngles((0, 180, 0));
tehAngle = self.angles+(0, 90, 0);
weapon = [];
weapon[0] = spawnSM(basePoint+(0, 0, 75), getWeaponModel(randy[0]), tehAngle);
weapon[1] = spawnSM(basePoint+(0, 0, 60), getWeaponModel(randy[1]), tehAngle);
weapon[2] = spawnSM(basePoint+(0, 0, 40), getWeaponModel(randy[2]), tehAngle);
weapon[0] moveX(-70, 1, 1);
weapon[1] moveX(-70, 1, 1);
weapon[2] moveX(-70, 1, 1);
currentWeapon = [];
currentWeapon[0] = randy[0];
currentWeapon[1] = randy[1];
currentWeapon[2] = randy[2];
wait 1;
for(;Winky Winky
{
if(self adsButtonPressed())
{
for(m = 0; m < weapon.size; m++)
weapon[m] hide();
thread createTempWeapon(weapon[0].origin, weapon[0].origin+(-50, 0, 0), weapon[0].model, tehAngle, .5, .25, .25);
thread createTempWeapon(weapon[1].origin, weapon[1].origin+(0, 0, 15), weapon[1].model, tehAngle, .5, .25, .25);
thread createTempWeapon(weapon[2].origin, weapon[2].origin+(0, 0, 20), weapon[2].model, tehAngle, .5, .25, .25);
for(;Winky Winky
{
newWeapon = (id + attachment);
if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2])
break;
wait .05;
}
thread createTempWeapon(basePoint+(-70, 0, -5), basePoint+(-70, 0, 40), getWeaponModel(newWeapon), tehAngle, .5, .25, .25);
weapon[0] setModel(weapon[1].model);
weapon[1] setModel(weapon[2].model);
weapon[2] setModel(getWeaponModel(newWeapon));
currentWeapon[0] = currentWeapon[1];
currentWeapon[1] = currentWeapon[2];
currentWeapon[2] = newWeapon;
wait .5;
for(m = 0; m < weapon.size; m++)
weapon[m] show();
}
if(self attackButtonPressed())
{
for(m = 0; m < weapon.size; m++)
weapon[m] hide();
thread createTempWeapon(weapon[0].origin, weapon[0].origin+(0, 0, -15), weapon[0].model, tehAngle, .5, .25, .25);
thread createTempWeapon(weapon[1].origin, weapon[1].origin+(0, 0, -20), weapon[1].model, tehAngle, .5, .25, .25);
thread createTempWeapon(weapon[2].origin, weapon[2].origin+(-50, 0, 0), weapon[2].model, tehAngle, .5, .25, .25);
for(;Winky Winky
{
newWeapon = (id + attachment);
if(newWeapon != currentWeapon[0] && newWeapon != currentWeapon[1] && newWeapon != currentWeapon[2])
break;
wait .05;
}
thread createTempWeapon(basePoint+(-70, 0, 105), basePoint+(-70, 0, 75), getWeaponModel(newWeapon), tehAngle, .5, .25, .25);
weapon[2] setModel(weapon[1].model);
weapon[1] setModel(weapon[0].model);
weapon[0] setModel(getWeaponModel(newWeapon));
currentWeapon[2] = currentWeapon[1];
currentWeapon[1] = currentWeapon[0];
currentWeapon[0] = newWeapon;
wait .5;
for(m = 0; m < weapon.size; m++)
weapon[m] show();
}
if(self useButtonPressed())
{

weapon[1] moveX(60, 1, 1);
wait 1;
for(m = 0; m < weapon.size; m++)
weapon[m] delete();
sWeapon = currentWeapon[1];
self giveTheWeapon(sWeapon);
break;
}
if(self meleeButtonPressed())
{
weapon[0] moveTo(weapon[0].origin+(0,0,-70), .5, .25, .25);
weapon[1] moveTo(weapon[1].origin+(0,0,-70), .5, .25, .25);
weapon[2] moveTo(weapon[2].origin+(0,0,-70), .5, .25, .25);
wait .5;
for(m = 0; m < weapon.size; m++)
weapon[m] delete();
break;
}
wait .01;
}

self freezeControls(false);

}

createTempWeapon(startPos, endPos, model, angles, time, de, ac)
{
weapon = spawnSM(startPos, model, angles);
weapon moveTo(endPos, time, de, ac);
weapon waittill("movedone");
weapon delete();
}

spawnSM(origin, model, angles)
{

ent = spawn("script_model", origin);
ent setModel(model);
if(isDefined(angles))
ent.angles = angles;
return ent;
}

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo