Raised This Month: $ Target: $400
 0% 

Turn To Gold


Post New Thread Reply   
 
Thread Tools Display Modes
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 10-20-2014 , 17:20   Re: Turn To Gold
Reply With Quote #11

The FAQ mentions being able to * for a wildcard in place of the item index, but it doesn't mention anything about adminflags and it sounds like if you were to use a wildcard, you'd be applying the turn to gold stat to all misc/wearable items too...? Then again the code snippet I made probably does that too cause I didn't think about that.
__________________

Last edited by Chdata; 10-20-2014 at 17:20.
Chdata is offline
ShinyRazu
Member
Join Date: Feb 2014
Old 10-20-2014 , 17:33   Re: Turn To Gold
Reply With Quote #12

Ok fair enough it turns out I was wrong about the wildcard not working for indexes, just I read before that it wasn't possible. Thanks for letting me know, although I do think plugin form is a lot better as it works more often and seems to not really bug out, I guess they both work in similar ways. I still can't get quality to change by the items file though
ShinyRazu is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-20-2014 , 18:04   Re: Turn To Gold
Reply With Quote #13

Quote:
Originally Posted by DarthNinja View Post
You can use wildcards to apply a set of attributes to all items or all players using an asterisk (*) in place of a steamid or item index.
Quote:
Originally Posted by Chdata View Post
but it doesn't mention anything about adminflags
You can use the "admin-flag" key.

Quote:
Originally Posted by Chdata View Post
Then again the code snippet I made probably does that too cause I didn't think about that.
It does.

Quote:
Originally Posted by ShinyRazu View Post
Thanks for letting me know, although I do think plugin form is a lot better as it works more often and seems to not really bug out
They're both plugins, using the exact same API in the exact same way...
__________________

Last edited by asherkin; 10-20-2014 at 18:07.
asherkin is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 10-20-2014 , 23:50   Re: Turn To Gold
Reply With Quote #14

Quote:
Originally Posted by asherkin View Post
You can use the "admin-flag" key.
Waaaaaiit.... I think I missed the part in the FAQ where it mentions...? Actually it doesn't mention that. Is there some other documentation where you found this key exists or do you 'just know'?

Fakedit: I guess it was in the tf2items.weapons.example.txt; oh documentation, u so well hidden!

@OP: Use this instead.

Save as "tf2items.weapons.txt" and place in sourcemod/configs.

Then delete that plugin I made because it's useless and probably would make other ones crash and this does the same thing but shorter and no self-advertising.

Code:
"custom_weapons_v3"
{
    "*" // Match all steamIDs
    {
        "*" // Match all item indexes
        {
            "admin-flags"   "b"         // Generic admin only
            "quality"       "11"        // strange quality as seen in items_game.txt
            "level"         "69"
            "1"             "150 ; 1"   // Turn to gold attribute
        }
    }
}
Iz literally all u need. [untested]

Also I have this feeling that I'm missing a thread or file somewhere that says, "Here's a full list of keys".
__________________

Last edited by Chdata; 10-21-2014 at 00:01.
Chdata is offline
ShinyRazu
Member
Join Date: Feb 2014
Old 10-21-2014 , 05:36   Re: Turn To Gold
Reply With Quote #15

OK well firstly thank you guys for the help. The plugin you made does not cause any crashes I also edited it and put a different attribute in a separate version and used both fine and everything worked good. My initial intentions were to perhaps have client prefs or being able to toggle the attribute on/off, and the item file adds restrictions there because only I can access it (and wouldn't want anybody else to have access anyway).


For now what you made is good but I have a .sp of something similar that gave the weapon with the attribute instead of applying it to client's own weapons, which had a command and client prefs involved so in the future it may become a possibility that I could attempt, or ask somebody how I can fuse the two together. As I said, a plugin is a lot better but I will still go ahead and try what you wrote for the items file. Thanks
ShinyRazu 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 03:11.


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