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

DOD Style Reinforcements


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   GHW_Chronic (70)
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-13-2006 , 22:22   DOD Style Reinforcements
Reply With Quote #1

This basically adds DOD styled reinforcements to CS.

When your team has a dead player, a countdown will start. When the countdown reaches 0, then all the dead players on your team will be revived.

CVARS
Code:
 sv_DSR			//Turns DSR on(1) and off(0)
 sv_DSRmode		//Scenario specific reinforcements(1) and all map reinforcements(0)
					//cs_ - only cts get reinforcements
					//de_ - both teams get reinforcements
					//as_ - only ts get reinforcements
					//other - both teams get reinforcements
 sv_DSRtime		//Time it takes to start to send reinforcements
Tested on CS 1.6

Credits to Suicid3 for the suggestions
Attached Files
File Type: sma Get Plugin or Get Source (amx_dsr.sma - 3009 views - 4.3 KB)

Last edited by Emp`; 09-10-2006 at 20:05.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 03-13-2006 , 22:34  
Reply With Quote #2

I have some suggestions.

1) Instead of storing for each player if they are dead and then in the get_players for loop checking against that. Just use the flags of get_players to only get dead players. (You can also get just one team for the loop if you wanted to with the get_players() flags)
2) Take the get_cvar_num() out of the get_players for loop. Store it as a variable and use it that way. (Also look into use get_pcvar_num() it works much faster)
3) For your team message use the flags for get_players to only get a certain team
4) Shouldn't
Code:
    if(get_cvar_num("sv_DSRmode")==0)     {         g_allowDSR[1] = true         g_allowDSR[2] = true        }
be
Code:
    if(get_cvar_num("sv_DSRmode")==0)     {         g_allowDSR[1] = false         g_allowDSR[2] = false        }
5) Thats it for now.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-13-2006 , 23:04  
Reply With Quote #3

1) done
2) done i think (allowing people with 1.60 to use this because not everyone has converted to 1.70)
3) done
4) no, if it is 0 then you want both teams to get reinforcements on all maps
5) oh darn...
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 03-13-2006 , 23:41  
Reply With Quote #4

Ok another little suggestion for effecieintcy.
Example of code (appears more than once)
Code:
    for ( new i = 0; i < pnum; i++ )     {         new id = players[i], team = get_user_team(id)
instead of having new vars in each iteration of the for loop use
Code:
    new id , team     for ( new i = 0; i < pnum; i++ )     {         id = players[i]         team = get_user_team(id)

[EDIT] Other than that just going to wait for user response before approving.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Pop
Member
Join Date: Mar 2006
Old 03-16-2006 , 15:21  
Reply With Quote #5

Players skins will remain after respawn.. Respawning inside of themselves? Eh, not easy to explain, but causing major lag, and it's unappealing.
Pop is offline
palehorse
Member
Join Date: Feb 2006
Location: Arkansas
Old 03-16-2006 , 17:42  
Reply With Quote #6

yea, thats wish that was fixed.

also it seems to countdown replacements when there is noone dead.

other than that I love it and it would immediately go on my server for about 1/2 the maps.

Hope this one gets fixed up asap.

Thanks.
palehorse is offline
bmxer4lyfe
Junior Member
Join Date: Aug 2005
Location: Canada eh
Old 03-16-2006 , 17:48  
Reply With Quote #7

Screenshot:

http://i7.photobucket.com/albums/y28...nforcement.jpg

Thats about after 10 minutes of play.
bmxer4lyfe is offline
Send a message via AIM to bmxer4lyfe
Pop
Member
Join Date: Mar 2006
Old 03-16-2006 , 18:25  
Reply With Quote #8

Quote:
Originally Posted by bmxer4lyfe
Screenshot:

http://i7.photobucket.com/albums/y28...nforcement.jpg

Thats about after 10 minutes of play.
Exactly what it's doing.

Emp, next time test your simple plugins before sumbitting them. I rather not waste my time.
Pop is offline
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 03-16-2006 , 19:29  
Reply With Quote #9

Emp, you seem to have a REALLY good idea here, something that might completely make CS a bit more bearable for some people all over again.
Don't let Pop's comment get to you - although hes sorta right, you should test first, but still at least ur trying and getting stuff done. Please don't give up and see about getting that spawn problem fixed.
__________________
pendragon is offline
Send a message via ICQ to pendragon
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-16-2006 , 19:58   Re: DOD Style Reinforcements
Reply With Quote #10

Quote:
Originally Posted by Emp`
Tested on CS 1.6
i actually have had this on my server for a couple weeks btw.

never had that big of a problem, when i used it, there would be only about 1 fake player in the spawn per round.

i have no idea how to fix this, anyone want to tell me? ill see if T(+)rget's new way will fix it.

too da loo - heh...
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
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 06:55.


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