Raised This Month: $79 Target: $400
 19% 

Parachute 1.3 (KRoTaL)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   Emp` (115)
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 01-10-2007 , 22:12   Parachute 1.3 (KRoTaL)
Reply With Quote #1

This should work on ANY Mod. Let me know if you have problems. Conversion to FAKEMETA will be coming eventually.

Press your +USE Button (defaulted to "e") to use the parachute.

Code:
 
  Parachute
  Version: 1.3
  Author: KRoTaL/JTP10181
  0.1    Release
  0.1.1  Players can't buy a parachute if they already own one
  0.1.2  Release for AMX MOD X
  0.1.3  Minor changes
  0.1.4  Players lose their parachute if they die
  0.1.5  Added amx_parachute cvar
  0.1.6  Changed set_origin to movetype_follow (you won't see your own parachute)
  0.1.7  Added amx_parachute <name> | admins with admin level a get a free parachute
  0.1.8  JTP - Cleaned up code, fixed runtime error
  1.0    JTP - Should be final version, made it work on basically any mod
  1.1    JTP - Added Changes from AMX Version 0.1.8
               Added say give_parachute and parachute_fallspeed cvar
               Plays the release animation when you touch the ground
               Added chat responder for automatic help
  1.2    JTP - Added cvar to disable the detach animation
               Redid animation code to improve organization
               Force "walk" animation on players when falling
               Change users gravity when falling to avoid choppiness
  1.3    JTP - Upgraded to pCVARs
 
 
  Commands:
 
 say buy_parachute   -   buys a parachute (CStrike ONLY)
 
 saw sell_parachute  -   sells your parachute (75% of the purchase price)
 
 say give_parachute <nick, #userid or @team>  -  gives your parachute to the player
 
 amx_parachute <nick, #userid or @team>  -  gives a player a free parachute (CStrike ONLY)
 
 amx_parachute @all  -  gives everyone a free parachute (CStrike ONLY)
 
  Cvars:
 sv_parachute "1"   - 0: disables the plugin - 1: enables the plugin
 
 parachute_cost "1000"  - cost of the parachute (CStrike ONLY)
 
 parachute_payback "75"  - how many percent of the parachute cost you get when you sell your parachute (ie. (75/100) * 1000 = 750$)
 
 parachute_fallspeed "100" - speed of the fall when you use the parachute
Attached Files
File Type: sma Get Plugin or Get Source (amx_parachute.sma - 160631 views - 13.4 KB)
File Type: zip parachute_model.zip (64.1 KB, 99573 views)
__________________

Last edited by jtp10181; 01-10-2007 at 22:14.
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
VEN
Veteran Member
Join Date: Jan 2005
Old 01-11-2007 , 09:59   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #2

Is there any specific reason for not using the PCvar system for all possible cases?

Also instead of reindexing the same array numerous times you could just cache the value of the given array element.
VEN is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 01-11-2007 , 10:05   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #3

Nice JTP! I was using the old one on my server, so this is perfect
Deviance is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-11-2007 , 20:26   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #4

There's no reason to make a fakemeta version. If you really want to, go ahead, but I can't see any reason for it.

Please do as VEN said, but for now I'm approving this.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-11-2007 , 21:32   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #5

Jtp,

Can you add please this :

- parachute_free <1|0> ; Free Parachute is given to each round on all players.
- parachute_sound <1|0> ; Give the possibility of adding a custom sound when one falls with the parachute (I don't know what is the best way to add a sound easily (define ? file ? cetera) ; also I attach an example)


Thanks in advance
Attached Files
File Type: rar erriewind.rar (54.2 KB, 7026 views)
__________________

Last edited by Arkshine; 01-11-2007 at 21:41.
Arkshine is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 01-11-2007 , 23:27   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #6

Quote:
Originally Posted by arkshine View Post
Can you add please this :

- parachute_free <1|0> ; Free Parachute is given to each round on all players.
Set parachute_cost to 0 and gives free each spawn. (no need for an extra cvar to give it for free)

Also, admins with correct access level get it free each spawn aswell (though I think this should be optional as well):
#define PARACHUTE_LEVEL ADMIN_LEVEL_A

Last edited by vittu; 01-11-2007 at 23:40.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Trent-Resnor
Member
Join Date: Jan 2007
Location: Ontario, Canada
Old 01-11-2007 , 23:29   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #7

Great plugin! +karma
__________________
Trent-Resnor is offline
Send a message via MSN to Trent-Resnor
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 01-11-2007 , 23:40   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #8

Quote:
Originally Posted by VEN View Post
Is there any specific reason for not using the PCvar system for all possible cases?

Also instead of reindexing the same array numerous times you could just cache the value of the given array element.
Don't really know what you are talking about, can you be more specific? Reference line numbers or something.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
jim_yang
Veteran Member
Join Date: Aug 2006
Old 01-11-2007 , 23:52   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #9

i guess he means
Code:
new players[32], num
get_players(players, num)
for(new i; i<num; i++)
{
    get_user_name(players[i], ...)
    get_user_team(players[i], ...)
    get_user_ping(players[i], ...)
}
you can use a variable cache players[i]
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 01-12-2007 , 00:06   Re: Parachute 1.3 (KRoTaL)
Reply With Quote #10

Quote:
Originally Posted by jim_yang View Post
i guess he means
Code:
new players[32], num
get_players(players, num)
for(new i; i<num; i++)
{
    get_user_name(players[i], ...)
    get_user_team(players[i], ...)
    get_user_ping(players[i], ...)
}
you can use a variable cache players[i]
Did you even look in the code? I'm sure jtp knows what caching is.

I'm sure ven meant well but I'm guess he only glanced at the code. Seeing as this is completely valid (as it's not used numerous times no reason to cache it):
Code:
		for(new a = 0; a < inum; a++) {
			has_parachute[players[a]] = true
		}
and the cvars not using pcvar are not the plugins cvars or are string cvars... Unless he means something else that I don't see and as jtp basically said "where?" not what...

Last edited by vittu; 01-12-2007 at 00:08.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
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 20:14.


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