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

cant take player weapon

broken avatar :(
Created 10 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
3,164 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 1 day ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
hi

For some reason after the player is revived the game give him the hell retriever(when he dont have it) and i cant take it away. i try adding a script that hitman give me everywhere but it doesnt work.

Quote
_harrybo21_utilities.gsc
Code Snippet
Plaintext
harrybo21_return_loadout( stuff, ignore_perks )
{
self takeAllWeapons();

for ( i = 0; i < stuff.perk_inventory.size; i++ )
{
skip = false;
if ( isDefined( ignore_perks ) && ignore_perks.size > 0 )
{
for ( p = 0; p < ignore_perks.size; p++ )
{
if ( stuff.perk_inventory[ i ] == ignore_perks[ p ] )
{
skip = true;
break;
}
}
}
if ( skip )
continue;

self thread maps\_zombiemode_perks::harrybo21_perks_give_perk( stuff.perk_inventory[ i ] );
}
self.inventory = stuff.inventory;
weapon_max = self.inventory.size;
if ( !self hasPerk( "specialty_extraammo" ) )
weapon_max = 2;

for ( i = 0; i < weapon_max; i++ )
{
if ( stuff.inventory[ i ] != "none" )
{
self giveWeapon( stuff.inventory[ i ] );
self setWeaponAmmoClip( stuff.inventory[ i ], stuff.weap_ammo[ self.inventory[ i ] ][ "clip" ] );
self setWeaponAmmoStock( stuff.inventory[ i ], stuff.weap_ammo[ self.inventory[ i ] ][ "stock" ] );
}
}
for ( i = 0; i < 4; i++ )
{
if ( isDefined( stuff.action_inventory[ i ] ) && stuff.action_inventory[ i ] != "none" )
{
self maps\_harrybo21_utilities::harrybo21_give_gun( stuff.action_inventory[ i ] );
}
}
self.lastActiveWeapon = stuff.lastActiveWeapon;
if ( !self hasWeapon( self.lastActiveWeapon ) )
self.lastActiveWeapon = self.inventory[ 0 ];

self switchToWeapon( self.lastActiveWeapon );

/* if ( isDefined( stuff.grenade ) )
self harrybo21_set_grenade( stuff.grenade, stuff.weap_ammo[ stuff.grenade ][ "clip" ] );
else
self harrybo21_set_grenade( "fraggrenade", 0 );

if ( isDefined( stuff.alt_grenade ) )
self harrybo21_set_alt_grenade( stuff.alt_grenade, stuff.weap_ammo[ stuff.alt_grenade ][ "clip" ] );
else
self.alt_grenade = undefined; */

//I add this thanks to hitman
if ( !self hasweapon( "zombie_tomahawk" ) )
self takeweapon( "zombie_tomahawk" );
else if ( self hasweapon( "zombie_tomahawk_flourish" ) )
self takeweapon( "zombie_tomahawk_flourish" );
else if ( self hasweapon( "zombie_tomahawk_upgraded" ) )
self takeweapon( "zombie_tomahawk_upgraded" );


}
Quote
_zombiemode_perks.gsc
Code Snippet
Plaintext
harrybo21_perks_player_revive()
{
self notify ( "player_revived", self );
self reviveplayer();

self.revives++;
self.stats[ "revives" ] = self.revives;

self harrybo21_return_loadout( self.loadout, self.loadout.perk_inventory );

self thread maps\_laststand::say_revived_vo();
self.revivetrigger delete();
self.revivetrigger = undefined;
self.health = self.maxhealth;
self AllowStand( true );
self AllowCrouch( true );
self AllowProne( true );
self AllowSprint( true );
self SetStance( "stand" );
self DisableInvulnerability();
self EnableWeaponCycling();
self _enableOffhandWeapons();
self freezecontrols( false );
self.being_revived = false;
self.ignoreme = false;
self.revived = true;
wait .1;
if ( isDefined( self.whos_who_active ) )
self VisionSetNaked( "zombie_whos_who", 1 );
else
{
self VisionSetNaked( level.zombie_vars[ "vision_file" ], 1 );
setClientSysState( "lsm", "0", self );
}
iPrintLnBold( "^1Last stand - loadout returned" );
if ( !self hasweapon( "zombie_tomahawk" ) )
self takeweapon( "zombie_tomahawk" );
else if ( self hasweapon( "zombie_tomahawk_flourish" ) )
self takeweapon( "zombie_tomahawk_flourish" );
else if ( self hasweapon( "zombie_tomahawk_upgraded" ) )
self takeweapon( "zombie_tomahawk_upgraded" );

}
I am using harrybo21 perks(last version) and nate wolves
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
You have a ! In the if statement

So it's doing

If I "don't" gave zombie tomahawk - take zombie tomahawk
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
You have a ! In the if statement

So it's doing

If I "don't" gave zombie tomahawk - take zombie tomahawk

Not sure, if I added that or Dark did... :poker: Then again, I copied the lines and just added new names and other lines dont have !, so yeah :please:
Marked as best answer by KDXDARK 10 years ago
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
I'm not sure this will resolve it anyway

Think the problem stems from a thread in the tomahawk script rather than the last stand stuff

It waits on a notify "player_revived" then gives the tomahawk - most likely running "after" this code

Smasher had a issue in kino with not getting the tomahawk back so I popped that in. But it was a terrible way to fix it, only did it that way so he didn't need to edit his scripts
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 1 day ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
i added the !, also without that it dont work.

Double Post Merge: July 06, 2016, 12:10:50 am
fixed http://ugx-mods.com/forum/index.php?topic=10495.0
Last Edit: July 06, 2016, 12:10:50 am by KDXDARK

 
Loading ...