AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   VIP Objective Balance (https://forums.alliedmods.net/showthread.php?t=166894)

MPNumB 09-09-2011 06:34

VIP Objective Balance
 
2 Attachment(s)
Description:
For long time, VIP objectives aren't played on most of the servers. Reason for that is very simple - no body wants to be a CT and risk becoming a VIP, cause if you'r a VIP, you have a huge disadvantage in almost every aspect you can think of. Especially on public servers it's "every man for himself", so VIPs must learn on how not to rely on their team mates. And what about aspect of when you become a VIP - you loose all your weapons on what you were saving so hard... Well, not any more, this plugin introduces at least some amount of balance into the game, allowing VIP to stand up and fight for himself. Here's what this plugin does:
  1. When becoming a VIP, you receive money for all of the items you had a moment ago.
  2. Once becoming a VIP you receive more useful weapons. What they are is based on round number and mp_startmoney with vip_cash_count, or simply by vip_cash_count and check how much money VIP has.
  3. When VIP escapes, the model animation is changed, so everyone would understand, that you cannot damage nor kill the VIP. Also when rescued, VIP move-ability is disabled until new round.

Requires:
CStrike
FakeMeta
HamSandWich


Cvars:

* "vip_cash_count" - what weapons VIP should get.
- positive number - cash value removed from VIP for next level weapons.
- "1675" - default.
- "0" - always the best.
- negative number - round count system with startmoney*-1 check.


Additional info:
Tested in Counter-Strike 1.6 with amxmodx 1.8.2 (dev build hg21). You may also download as_tundra map what I've also included in the downloads. There are 3 VIP weapon levels. First one gives 200 armor, p228 with 26 extra bullets, and 1 flash grenade. Second one gives 250 armor, usp with 24 extra bullets, tmp with 30 extra bullets, and 2 flash grenades. Third one gives 250 armor with helmet, deagle with 21 extra bullets, mp5 with 60 extra bullets, 2 flash grenades, and 1 smoke grenade.


Notes:
Map as_tundra is one of default Counter-Strike maps, what was removed in update from CS1.5 to CS1.6. I am allowed to post this, not only cause CS1.5 was a free-mod, what everyone could download and use files out of it, but also cause the same files exist in Counter-Strike 1.5 for steam what is also free to download and is posted somewhere in steam forums by VALVe/Steam admins.


Change-Log:

* 1.5
- Changed: VIP weapons.
- Changed: Check what gives weapons to the VIP.

* 1.4
- Fixed: Error "invalid player index".

* 1.3
- Changed: Less CPU usage when becoming a VIP.

* 1.2
- Added: VIPs now get flashbangs and smoke-grenades (depends on startmoney and round #).
- Fixed: Now bullets within the clip are counted for weapon refund as well.

* 1.1
- Changed: Improved performance by removing "is_user_connected()".
- Changed: Improved performance by modifying "is_user_alive()" check.
- Changed: Removed message of money restored - instead given money flashes on the HUD.

* 1.0
- First release.

DeLiriuM 09-09-2011 06:57

Re: VIP Objective Balance
 
Yet another brilliant plugin from you :)

MostwantedScript 09-09-2011 10:06

Re: VIP Objective Balance
 
Looks great

FOUTA 09-10-2011 00:05

Re: VIP Objective Balance
 
Thanks dude, excellent plugin
i will be sure to use it :P

ConnorMcLeod 09-10-2011 03:51

Re: VIP Objective Balance
 
as_tundra is avalaible on any map site, you don't need to justify yourself ;)

MPNumB 09-10-2011 04:26

Re: VIP Objective Balance
 
Quote:

Originally Posted by ConnorMcLeod (Post 1551975)
as_tundra is avalaible on any map site, you don't need to justify yourself ;)

Well, I told it just in case - I remember there were long and useless discussions about this, in some similar case scenario. So like I said, just in case... :D But also I uploaded it, with few tweaks: Added radar overview what I had found somewhere (took some time to find it actually), and added a ".res" file, making sure that ".wad", map description, and overview files will be uploaded on the client. :)

bibu 09-10-2011 07:30

Re: VIP Objective Balance
 
Good job, I wonder how the animation looks.

However, can't this two checks simple changed to this:

PHP Code:

if( !is_user_connected(iPlrId) || !is_user_alive(iPlrId

->

PHP Code:

if( !is_user_alive(iPlrId

And also "give_item" from fun should be used instead.

MPNumB 09-10-2011 09:05

Re: VIP Objective Balance
 
Quote:

Originally Posted by bibu (Post 1552089)
Good job, I wonder how the animation looks.

However, can't this two checks simple changed to this:

PHP Code:

if( !is_user_connected(iPlrId) || !is_user_alive(iPlrId

->

PHP Code:

if( !is_user_alive(iPlrId

And also "give_item" from fun should be used instead.

In my tests when using is_user_alive() only, I had some error when player was joining, therefor included is_user_connected() also.

And from fun give_item() - it doesn't work for VIPs on primary weapons.

Animation is matrix-jump one. Here's an example in youtube what I've found: http://www.youtube.com/watch?v=6mHw_nZY7Ko

vaan123 09-10-2011 15:25

Re: VIP Objective Balance
 
nice plugin, well done :p

Arkshine 09-11-2011 11:36

Re: VIP Objective Balance
 
Quote:

Originally Posted by MPNumB (Post 1552168)
In my tests when using is_user_alive() only, I had some error when player was joining, therefor included is_user_connected() also.

Your test was wrong so.


PHP Code:

static cell AMX_NATIVE_CALL is_user_connected(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
        return 
0;
    
    
CPlayerpPlayer GET_PLAYER_POINTER_I(index);
    
    return (
pPlayer->ingame 0);


PHP Code:

static cell AMX_NATIVE_CALL is_user_alive(AMX *amxcell *params/* 1 param */
{
    
int index params[1];
    
    if (
index || index gpGlobals->maxClients)
    {
        return 
0;
    }
    
    
CPlayerpPlayer GET_PLAYER_POINTER_I(index);

    if (
g_bmod_tfc)
    {
        
edict_t *pPlayer->pEdict;
        if (
e->v.flags FL_SPECTATOR || 
            (!
e->v.team || !e->v.playerclass))
        {
            return 
0;
        }
    }
    
    return ((
pPlayer->ingame && pPlayer->IsAlive()) ? 0);


pPlayer->ingame is used in both, thus is_user_alive is enough.


All times are GMT -4. The time now is 07:10.

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