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

Player Weapons & payload

broken avatar :(
Created 11 years ago
by daedra descent
0 Members and 1 Guest are viewing this topic.
4,229 views
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
It's been a while since Treminaor gave me this code for giving players specific weapons, but i still can't get it to work:
Code Snippet
Plaintext
players = getPlayers();
players[0] giveWeapon("weapon1");
players[1] giveWeapon("weapon2");
players[2] giveWeapon)"weapon3");
players[3] giveWeapon("weapon4");

The game simply ignores it as if it doesn't exist or something. I've tried to fix it myself by adding a few things, but always end up with bad syntax's.

I've also been wanting to add a payload like in Payload. The problem is that i'm having trouble figuring out the difference between map variables and payload variables, and am getting a game crash at the start.

Any advice would be appreciated.
Last Edit: September 08, 2013, 02:44:55 pm by daedra descent
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne'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.
For the first part I would make sure the loadout GSC isn't overwriting the code.
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
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
For the first part I would make sure the loadout GSC isn't overwriting the code.

So could i place this

Code Snippet
Plaintext
thread maps\player_weapons::player_weapons();

into loadout to prevent it from overwriting?
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
players[2] giveWeapon)"weapon3");
You sure that its still correct?
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
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
You sure that its still correct?

I fixed it before i actually added it to the game.
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 5 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
×
SajeOne'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.
Make sure these two lines in _loadout are crossed out as it will overwrite what you add if you give the weapon before this code is read.
broken avatar :(
×
broken avatar :(
Location: usUnion, Kentucky
Date Registered: 9 September 2013
Last active: 1 year ago
Posts
310
Respect
Forum Rank
Perk Hacker
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
lilrifa'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
lilrifa's Contact & Social Linksskypeuser724lilrifalilrifa
Code Snippet
Plaintext
players[2] giveWeapon)"weapon3");

The game simply ignores it as if it doesn't exist or something. I've tried to fix it myself by adding a few things, but always end up with bad syntax's.

Should be
Code Snippet
Plaintext
players = getplayers();
for(wow=0;i<players.size;wow+=0) {
   players[wow] giveweapon("thundergun_zm");
   players[wow] iprintln("The gods have given you a Thundergun");
   wow+=1;
}

You had a backwards parenthesis. That's why it broke.
Sorry if I was late. I was sleeping.
Last Edit: April 17, 2016, 04:07:35 am by lilrifa
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 8 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Code Snippet
Plaintext
players[2] giveWeapon)"weapon3");
always end up with bad syntax's.
You don't at all see the backwards parentheses? :facepalm:
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
You don't at all see the backwards parentheses? :facepalm:

This was over 2 years ago :facepalm:
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 8 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9'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.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
This was over 2 years ago :facepalm:
Oh god I just realized it was over two years ago. It's just that someone had just recently commented on it and I didn't check the date. Wow lol 2013. Never mind then.
Marked as best answer by daedra descent 8 years ago
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
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Oh god I just realized it was over two years ago. It's just that someone had just recently commented on it and I didn't check the date. Wow lol 2013. Never mind then.

Make dumbass comment first; check date last.

Yes, 2013 me was incredibly stupid. I was just learning GSC, which was my first every "language", if you can call it that.

Edit: and pretty sure it didn't work because weapon<num> didn't even exist... so yeah, GG me.
Last Edit: April 18, 2016, 08:56:48 pm by daedra descent
broken avatar :(
×
broken avatar :(
The Last of Us
Location: scotland
Date Registered: 28 September 2013
Last active: 2 weeks ago
Posts
1,463
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
Signature
×
smasher248'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
smasher248's Contact & Social Linkssmasher248smasher248
lilrifa commented first yet u all get on at alaurence? the hell
Last Edit: April 18, 2016, 09:09:03 pm by smasher248

 
Loading ...