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

Little problem

broken avatar :(
Created 11 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
2,118 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
Hey Overhere!
Fixed mule kick problems revive solo, more later i going to test it on coop! :) Thanks for the help people!
Last Edit: February 19, 2013, 07:17:41 am by DARKLEGION
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 4 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter Elite
My Groups
More
×
YaPh1l's Groups
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
Code Snippet
Plaintext
self TakeWeapon("current_weapon");
would take away a weapon with a weapon file called current_weapon from the player, which does obviouly not exist.
You probably want something like this:
Code Snippet
Plaintext
current_weapon = self GetCurrentWeapon();
self TakeWeapon(current_weapon);
// You should probably switch to another one then
If you mean (by "get up"), after the player is revived, you could also call GetWeaponsListPrimaries() and remove a weapon from that list if it contains 3.

- Phil.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
Code Snippet
Plaintext
self TakeWeapon("current_weapon");
would take away a weapon with a weapon file called current_weapon from the player, which does obviouly not exist.
You probably want something like this:
Code Snippet
Plaintext
current_weapon = self GetCurrentWeapon();
self TakeWeapon(current_weapon);
// You should probably switch to another one then
If you mean (by "get up"), after the player is revived, you could also call GetWeaponsListPrimaries() and remove a weapon from that list if it contains 3.

- Phil.
the question is where i put that in laststand.gsc or zombiemode.gsc?
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 8 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
the question is where i put that in laststand.gsc or zombiemode.gsc?
You put it wherever your TakeWeapon code already is... "current_weapon" is not a valid parameter for TakeWeapon. You have to use a valid gun name and the player has to have the gun in order for it to do anything. current_weapon = self GetCurrentWeapon() sets the variable to the string name of whatever gun the player is holding when the function runs. Then self TakeWeapon(current_weapon) will take that gun name from the player.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 weeks ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
You put it wherever your TakeWeapon code already is... "current_weapon" is not a valid parameter for TakeWeapon. You have to use a valid gun name and the player has to have the gun in order for it to do anything. current_weapon = self GetCurrentWeapon() sets the variable to the string name of whatever gun the player is holding when the function runs. Then self TakeWeapon(current_weapon) will take that gun name from the player.
if i give you the scripts you can see it? :)

Post Merge: February 19, 2013, 07:15:34 am
Update on the first reply!

Post Merge: February 19, 2013, 07:18:10 am
ads
Last Edit: February 19, 2013, 07:18:10 am by DARKLEGION

 
Loading ...