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

Adding a weapon in the box AFTER the player has done something.

broken avatar :(
Created 9 years ago
by IperBreach86
0 Members and 1 Guest are viewing this topic.
1,689 views
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 5 September 2014
Last active: 4 years ago
Posts
282
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I belive purple is getting me...
×
IperBreach86's Groups
IperBreach86's Contact & Social LinksIperBreach86
Hi there, i am trying to make a craftable weapon and after a player has gotten it, others should be able to get it from the box!
The problem is that i cant get it to work!
Sof ar ive tried
Code Snippet
Plaintext
level.zombie_include_weapons["weapon_name"] = true;

Code Snippet
Plaintext
thread maps\dlc3_code::include_weapons("weapon_name", true);
And a third one that is similar to the one above but with _zombiemode_weapons.gsc
I really want to make this, so any help would be apreacited :D
Marked as best answer by IperBreach86 9 years ago
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
I created a function for something similar, but it works when the player dies. Just change the waittill with your notify:
Code Snippet
Plaintext
addEEWeaonToBoxOnOwnerDeath( weapon ) {
    self waittill_any( "death", "disconnect", "player_died" );
    level.zombie_include_weapons[ weapon ] = true;
    level.zombie_weapons[ weapon ].is_in_box = true;
}
And you have to include the weapon in dlc3_code.gsc first like this:
Code Snippet
Plaintext
include_weapon( "weapon_name", false );
It works for me so it should work for you too.
Last Edit: May 15, 2016, 02:58:22 pm by Soy-Yo
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 5 September 2014
Last active: 4 years ago
Posts
282
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I belive purple is getting me...
×
IperBreach86's Groups
IperBreach86's Contact & Social LinksIperBreach86
I created a function for something similar, but it works when the player dies. Just change the waittill with your notify:
Code Snippet
Plaintext
addEEWeaonToBoxOnOwnerDeath( weapon ) {
    self waittill_any( "death", "disconnect", "player_died" );
    level.zombie_include_weapons[ weapon ] = true;
    level.zombie_weapons[ weapon ].is_in_box = true;
}
And you have to include the weapon in dlc3_code.gsc first like this:
Code Snippet
Plaintext
include_weapon( "weapon_name", false );
It works for me so it should work for you too.
Thank you very much! It works perfectly!

 
Loading ...