Raised This Month: $12 Target: $400
 3% 

2 Basic Donator Interface questions.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 12-31-2013 , 17:16   2 Basic Donator Interface questions.
Reply With Quote #1

Nevermind, see here for why!

Last edited by 404UserNotFound; 01-01-2014 at 14:54.
404UserNotFound is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 12-31-2013 , 17:40   Re: 2 Basic Donator Interface questions.
Reply With Quote #2

From my expirence Basic Donator Interface is working really weird / buggy
Sometimes it reads steamids
Sometimes not
__________________
...
Oshizu is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 12-31-2013 , 18:42   Re: 2 Basic Donator Interface questions.
Reply With Quote #3

Quote:
Originally Posted by Oshizu View Post
From my expirence Basic Donator Interface is working really weird / buggy
Sometimes it reads steamids
Sometimes not
Ahhh crap in a hat.

Well the majority of it seems to work fine. Are there any errors you can see with some of the natives and such, just after a quick glance?

Maybe something I can put my newb skills to use on and try to fix?
404UserNotFound is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-01-2014 , 00:55   Re: 2 Basic Donator Interface questions.
Reply With Quote #4

Admin flags exist for a reason, which makes the donor interface thing superfluous.
Unless you need lots and lots of donator levels, there should be enough flags available for you.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-01-2014 , 09:53   Re: 2 Basic Donator Interface questions.
Reply With Quote #5

Quote:
Originally Posted by friagram View Post
Admin flags exist for a reason, which makes the donor interface thing superfluous.
Unless you need lots and lots of donator levels, there should be enough flags available for you.
Well I prefer the BDI because of the RegisterMenuItem native. Thing is, BDI is not really set up to work side-by-side with admin flags.

I'm going to have to code up a standard stock "IsBasicDonator(client)" check to return true if the player has CUSTOM1, then do two more checks (Advanced and Expert, for CUSTOM2 and CUSTOM3), then turn them into natives.

I may even push out a modified version of Toazron's BDI that utilizes flags.
404UserNotFound is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-01-2014 , 13:02   Re: 2 Basic Donator Interface questions.
Reply With Quote #6

Or you could like, you know, make your own menu.
Fakeclientcommand(client, "sm_myplugin")
Cheesy way to cross connect plugins or other menus.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 01-01-2014 at 13:02.
friagram is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-01-2014 , 13:13   Re: 2 Basic Donator Interface questions.
Reply With Quote #7

Quote:
Originally Posted by friagram View Post
Or you could like, you know, make your own menu.
Fakeclientcommand(client, "sm_myplugin")
Cheesy way to cross connect plugins or other menus.
Lol yeah, that's one way of doing it. This is my first time working with natives or even creating natives, so I'm a bit excited. I still ain't touching SQL code though, I tend to avoid working on anything with SQL like it's the black plague.

Y'know, I did have an idea for something similar to like, SMLib, or that recent "Zones" submission that came with natives for developers. It'd be a huge pack of pre-made natives for TF2 plugins, including things like

"ChangePlayerColor(client, color)"
"ChangeBuildingColor(building, color)"
"SpawnHorsemann(client, scale)"

etc.

I assume something similar already exists, but I've always loved the idea of natives and how they allow for cross-plugin integration, and how it makes coding things so much easier (kind of like Dr. McKays Advanced MOTD thing he released in the Snippets section)
404UserNotFound is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-01-2014 , 14:28   Re: 2 Basic Donator Interface questions.
Reply With Quote #8

Those type stocks are pretty wasteful, and generally just replace existing natives or change 1 netprop. What's the point of having 300 stocks that do virtually nothing? Makes it that much harder to remove them or update/maintain your code if said junk stock ever fails lr need to be changed. So I avoid smlib.. Updater too. Easier to just replace them with real code, or update stuff yourself. Updater could be alright I guess, if modified to pull from your own repo.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 01-01-2014 , 14:52   Re: 2 Basic Donator Interface questions.
Reply With Quote #9

Quote:
Originally Posted by friagram View Post
Those type stocks are pretty wasteful, and generally just replace existing natives or change 1 netprop. What's the point of having 300 stocks that do virtually nothing? Makes it that much harder to remove them or update/maintain your code if said junk stock ever fails lr need to be changed. So I avoid smlib.. Updater too. Easier to just replace them with real code, or update stuff yourself. Updater could be alright I guess, if modified to pull from your own repo.
Yeah, you have a point. Just a bit of an update on the original questions; screw them both. I did some major cleanout of the Basic Donator Interface plugin, removed EVERYTHING except for RegisterMenuItem and UnregisterMenuItem. I've switched everything over in regards to donator checks over to using GetUserFlagBits, and checking for either the O, P or Q flag.

I then found an "Add Admin with ability to add to group" plugin, so I modified the "addadmintogroup" command so it doesn't have a "password" field, and changed it into "sm_adddonator" so it'll add donators to admin_simple.ini

Finally, I switched the "!donators" chat trigger over to use RegConsoleCmd, and created sm_donator, sm_donators and sm_donatormenu, and coded in a check so that if a non-Donator uses the command, it tells them that the command is for donators, and tells them to type "!donate" to learn more. !donate will be a separate command that brings up an MOTD window with information on how to donate, the levels, and the benefits.

This is a much easier setup for me, and the only natives needed are for RegisterMenuItem and UnregisterMenuItem. I was trying to create three natives, "IsBasicDonator", "IsAdvancedDonator" and "IsExpertDonator", but using "GetUserFlagBits(client)" in the native code without defining what "client" is stopped me from doing that, so I'm just gonna stick to using GetUserFlagBits.

So yeah. /thread

Last edited by 404UserNotFound; 01-01-2014 at 14:53.
404UserNotFound is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-02-2014 , 02:27   Re: 2 Basic Donator Interface questions.
Reply With Quote #10

I'm surprised nobody here has modified the sql admins plugin to have expiracy tables or said natives.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 23:18.


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