Raised This Month: $ Target: $400
 0% 

Release [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)


Post New Thread Reply   
 
Thread Tools Display Modes
eXemplar
Member
Join Date: Feb 2013
Old 03-13-2013 , 03:04   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #11

Quote:
What do you think about storing the settings in the database
Could this not be a change that is implemented for the whole store?
eXemplar is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-13-2013 , 04:33   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #12

Quote:
Originally Posted by Arrow768 View Post
Looks very interesting.
Btw. you forgot the ending slash at the


What do you think about storing the settings in the database, so they could be changed via a Webinterface (maybe the WebPanel) ?
Only if its made possible by some sort of native because I can't code SQL at all.
404UserNotFound is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 03-13-2013 , 06:39   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #13

Whelp, this scraps the plugin I was making. haha
Drixevel is offline
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 03-13-2013 , 11:27   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #14

Maybe we should make a Work In Progress Thread, so developers can see what is being worked on atm and there are no duplicate plugins ?!
__________________
Arrow768 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-13-2013 , 17:04   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #15

Quote:
Originally Posted by Arrow768 View Post
Maybe we should make a Work In Progress Thread, so developers can see what is being worked on atm and there are no duplicate plugins ?!
Good idea!
404UserNotFound is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 03-13-2013 , 22:52   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #16

Quote:
Originally Posted by Arrow768 View Post
Maybe we should make a Work In Progress Thread, so developers can see what is being worked on atm and there are no duplicate plugins ?!
I second this since I wasted a good week or two of my time. haha

Cheers,
- Jack
Drixevel is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-14-2013 , 12:29   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #17

Quote:
Originally Posted by r3dw3r3w0lf View Post
I second this since I wasted a good week or two of my time. haha

Cheers,
- Jack
Haha, oh wow. A week or two? Welp, I just woke up and was going to work on the plugin some more and finish up some events, but I got called into work. Guess I'll have to work on it later.


Whats with all this silly "end your post like it's a letter to your friend" shit,
- abrandnewday
404UserNotFound is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 03-14-2013 , 12:48   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #18

Quote:
Originally Posted by abrandnewday View Post
Haha, oh wow. A week or two? Welp, I just woke up and was going to work on the plugin some more and finish up some events, but I got called into work. Guess I'll have to work on it later.


Whats with all this silly "end your post like it's a letter to your friend" shit,
- abrandnewday
I don't dedicate my time to working on plugins. I also use that format a lot when I feel like it.

- Jack
Drixevel is offline
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 03-14-2013 , 16:35   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #19

I have created and sticked the WIP-Thread.
__________________
Arrow768 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-14-2013 , 23:28   Re: [WIP][TF2] Cash For Kills (Progress-Tracking Thread!)
Reply With Quote #20

Update Time!

So I've been pretty busy the past two days, what with having to go to work and all, and I've only had a brief bit of time to work on the plugin tonight, but I've already gotten something worked out for the plugin, which I am now going back through the code to change every instance over to.

It's the addition of two new ConVars which I really should have coded in in the first place. The first ConVar determines if messages are to be displayed upon doing something that earns you cash.

The second ConVar only occurs for certain events (at this time, events such as Ubercharging a teammate, or killing a player) that have the ability to display your victim's name. Setting this second ConVar to "1" will enable the messages to display the victim's name, i.e. "You have earned <amount> <currency name> for killing <victim name>". Setting it to "0" displays a more generic message, for example "You have earned <amount> <currency name> for killing an enemy."

Here's an example:

PHP Code:
new displaymsg GetConVarInt(Credits_DisplayMessages);
        if (
displaymsg == 1)
        {
            if (
bigstun)
            {
                new 
displayname GetConVarInt(Credits_DisplayNames);
                if (
displayname == 1)
                {
                    
PrintToChat(attacker"%s%t"STORE_PREFIX"Moonshotted Player Named"credits_bigstung_strCurrencyNamevictimname);
                }
                else
                {
                    
PrintToChat(attacker"%s%t"STORE_PREFIX"Moonshotted Player"credits_bigstung_strCurrencyName);
                }
            }
            else
            {
                new 
displayname GetConVarInt(Credits_DisplayNames);
                if (
displayname == 1)
                {
                    
PrintToChat(attacker"%s%t"STORE_PREFIX"Stunned Player"credits_stung_strCurrencyNamevictimname);
                }
                else
                {
                    
PrintToChat(attacker"%s%t"STORE_PREFIX"Stunned Player"credits_stung_strCurrencyName);
                }
            }
        } 
The code is all expanded because that's how I roll. I will of course try my damndest to minimize the # of lines in the code using some popular methods of shrinking the amount of lines of code, such as:

PHP Code:
if (displayname == 1) { PrintToChat(attacker"%s%t"STORE_PREFIX"Moonshotted Player Named"credits_bigstung_strCurrencyNamevictimname); } 
As well, I've also added a new event or two, in regards to the CTF game mode. Instead of just being able to get cash for capturing the Intel (along with the team bonus for capturing the intel), you will also have the option to set up an amount of credits to reward players who grab the Intel, or who defend the Intel.

I've just added Grabbing the Intel and Defending the Intel to the main post
404UserNotFound 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 19:09.


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