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

[Help] GiveWeapon error

HOT
broken avatar :(
Created 8 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
7,366 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
give by console vs giveweapon by script do completely different things.

GiveWeapon only gives it if the weapon was cached into the level at level-load vs give giving the loaded asset pool for weapons.

You missing the precache is the only thing wrong. (Are you 100% sure it's been precached though?)

i 101% sure its been precached but after a nights rest im just gonna rewrite my system (its the only thing i can think of to fix it)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
i 101% sure its been precached but after a nights rest im just gonna rewrite my system (its the only thing i can think of to fix it)

I had this issue with my perk system a while ago and can't remember what fixed it. I too passed the string to precache the weapon file after init in another function. I almost want to say it fixed itself, but I don't remember. I currently still have that option but only use one weapon file so I precache it in my init function of my perk system which I call in zombiemode where the others are called. It very well could still not be working for multiple weapon files in the passing the string system, I don't know. But if you have precached the weapon file in the init function, or even tried in one of the zombiemode precache functions, hud or shader or whatever, to add the weapons/bottles/items there, checked for misspellings, I guess you don't have a choice then.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
i 101% sure its been precached but after a nights rest im just gonna rewrite my system (its the only thing i can think of to fix it)

but im not 100% sure that i used the right SwitchWeapon function :-[ gotta love auto complete and not checking what it auto completes into

it was giving the bottle perfectly fine but i used SwitchToOffhand() instead of SwitchToWeapon() :o maybe next time il check whats been typed

Edit: this makes me feel so stupid that a simple error like this would cause such an issue  :-[
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community 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.
Community 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 Links[email protected]HarryBo21HarryBo000
did anyone check he is precaching the "weapon file" and not the model

Code Snippet
Plaintext
PrecacheItem( "perk_bottle_weapon_file" );

dont need to for guns and stuff because :

Code Snippet
Plaintext
add_zombie_weapon()

precaches those in that function


EDIT - didnt see that last post
Last Edit: January 22, 2016, 08:27:27 am by Harry Bo21

 
Loading ...