Change Points Awarded
How do I change the points awarded via a CS:S plugin? I want to give the entire team 1 point for a bomb detonation (including the player that planted the bomb) and the entire losing team -1 point. How would I do this?
|
Re: Change Points Awarded
Doesn't anyone have an answer for this one way or the other?
|
Re: Change Points Awarded
You have to find the CTeam instances for the teams and then you would use team->SetScore(team->GetScore()+1);
Here's what I've used to get the team: Code:
CTeam * CPlugin::GetATeam( int teamNum ) { |
Re: Change Points Awarded
Excellent, thanks Keeper! How would I prevent the bomb planter from getting the 3 extra points? I want the whole team to receive the same 1 point.
|
Re: Change Points Awarded
There you would have to get the address for his score and on the bomb planting event remove 3 points.
|
Re: Change Points Awarded
Then I guess my question would be... How do you remove 3 points on the bomb planting event?
|
Re: Change Points Awarded
I'd look here for help on that...http://forums.alliedmods.net/showpos...71&postcount=4
Dunno what you'd want to search for tho, maybe m_iScore or m_iFrags? |
Re: Change Points Awarded
I have a rookie question about your code example. How do I reference the CTeam class? When I add
#include "team.h" to my plugin solution I get a lot of compile errors. [IMG]http://img190.**************/img190/4937/errorlist.jpg[/IMG] |
Re: Change Points Awarded
You need to have the following line defined before the #include "team.h"
Code:
#define GAME_DLL 1 |
Re: Change Points Awarded
I'm still getting the same errors. It doesn’t have anything to do with the fact that I’m trying to build a plugin instead of a MOD does it?
|
All times are GMT -4. The time now is 08:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.