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] Giving Player Alt. Weapon Problems!

broken avatar :(
Created 7 years ago
by GerardS0406
0 Members and 1 Guest are viewing this topic.
1,504 views
broken avatar :(
×
broken avatar :(
Location: usMissouri
Date Registered: 6 August 2013
Last active: 5 months ago
Posts
513
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
My Contact & Social Links
More
Signature
Projects:
Unnamed Project: 5%
Mutliple Downloadable Items for Mappers: (Released after map releases)
×
GerardS0406's Groups
GerardS0406's Contact & Social LinksGerardS0406Gerard0406GerardS0406MrGerard0406
Hello, I am having problems with a alternate weapon (Hacker Device from Moon) in world at war. I have precached the weapon with:
Code Snippet
Plaintext
PrecacheItem( "moon_hacker" );
and gave the player the weapon in the hacker function:
Code Snippet
Plaintext
hacker()
{
while(1)
{
self waittill("trigger", player);
if(level.hackerTaken == true)
{
wait 1;
continue;
}
player iPrintLnBold("Lost PES");
player.hasPES = false;
player.hasHacker = true;
self setHintString(" ");
level.hackerTaken = true;
player giveweapon("moon_hacker");
player setactionslot(1,"weapon","moon_hacker");
player setweaponammostock("moon_hacker", 1);
wait(0.5);
}
}
but in game, after pressing the trigger, it gives me the hud and says press "[DUP or X]" but when I press X, it says, "calling an even on an unregistered weapon. Make sure that the weapon has been precached."

Any help is appreciated :)
broken avatar :(
×
broken avatar :(
Location: usMissouri
Date Registered: 6 August 2013
Last active: 5 months ago
Posts
513
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
My Contact & Social Links
More
×
GerardS0406's Groups
GerardS0406's Contact & Social LinksGerardS0406Gerard0406GerardS0406MrGerard0406
Update: it only gives me the hacker when in devmode? Any ideas? :)
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Have you added it to a .csv and dlc3_code and _zombiemode_weapons?

 
Loading ...