UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Weapon Disposal Script

broken avatar :(
Created 11 years ago
by MJPWGaming
0 Members and 1 Guest are viewing this topic.
1,658 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Hi I am looking for a script that would replicate the weapon disposal machine from carrier.

All I need it to do is you walk up to the trigger and you get a indicator to trade your weapon, or some sort of text, and you hold use and you get your current weapon that you have out taken and you're given a certain amount of points.
Marked as best answer by MJPWGaming 11 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Hi I am looking for a script that would replicate the weapon disposal machine from carrier.

All I need it to do is you walk up to the trigger and you get a indicator to trade your weapon, or some sort of text, and you hold use and you get your current weapon that you have out taken and you're given a certain amount of points.

If I am understanding you correctly, that should be a really simple script. Try something like:

Code Snippet
Plaintext
Dispose(){
//thread Dispose();
trig = getentarray("dispose","targetname");
for(i=0;i<trig.size;i++){
trig[i] thread DisposeMe();
}
}
DisposeMe(){
self SetHintString("Press &&1 to dispose of weapon");
self SetCursorHint("HINT_NOICON");
while(1){
self waittill("trigger",player);
sell_weapon = player GetCurrentWeapon();
if(IsDefined( player.revivetrigger ) || WeaponClass( sell_weapon ) == "grenade" || IsSubStr(sell_weapon,"bottle")) continue;
weapons = player GetWeaponsListPrimaries();
if(weapons.size>1){
points = maps\_zombiemode_weapons::get_weapon_cost( sell_weapon );
if(!isdefined(points)) points = 500;
player TakeWeapon(sell_weapon);
player SwitchToWeapon(player GetWeaponsListPrimaries()[0]);
player maps\_zombiemode_score::add_to_player_score( points );
}else{
player iprintlnbold("You can not dispose of your last weapon");
}
wait(.1);
}
}
Last Edit: July 06, 2015, 12:34:21 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
If I am understanding you correctly, that should be a really simple script. Try something like:

Code Snippet
Plaintext
Dispose(){
//thread Dispose();
trig = getentarray("dispose","targetname");
for(i=0;i<trig.size;i++){
trig[i] thread DisposeMe();
}
}
DisposeMe(){
self SetHintString("Press &&1 to dispose of weapon");
self SetCursorHint("HINT_NOICON");
while(1){
self waittill("trigger",player);
sell_weapon = player GetCurrentWeapon();
if(IsDefined( player.revivetrigger ) || WeaponClass( sell_weapon ) == "grenade" || IsSubStr(sell_weapon,"bottle")) continue;
weapons = player GetWeaponsListPrimaries();
if(weapons.size>1){
points = maps\_zombiemode_weapons::get_weapon_cost( sell_weapon );
if(!isdefined(points)) points = 500;
player TakeWeapon(sell_weapon);
player SwitchToWeapon(player GetWeaponsListPrimaries()[0]);
player maps\_zombiemode_score::add_to_player_score( points );
}else{
player iprintlnbold("You can not dispose of your last weapon");
}
wait(.1);
}
}

Works! Thanks!

 
Loading ...