Raised This Month: $ Target: $400
 0% 

[TF2Items] Give Weapon (v3.14159, 11/29/2013)


Post New Thread Reply   
 
Thread Tools Display Modes
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-19-2011 , 04:20   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #161

Quote:
Originally Posted by DarthNinja View Post
sm_gimmie <item> :
PHP Code:
ServerCommand("sm_give #CLIENT \"ItemID\""
Have the menu do more or less the same thing (just pass the item id)
What I'm saying here, is just write a 2nd plugin that registers the command sm_gimmie with whatever your donor flag is.
Then have it run sm_give #<client> <item> via servercommand.

You can add a blacklist too if you want to block the more crazy weapons.

That's a 5 minute way to do it. If you want to get more involved, write in a menu that shows if the client runs sm_gimmie with no args and asks them to pick the item from a menu.
__________________
DarthNinja is offline
thatdarnkid
BANNED
Join Date: Nov 2010
Old 01-19-2011 , 09:04   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #162

Quote:
Originally Posted by DarthNinja View Post
What I'm saying here, is just write a 2nd plugin that registers the command sm_gimmie with whatever your donor flag is.
Then have it run sm_give #<client> <item> via servercommand.

You can add a blacklist too if you want to block the more crazy weapons.

That's a 5 minute way to do it. If you want to get more involved, write in a menu that shows if the client runs sm_gimmie with no args and asks them to pick the item from a menu.
Yeah, I'd love to make my own plugin, but I suck at coding, though I am trying to learn. Just, nobody seems to either notice my thread(s), or give a crap about it, more or less.

Last edited by thatdarnkid; 01-19-2011 at 09:15.
thatdarnkid is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 01-19-2011 , 11:29   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #163

DarthNinja: Natives. NATIVES.

danmon: tf2items_giveweapon_reload refreshes anything you add to the cfg. You need to refresh it, probably. And also, "slot" "0" == primary weapon, 1 is secondary, etc

Thatdarnkid: that's cuz I mistakenly replicated those convars, so the client tries to set them and fails to find them.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 01-19-2011 at 11:55.
FlaminSarge is offline
thatdarnkid
BANNED
Join Date: Nov 2010
Old 01-19-2011 , 12:04   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #164

I once again feel the need to say "Great MFin' job!". This plugin kicks ASS. I'm 100% sure the reason this plugin + VisWeps/SDKHooks/Attachables were crashing my server was because I edited the coding of this plugin and removed anything having to do with VisWeps, then forgot I had modified it later on. Onto my XBOX HUEG post. I'll split it up with dividers for easy readin'.
═════════════════════════════════════
Quote:
Originally Posted by FlaminSarge View Post
Thatdarnkid: that's cuz I mistakenly replicated those convars, so the client tries to set them and fails to find them.
Ahh. I assume a fix is in the works?
═════════════════════════════════════
Quote:
Originally Posted by FlaminSarge View Post
And also, "slot" "0" == primary weapon, 1 is secondary, etc
To expand:
Code:
0 - Primary Weapons
1 - Secondary Weapons
2 - Melee Weapons
3 - PDA Slot (Spy's Disguise Kit, Engineer's Build PDA)
4 - PDA2 Slot (All Spy Invis Watches, Engineer's Destroy PDA)
NOTE: Not exactly sure if slot #4 is indeed PDA2.
I ended up taking the attributes of your fireproof ambassador and creating a custom Spy Disguise Kit with the same fireproof attribs. However, I ran into a problem. I was playing a Spy with the Fireproof Disguise Kit, and when I used sm_resetex to remove any given weapons from myself, I still had the Fireproof Disguise Kit.

My best guess is that the coding for sm_resetex *may not* include the necessary parts to ensure that any weapons given to slots 3 and up. If my guess is correct, perhaps a fix for sm_resetex would be in order, which would then allow you to change the Fireproof Spy Suit-Ambassador into a Fireproof Spy Suit Disguise Kit.
═════════════════════════════════════
Also, I discovered something that I think would make a great addition to either the plugin itself, or to anyone's custom weapons file. Below are both versions of the code. It's the giant form of the HHH's Headtaker. I've tested it on my server (yesterday) and it works perfectly. The axe is the same size as the one the Horsemann wields.

NOTE: The attributes for both versions are the same attributes as the HHH's Headtaker; No random crits and -25 Max HP on wearer. I suggest adding a major damage bonus to this weapon. A full list of attributes is available here.

Hardcode version
Code:
//Horseless Headless Horsemann's Axe
    SetTrieString(g_hItemInfoTrie, "8266_classname", "tf_weapon_sword");
    SetTrieValue(g_hItemInfoTrie, "8266_index", 266);
    SetTrieValue(g_hItemInfoTrie, "8266_slot", 2);
    SetTrieValue(g_hItemInfoTrie, "8266_quality", 5);
    SetTrieValue(g_hItemInfoTrie, "8266_level", 100);
    SetTrieString(g_hItemInfoTrie, "8266_attribs", "15 ; 0 ; 125 ; -25");
    SetTrieValue(g_hItemInfoTrie, "8266_ammo", -1);
    SetTrieString(g_hItemInfoTrie, "8266_model", "models/weapons/c_models/c_bigaxe/c_bigaxe.mdl");
tf2items.givecustom.txt version
Code:
"8266"
{
"classname"      "tf_weapon_sword"
"index"             "266"
"slot"               "2"
"quality"           "5"
"level"              "100"
"attribs"           "15 ; 0 ; 125 ; -25"
"ammo"            "-1"
"model"            "models/weapons/c_models/c_bigaxe/c_bigaxe.mdl"
}
^I just figured out that you could use the "model" field in tf2items.givecustom.txt yesterday. xD

Last edited by thatdarnkid; 01-19-2011 at 12:08.
thatdarnkid is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-22-2011 , 10:12   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #165

Quote:
Originally Posted by thatdarnkid View Post
To expand:
Code:
0 - Primary Weapons
1 - Secondary Weapons
2 - Melee Weapons
3 - PDA Slot (Spy's Disguise Kit, Engineer's Build PDA)
4 - PDA2 Slot (All Spy Invis Watches, Engineer's Destroy PDA)
NOTE: Not exactly sure if slot #4 is indeed PDA2.
I ended up taking the attributes of your fireproof ambassador and creating a custom Spy Disguise Kit with the same fireproof attribs. However, I ran into a problem. I was playing a Spy with the Fireproof Disguise Kit, and when I used sm_resetex to remove any given weapons from myself, I still had the Fireproof Disguise Kit.
Code:
// TF2 Weapon Slots for GetPlayerWeaponSlot
enum
{
	TFWeaponSlot_Primary,
	TFWeaponSlot_Secondary,
	TFWeaponSlot_Melee,
	TFWeaponSlot_Grenade,
	TFWeaponSlot_Building,
	TFWeaponSlot_PDA,
	TFWeaponSlot_Item1,
	TFWeaponSlot_Item2	
};
There will be a patch to add this to SourceMod's TF2 include once the bug tracker is back.
__________________
asherkin is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 01-22-2011 , 16:57   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #166

MY GOD THATDARNKID STOPPIT.
Resetex does not remove ANYTHING.
What it does is, next time you touch a locker, it DOESN'T give you whatever you have given yourself through givew_ex. It resets a player's permanent weapon table.

I'm going to 1-up your horsemann axe by saying that I am making a Horsemann Axe that adds all of the Horsemann's giant OP attributes and adds his model over yours, as well as the big axe.

But that's ok so far.

Asherkin: cool stuff.

@thatdarnkid: sorry I'm a bit touchy, but I've been frustrated by viewmodels for the past few days.

ALSO: Fireproof spy suit will soon be an actual suit, not just a gun/pda. More details soon.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
FunkyLoveCow
Senior Member
Join Date: May 2010
Old 01-22-2011 , 17:13   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #167

Quote:
Originally Posted by FlaminSarge View Post
I'm going to 1-up your horsemann axe by saying that I am making a Horsemann Axe that adds all of the Horsemann's giant OP attributes and adds his model over yours, as well as the big axe.

ALSO: Fireproof spy suit will soon be an actual suit, not just a gun/pda. More details soon.
Cookie or beer? I'll give you either for these.
FunkyLoveCow is offline
thatdarnkid
BANNED
Join Date: Nov 2010
Old 01-22-2011 , 23:48   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #168

Quote:
Originally Posted by FlaminSarge View Post
MY GOD THATDARNKID STOPPIT.
Resetex does not remove ANYTHING.
What it does is, next time you touch a locker, it DOESN'T give you whatever you have given yourself through givew_ex. It resets a player's permanent weapon table.

I'm going to 1-up your horsemann axe by saying that I am making a Horsemann Axe that adds all of the Horsemann's giant OP attributes and adds his model over yours, as well as the big axe.

But that's ok so far.

Asherkin: cool stuff.

@thatdarnkid: sorry I'm a bit touchy, but I've been frustrated by viewmodels for the past few days.

ALSO: Fireproof spy suit will soon be an actual suit, not just a gun/pda. More details soon.
It's ok Sarge xD Believe me, I know how frustrating it is to deal with coding problems *points to link in sig that nobody's responded to in DAYS*.

Also, as you probably know, I'm an idiot , hence why I assumed resetex removes everything

Also *bows to you*. Loving the idea of an actual suit and the actual Horsemann, thoughhhh....the Horsemann Spawner plugin already lets you change your model to the Horsemanns. Combine that with my axe and you is the Horsemann, though you dont get his attributes.
thatdarnkid is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 01-23-2011 , 02:03   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #169

IIRC it doesn't animate. Attachables is needed.
Whatever.

I'll prolly make it a separate plugin, FunkyLoveCow. I already have a base sm_behorsemann plugin, but I think I'll use some of the Vs Saxton Hale code for feet stomps, etc. Eggman did a great job simulating horsemenn.

EDIT: D'awww psychonic.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 01-24-2011 at 23:31.
FlaminSarge is offline
snowyiet
Member
Join Date: Jan 2010
Old 01-24-2011 , 17:37   Re: [TF2Items] Give Weapon (v2.61, 01/09/2011)
Reply With Quote #170

Quote:
Originally Posted by FlaminSarge View Post
Snowyjet: not yet. I am working on it with Mecha the Slag (who already has viewmodels, but broke them). So far, I have great progress:
http://dl.dropbox.com/u/9948007/ccdorm_a40003.jpg
http://dl.dropbox.com/u/9948007/ccdorm_a40005.jpg
FunkyLoveCow, it can if you don't set it to too high. I'll see what I have it set as for the trail of grenades I have
This looks very good. Nice work.
snowyiet is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode