Raised This Month: $32 Target: $400
 8% 

Release [Store] Kill Awards


Post New Thread Reply   
 
Thread Tools Display Modes
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-12-2013 , 22:50   Re: [Store] Kill Awards
Reply With Quote #11

Quote:
Originally Posted by eXemplar View Post
Good luck, maybe I can ... leverage some of your code ;)
Well I haven't released anything yet, mainly because I'm still working on it (gotta do the player_death event and add the credit giving to EVERY. SINGLE. WEAPON....but it'll be worth it!)
404UserNotFound is offline
alongub
Veteran Member
Join Date: Aug 2009
Location: Israel
Old 03-13-2013 , 08:09   Re: [Store] Kill Awards
Reply With Quote #12

Quote:
Originally Posted by eXemplar View Post
Is there really a need for this? Shouldn't they receive (or lose) the points whether they're in game or not?
No, since you're using the Store_GetClientAccountID method.

Quote:
Originally Posted by abrandnewday View Post
I've got a primo ingame check you can use (I found it on the forums in an old thread from a year ago):

PHP Code:
new bool:IsClientInGame[4096];

public 
OnClientPutInServer(client)
{
    
IsClientInGame[client] = true;
}

public 
OnClientDisconnect_Post(client)
{
    
IsClientInGame[client] = false;

Then to do a check,

PHP Code:
if (IsClientInGame[client] == true)
if (
IsClientInGame[client] == false
It's simple, and I don't have to worry about "which IsValidClient function is the right one?" because there's like a hundred variations of IsValidClient, some that have "return IsClientInGame", some that do checks to see if the player is a SourceTV client, etc, etc.
Or... you can just use IsClientInGame.
__________________

Last edited by alongub; 03-13-2013 at 08:10.
alongub is offline
anthonyjr
Junior Member
Join Date: Feb 2013
Old 03-17-2013 , 17:48   Re: [Store] Kill Awards
Reply With Quote #13

Is it possible to make it to only award credits on a headshot? The CFG confuses me a little.
anthonyjr is offline
Arrow768
Veteran Member
Join Date: Nov 2011
Location: Austria
Old 03-18-2013 , 05:13   Re: [Store] Kill Awards
Reply With Quote #14

Quote:
Originally Posted by anthonyjr View Post
Is it possible to make it to only award credits on a headshot? The CFG confuses me a little.
Code:
"KillAwards"
{
	"enable_message_per_kill"	"1"

	"points_kill"				"2"
	"points_teamkill"			"-1"
	"points_suicide"			"-1"

	"filters"
	{
		"headshot"
		{
			"type"	"bool"
			"1"
			{
				"multiplier"	"1.0"
				"addend"	"2"
			}
		}
	}
}
This should work
__________________

Last edited by Arrow768; 03-18-2013 at 05:14.
Arrow768 is offline
anthonyjr
Junior Member
Join Date: Feb 2013
Old 03-18-2013 , 17:28   Re: [Store] Kill Awards
Reply With Quote #15

Quote:
Originally Posted by Arrow768 View Post
Code:
"KillAwards"
{
	"enable_message_per_kill"	"1"

	"points_kill"				"2"
	"points_teamkill"			"-1"
	"points_suicide"			"-1"

	"filters"
	{
		"headshot"
		{
			"type"	"bool"
			"1"
			{
				"multiplier"	"1.0"
				"addend"	"2"
			}
		}
	}
}
This should work
I have that now, and it works for headshots but also awards for regular kills. I want just only headshot credits.
anthonyjr is offline
eXemplar
Member
Join Date: Feb 2013
Old 03-18-2013 , 22:44   Re: [Store] Kill Awards
Reply With Quote #16

make the points_kill 0, but I think it will still print a message if it has 0 points - I'll check and fix later if so.
eXemplar is offline
Sketchy
Senior Member
Join Date: Nov 2010
Old 05-21-2013 , 03:31   Re: [Store] Kill Awards
Reply With Quote #17

In the main post for this mod, under Filters you say "Customisable options for points on headshots, different weapons, dominations, etc".
Could you give an example of how to use dominations in our cfg file, and perhaps expand on any/all other currently available filters that the "etc" is alluding to?

Quote:
Originally Posted by eXemplar View Post
...I'll be looking at making this more generic into a "tasks" system, which let you give points based on any game event all done via config file.
Any chance you ever got around to that? I'd like to give a few credits to people when they win a GG map.

Last edited by Sketchy; 05-21-2013 at 03:32.
Sketchy is offline
eXemplar
Member
Join Date: Feb 2013
Old 05-24-2013 , 04:07   Re: [Store] Kill Awards
Reply With Quote #18

Quote:
Could you give an example of how to use dominations in our cfg file, and perhaps expand on any/all other currently available filters that the "etc" is alluding to?
The filters section in the config file will let you do stuff based on the event data given to the player_death event.

http://wiki.alliedmods.net/Counter-S...s#player_death

For example, something like this for domination:
Code:
"dominated"
{
	"type"				"int"
	"1"
	{
		"multiplier"	"1.0"
		"addend"		"2"
	}
}
You can do similar for anything else given to that event.

Quote:
Any chance you ever got around to that? I'd like to give a few credits to people when they win a GG map.
I started on this plugin, however I wasn't happy with doing things via key/value files as it ended up being a bit messy. Might get around to it eventually. That said, you still wouldn't be able to use it for gungame wins as gungame uses public forwards to broadcast who wins and the idea was more based around game events.

If you put something like this into a plugin with store and gungame included properly, might work
Code:
public GG_OnWinner(client, const String:Weapon[], victim)
{
	new points = 10;
	Store_GiveCredits(Store_GetClientAccountID(client), points);
	PrintToChatAll("%s Got %i credits for winning!", STORE_PREFIX, points);
}

Last edited by eXemplar; 05-24-2013 at 04:08.
eXemplar is offline
Sketchy
Senior Member
Join Date: Nov 2010
Old 05-26-2013 , 00:51   Re: [Store] Kill Awards
Reply With Quote #19

works like a charm, thanx!
Sketchy is offline
fireblade212
Member
Join Date: Mar 2008
Old 09-01-2013 , 18:25   Re: [Store] Kill Awards
Reply With Quote #20

Works nicely! But can i get a cvar to ignore bot kills?
fireblade212 is offline
Reply


Thread Tools
Display Modes

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 02:44.


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