Raised This Month: $100 Target: $400
 25% 

Ghosts


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Hawk552 (427)
Spike7d8
Junior Member
Join Date: Jan 2008
Old 01-31-2008 , 19:00   Ghosts
Reply With Quote #1

Code:
...........     ...     ...      .........      ...........     ...........     ..........
...........     ...     ...     ...........     ...........     ...........     ..........
...             ...     ...     ...     ...     ...                 ...         ...
...             ...     ...     ...     ...     ...                 ...         ...
...  ......     ...........     ...     ...     ...........         ...         ..........
...  ......     ...........     ...     ...     ...........         ...         ..........
...     ...     ...     ...     ...     ...             ...         ...                ...
...     ...     ...     ...     ...     ...             ...         ...                ...
...........     ...     ...     ...........     ...........         ...         ..........
...........     ...     ...      .........      ...........         ...         ..........

Description:


This plugin makes players less visible as they run faster. With the default values, they will be totaly invisible if they run all the time. This plugin emphasizes the gamer's ability to use sound as a vital tool in its success.



CVARs:

ghosts_mode:
0: off (default)
1: on without glow
2: on with glow

ghosts_team:
0: both teams (default)
1: CT only
2: T only

ghosts_speed:
1 - 50: the speed above which players become totally invisible (default 20)

ghosts_glow:
0 - 100: if the player speed is below ghosts_glow / 100 of ghosts_speed, he will glow (default 25)


Change Log:
0.3a:
code optimizations (thanks Lord_Destros for pointing them out)
0.3:
added cvar ghosts_team (thanks paulg for the ideea)
modified default values of ghosts_speed and ghosts_glow
removed cstrike from include directive
0.2:
added 2 cvars (ghosts_speed & ghosts_glow)
renamed amx_ghosts to ghosts_mode
bug fix on average distance traveled
0.1:
initial release
Attached Files
File Type: sma Get Plugin or Get Source (Ghosts.sma - 9953 views - 4.1 KB)

Last edited by Spike7d8; 02-09-2008 at 16:37. Reason: plugin update
Spike7d8 is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 01-31-2008 , 19:37   Re: Ghosts
Reply With Quote #2

Sounds interesting by the description, tbh.

Will read the code and comment it better tomorrow.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
s3r
Senior Member
Join Date: Aug 2007
Old 02-01-2008 , 09:17   Re: Ghosts
Reply With Quote #3

Simple it needs something more... maybe a noclip would be good cus they are ghosts ;)
__________________
PS srr 4 strange enlish
s3r is offline
Spike7d8
Junior Member
Join Date: Jan 2008
Old 02-01-2008 , 09:41   Re: Ghosts
Reply With Quote #4

Quote:
Originally Posted by s3r View Post
Simple it needs something more... maybe a noclip would be good cus they are ghosts ;)
It's an idea, but this plugin is not meant solely for fun, but to give players a better understanding of the concept of sound. It's one to hear a player coming and move your crosshair on the direction of the sound, and other just to hear him.

Anyway, I will think at this and see if it can be implemented. My primary doubt is that players will stay inside walls and this can be very annoying.

Thanks
Spike7d8 is offline
paulg
Junior Member
Join Date: Feb 2008
Old 02-05-2008 , 14:02   Re: Ghosts
Reply With Quote #5

great plugin !! How to make that only T or CT to use???
paulg is offline
Spike7d8
Junior Member
Join Date: Jan 2008
Old 02-07-2008 , 16:11   Re: Ghosts
Reply With Quote #6

Quote:
Originally Posted by paulg View Post
great plugin !! How to make that only T or CT to use???

Now it can be done

Thanks
Spike7d8 is offline
paulg
Junior Member
Join Date: Feb 2008
Old 02-08-2008 , 16:45   Re: Ghosts
Reply With Quote #7

Quote:
Originally Posted by Spike7d8 View Post
Now it can be done

Thanks
WOW! THX!! karma +
paulg is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-08-2008 , 17:20   Re: Ghosts
Reply With Quote #8

You should use else ifs and pcvars. Your initial 4 defines are also rather redundant...
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Spike7d8
Junior Member
Join Date: Jan 2008
Old 02-09-2008 , 16:33   Re: Ghosts
Reply With Quote #9

Quote:
Originally Posted by Lord_Destros View Post
You should use else ifs and pcvars. Your initial 4 defines are also rather redundant...
Nice suggestions ! But I must say you are only 99% right . That 1% is because those else optimize the code only when an admin changes one of the 2 cvars to an invalid value, and that should not happen too often. Nevertheless, two extra else are in the code . Thanks!
Spike7d8 is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 02-10-2008 , 03:33   Re: Ghosts
Reply With Quote #10

No problem . In any case, you realize you can write
Code:
else if (speed > 50) {     speed = 50     set_pcvar_num(speed_cvar, 50) }
as
Code:
else if (speed > 50) {     speed = 50     set_pcvar_num(speed_cvar, 50) }
right?
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
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 09:08.


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