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

[Tutorial] Max Ammo: Fill Clip

broken avatar :(
Created 8 years ago
by Scobalula
0 Members and 1 Guest are viewing this topic.
7,593 views
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
A max ammo should be a "max ammo" and since I liked in maps like Hotel V2 that it fills your clip I decided to just make a small edit to my powerups gsc to do it which I will also show you guys how to do.

First go to root\raw\maps and copy the _zombiemode_powerups.gsc to your mods maps folder, usually in root\mods\modname\maps. If the maps folder doesn't exist, create one.

Next we need to open it with a text editor, something like Notepad++ or Sublime text is preferred.

Search for this with the find function:

Code Snippet
Plaintext
full_ammo_powerup

That should bring you to this function:

Code Snippet
Plaintext
full_ammo_powerup( drop_item )
{
players = get_players();

for (i = 0; i < players.size; i++)
{
primaryWeapons = players[i] GetWeaponsList();

for( x = 0; x < primaryWeapons.size; x++ )
{
players[i] GiveMaxAmmo( primaryWeapons[x] );
}
}
// array_thread (players, ::full_ammo_on_hud, drop_item);
level thread full_ammo_on_hud( drop_item );
}



Change the entire function to this:


Code Snippet
Plaintext
full_ammo_powerup( drop_item )
{
players = get_players();

for (i = 0; i < players.size; i++)
{
primaryWeapons = players[i] GetWeaponsList();

for( x = 0; x < primaryWeapons.size; x++ )
{
players[i] SetWeaponAmmoClip( primaryWeapons[x], WeaponClipSize( primaryWeapons[x] ) );
players[i] GiveMaxAmmo( primaryWeapons[x] );
}
}
// array_thread (players, ::full_ammo_on_hud, drop_item);
level thread full_ammo_on_hud( drop_item );
}

What we're doing with this, is we're using WeaponClipSize to get the clip size which is then set by the SetWeaponAmmoClip.

And shown working:



Simple but awesome edit! You can credit me if you want but such a minuscule thing I'm not really bothered tbh. :)
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 9 November 2013
Last active: 3 years ago
Posts
502
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Custom Zombies Videos: YouTube.com/RichGaming
Signature
YouTube: YouTube.com/RichGaming
Twitter: Twitter.com/RichGaming

×
RichGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Oil Rig Beta Access
Oil Rig Beta Access
RichGaming's Contact & Social Linksrichgaming1RichGamingRich_GamingRichGaming1
Love it! Thanks man!
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Love it! Thanks man!

No problem at all. :)
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Wow thx scob. Been looking for this +1 :).
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Wow thx scob. Been looking for this +1 :).

Hehe no problem man. :P
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
great tutorial Scobalula. Fast, clean, efficient, and best of all, error free. +1 respect.
Last Edit: March 27, 2016, 12:46:33 pm by HitmanVere
broken avatar :(
×
broken avatar :(
Location: auMandurah
Date Registered: 3 January 2016
Last active: 2 years ago
Posts
110
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
;)
Signature
×
PlutoBro's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
PlutoBro's Contact & Social Linksbro_maho_101PlutoBroPlutoBroPlutoBrobt100101
This is great, I like not having to reload. If only max ammos worked on bouncing betty's. Oh well. Thanks for posting this, will be great for future use.
Last Edit: March 27, 2016, 12:46:45 pm by HitmanVere
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
great tutorial Scobalula. Fast, clean, efficient, and best of all, error free. +1 respect.

Thanks man. Appreciate the feedback. :D
Last Edit: March 27, 2016, 12:47:03 pm by HitmanVere
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
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.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I cleaned up the topic fully from discussion about someone stealing other peoples line of code, which went way too off-topic. Lets keep this topic clean, guys

 
Loading ...