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

HomeFree v0.7


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Nur56
Member
Join Date: Apr 2007
Old 03-07-2009 , 10:03   HomeFree v0.7
Reply With Quote #1

HomeFree



Description

HomeFree is a plugin played on popular HnS maps where the CT's are supposed to eliminate the T's with a knife.
The T's get 1 HE grenade and the ability to fall slowly. After using SlowFall their health will be set to a number according
to their Death count and HP and it will get disabled for a period of time as well as get an extra Death in their count.

The CT's have a special knife which grants them SPRINT which lets them run at high speeds in order
to catch up. While sprinting, the CT's health will be set to 1HP. After that, they will be frozen in place and their health set to 15HP for a period of time. When they're unfrozen their health will be set to a number according to their Death count and HP. They will also get 1 additional Death. As a reward, when any player gets a kill he will get a bonus of 10HP.



cVars

home_enabled
<1/0> Enables or disables the plugin.
home_fspeed
<n> Fall speed for SlowFall, defaults 150.
home_mspeed
<n> Sprint Speed, this changes sv_maxspeed as well, defaults 340.
home_freeze
<n> How long CT freezes for after sprint, defaults 5.
home_stimer
<n> How long until T can use SlowFall after using, defaults 10.

Includes
Code:
amxmodx
amxmisc
cstrike
engine
fun
fakemeta
hamsandwich
Changes


Code:
v0.5: -Complete recode.


v0.6: -Removed PreThink for most things except parachute added +homefree
      -Used Ham_Spawn

v0.7: -Optimized code
      -Changed how CT's freeze
      -Changed how T's SlowFall
      -Added timer

Known Bugs
Code:
None!

Credits

Code:
Maker of ColorChat Module.
The maker of PARACHUTE for his velocity algorithm[re-wrote some of it but same idea].
Arkshine for directing me to optimize my code
Attached Files
File Type: sma Get Plugin or Get Source (HomeFree.sma - 849 views - 16.1 KB)

Last edited by Nur56; 10-03-2011 at 16:39.
Nur56 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-07-2009 , 10:21   Re: HomeFree
Reply With Quote #2

Code:
forward_return( FMV_STRING, "Awesome")


By the way :

- Use Pcvars
- Use get_players()
- You should remove GameDesc because for such small and common plugin...
- Use some white space it doesn't hurt.

Last edited by Arkshine; 03-07-2009 at 10:26.
Arkshine is offline
Old 03-07-2009, 10:21
ConnorMcLeod
This message has been deleted by ConnorMcLeod. Reason: beaten
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 03-07-2009 , 10:23   Re: HomeFree
Reply With Quote #3

You could you ony FM.
__________________

anakin_cstrike is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-07-2009 , 10:45   Re: HomeFree
Reply With Quote #4

How about an explanation of what the plugin actually does. Or is it just me? :-B
__________________
Bugsy is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-07-2009 , 10:46   Re: HomeFree
Reply With Quote #5

Just a question, what is "Home Free" ?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-07-2009 , 10:46   Re: HomeFree
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
How about an explanation of what the plugin actually does. Or is it just me? :-B
I'm with you
BOYSplayCS is offline
Old 03-07-2009, 10:57
Nur56
This message has been deleted by Nur56.
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 03-07-2009 , 11:00   Re: HomeFree
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
How about an explanation of what the plugin actually does. Or is it just me? :-B
Or me
__________________

anakin_cstrike is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-07-2009 , 11:02   Re: HomeFree
Reply With Quote #8

You should neaten up your original post if you plan on approval. Look through the approved plugins section and follow a similar format. The more info you provide about the functionality of your plugin the better.

White space is just empty spaces. Use it to space out your code a bit to make it more readable. It will not affect your code size at compile as the compiler ignores it.

ie.
PHP Code:
if(a==3)
       
set_task(0.1,"function",id)

//would be

if ( == )
        
set_task 0.1 "function" ,  id 
__________________
Bugsy is offline
Old 03-07-2009, 12:32
Nur56
This message has been deleted by Nur56.
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 03-07-2009 , 14:13   Re: HomeFree
Reply With Quote #9

yu dont need the parachute model?
letgoofmyeggs is offline
Old 03-07-2009, 17:14
Nur56
This message has been deleted by Nur56.
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-07-2009 , 17:49   Re: HomeFree
Reply With Quote #10

Nice idea but there are still some things that you should rework a bit.

Firstly I would suggest to include the colorchat stuff directly into your plugins base code rather than including it. This way people are able to use the online compiler, generally a nice thing to have. You should also credit the authors of the colorchat function I suppose.

You also have to convert all cvars to pcvars. You could use get_cvar_pointer to apply this for the sv_maxspeed cvar, too.

Another thing I see is that you hook the DeathMsg event but do not provide the appropriate function. I believe it will therefore throw an error in plugin_init and maybe even stops it from registering the GameDesc forward.

Lastly, as previously mentioned, it would be neat if you could do the entire thing with fakemeta only to get rid of the fun and engine require.


Hope this helped
__________________
In Flames we trust!

Last edited by Nextra; 03-17-2009 at 15:48.
Nextra is offline
Old 03-08-2009, 04:34
Nur56
This message has been deleted by Nur56.
Reply



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 03:48.


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