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

Would this work?

broken avatar :(
Created 12 years ago
by hiimachicken
0 Members and 1 Guest are viewing this topic.
3,811 views
broken avatar :(
×
broken avatar :(
Location: gbScotland
Date Registered: 21 August 2014
Last active: 6 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
hi m8
×
hiimachicken's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
hiimachicken's Contact & Social Linkshiimachicken
Would this script work, i would test it but my computer isnt working atm, i have made power ups before and that is what im going to add this code to,

here is the code here:


Code Snippet
Plaintext
function(){
//stores current gun
curgun = self getCurrentWeapon();
//ray = "ray_gun";

//givesw ray gun
self giveWeapon("ray_gun");

//switch gun
self switchToWeapon("ray_gun");
iPrintLn ("Ray gun given");

wait( 20 );

self takeWeapon("ray_gun");
self switchToWeapon( curgun );



}
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
this would work if you defined self to be the player. but i would recommend disable weapon switching DisableWeapons()
broken avatar :(
×
broken avatar :(
Location: gbScotland
Date Registered: 21 August 2014
Last active: 6 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
hi m8
×
hiimachicken's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
hiimachicken's Contact & Social Linkshiimachicken
this would work if you defined self to be the player. but i would recommend disable weapon switching DisableWeapons()

What would disabling weaponswitch do?
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
i think it is the disable weapon switching, but im to lazy to check
broken avatar :(
×
broken avatar :(
Location: gbScotland
Date Registered: 21 August 2014
Last active: 6 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
hi m8
×
hiimachicken's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
hiimachicken's Contact & Social Linkshiimachicken
this would work if you defined self to be the player. but i would recommend disable weapon switching DisableWeapons()

Would that make it so that the player can't change his weapon and that he can only use the ray gun, if so thanks 😄

Double Post Merge: August 29, 2014, 11:26:39 pm
i think it is the disable weapon switching, but im to lazy to check

Agh okay thanks for the help😄
Last Edit: August 29, 2014, 11:26:39 pm by hiimachicken
broken avatar :(
×
broken avatar :(
Location: tr
Date Registered: 1 March 2013
Last active: 3 days ago
Posts
817
Respect
Forum Rank
The Decider
Primary Group
2015 Contest Winner
My Groups
More
My Contact & Social Links
More
Personal Quote
Caw caw caw
×
johndoe's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Mapper Has released one or more maps to the UGX-Mods community.
2015 Contest Winner
johndoe's Contact & Social Links-johndoemyc153
What would disabling weaponswitch do?
so that the player/s can't switch to other weapons while using the given weapon. if you're gonna  use this script as a power up, that's what you need to do.
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
so that the player/s can't switch to other weapons while using the given weapon. if you're gonna  use this script as a power up, that's what you need to do.
correct, and that avatar dude, its so epic :)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 March 2014
Last active: 9 months ago
Posts
227
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I the Mighty
×
ConvictioNDR's Groups
You'll want to get the player's ammo and clip as well or when it gives them the gun it will give them a full ammo weapon back
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
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.
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 LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
You'll want to get the player's ammo and clip as well or when it gives them the gun it will give them a full ammo weapon back

as long as you dont take the players curent weapon, and give it back again afterwards it'l be fine. just give a new weapon and disable cycling. after that take the new weapon and switch back to the old one. no ammo changed then
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 March 2014
Last active: 9 months ago
Posts
227
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I the Mighty
×
ConvictioNDR's Groups
as long as you dont take the players curent weapon, and give it back again afterwards it'l be fine. just give a new weapon and disable cycling. after that take the new weapon and switch back to the old one. no ammo changed then
I didn't really read it that well... All I saw was get current weapon and give ray gun.. Was a little focused on something else. Forget what I said.
broken avatar :(
×
broken avatar :(
Location: gbScotland
Date Registered: 21 August 2014
Last active: 6 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
hi m8
×
hiimachicken's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
hiimachicken's Contact & Social Linkshiimachicken
so that the player/s can't switch to other weapons while using the given weapon. if you're gonna  use this script as a power up, that's what you need to do.

What's the code to disable weapon switching I can't find it on the scrip rerence?
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 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 Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
What's the code to disable weapon switching I can't find it on the scrip rerence?


Code Snippet
Plaintext
self DisableWeaponCycling();

also make sure you enableweaponcycling when you give the players their original gun back
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Do the Switch before the Disable as if you try to execute that code with Disable--- on first it won't switch.
Also "self" is defined by the entity that the function is called by, so if it's actually a player that does it then you don't need "player" variable (that's really stupid thing to say too n1)
Last Edit: August 30, 2014, 12:56:30 am by DidUknowiPwn
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
Do the Switch before the Disable as if you try to execute that code with Disable--- on first it won't switch.
Also "self" is defined by the entity that the function is called by, so if it's actually a player that does it then you don't need "player" variable (that's really stupid thing to say too n1)
i was saying the same thing u were... at least thats what i was trying to say

 
Loading ...