Raised This Month: $ Target: $400
 0% 

Jetpack


Post New Thread Reply   
 
Thread Tools Display Modes
water_cat1
Member
Join Date: Mar 2010
Old 04-23-2010 , 21:47   Re: Jetpack
Reply With Quote #121

I also have the problem of the jetpack only working on the host of the local server. I guess its just the problem of a local server, along with other codes only working on me.
water_cat1 is offline
disconnect81
Senior Member
Join Date: Jul 2006
Location: Ottawa, ON, Canada
Old 05-16-2010 , 09:19   Re: Jetpack
Reply With Quote #122

Hello,

I'm trying to get this plugin to load only for specific maps and otherwise be disabled. I installed the mapconfig plugin, and put sm_jetpack 1 in config files for the maps I'd want this loaded. I have sm_jetpack 0 in the jetpack config file.

I can't seem to get this working how I'd like it, has anyone else had any luck setting this up to only run on certain maps?

Thanks

Disconnect
disconnect81 is offline
ScubaSteve3465
Senior Member
Join Date: Dec 2004
Old 05-17-2010 , 15:32   Re: Jetpack
Reply With Quote #123

I wanted to let admins be the only one aloud to use this and the cvar doesnt work, im on tf2, plus the flames from the jetpack shoots out of peoples sides not behind them
__________________
ScubaSteve3465 is offline
Dennis3090
Member
Join Date: May 2010
Old 06-14-2010 , 15:58   Re: Jetpack
Reply With Quote #124

Hello,
i have a problem with that jetpack plugin the problem is everyone can use it how can i do it that just admins can use the jetpack ?

greets,

Dennis
__________________
Dennis3090 is offline
akillercake
Junior Member
Join Date: Jul 2010
Old 08-06-2010 , 13:30   Re: Jetpack
Reply With Quote #125

Hey is it possible to make only Cts be able to use the jetpack?
akillercake is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 11-17-2010 , 10:33   Re: Jetpack
Reply With Quote #126

Quote:
Originally Posted by akillercake View Post
Hey is it possible to make only Cts be able to use the jetpack?
Set sm_jetpack_team to 3
naris is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 11-17-2010 , 10:33   Re: Jetpack
Reply With Quote #127

Quote:
Originally Posted by Dennis3090 View Post
how can i do it that just admins can use the jetpack ?
Set sm_jetpack_adminonly to 1
naris is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 11-17-2010 , 10:40   Re: Jetpack
Reply With Quote #128

I have modifed the jetpack plugin again to have variable fuel consumption depending on class (for TF2 and DoD). I also added the rockettrail effect for TF2.

So now it is:

This plugin adds a 'jetpack' which allows players to fly around the map by binding a key to +jetpack.

CVARS:
  • sm_jetpack
    • Enables/disables this plugin
    • Default: "1"
  • sm_jetpack_adminonly
    • Only allows admins to have jetpacks?
    • Default: "0"
  • sm_jetpack_team
    • team restriction (0=all use, 2 or 3 to only allowed specified team to have a jetpack
    • Default: "0"
  • sm_jetpack_onspawn
    • Give players a jetpack when they spawn?
    • Default: "1"
  • sm_jetpack_announce
    • This will enable announcements that jetpacks are available
    • Default: "0"
  • sm_jetpack_start_sound
    • Jetpack start sound file
    • Default: ""
    • TF2 Default: "weapons/flame_thrower_airblast.wav"
  • sm_jetpack_stop_sound
    • Jetpack stop sound file
    • Default: ""
    • TF2 Default: "weapons/flame_thrower_end.wav"
  • sm_jetpack_loop_sound
    • Jetpack loop sound file
    • Default: "vehicles/airboat/fan_blade_fullthrottle_loop1.wav"
    • TF2 Default: "weapons/flame_thrower_loop.wav"
  • sm_jetpack_empty_sound
    • Jetpack empty sound file
    • Default: "common/bugreporter_failed.wav"
    • TF2 Default: "weapons/syringegun_reload_air2.wav"
  • sm_jetpack_refuel_sound
    • Jetpack refuel sound file
    • Default: "hl1/fvox/activated.wav"
  • sm_jetpack_volume
    • Jetpack sound volume
    • Default: "0.5"
  • sm_jetpack_speed
    • Jetpack speed
    • Velocity.z that will be added each "jetpack frame"
    • Default: "100"
  • sm_jetpack_gravity
    • Set to 1 to have gravity affect the jetpack (MOVETYPE_FLYGRAVITY), 0 for no gravity (MOVETYPE_FLY).
    • Default: "1"
  • sm_jetpack_fuel
    • Jetpack fuel
    • Amount of fuel to start with (-1 == unlimited)
    • Default: "-1"
  • sm_jetpack_max_refuels
    • Number of times the jetpack can be refueled (-1 == unlimited)
    • Default: "-1"
  • sm_jetpack_refueling_time
    • Amount of time to wait before refueling
    • Default: "30.0"

TF2 CVARS:
  • sm_jetpack_noflag
    • Prevent TF2 flag carrier from using the jetpack?
    • Default: "1"
  • sm_jetpack_rate_scout
    • Rate at which the jetpack consumes fuel for scouts
    • Default: "1"
  • sm_jetpack_rate_sniper
    • Rate at which the jetpack consumes fuel for snipers
    • Default: "1"
  • sm_jetpack_rate_soldier
    • Rate at which the jetpack consumes fuel for soldiers
    • Default: "1"
  • sm_jetpack_rate_demo
    • Rate at which the jetpack consumes fuel for demo men
    • Default: "1"
  • sm_jetpack_rate_medic
    • Rate at which the jetpack consumes fuel for medics
    • Default: "1"
  • sm_jetpack_rate_heavy
    • Rate at which the jetpack consumes fuel for heavys
    • Default: "2"
  • sm_jetpack_rate_pyro
    • Rate at which the jetpack consumes fuel for pyros
    • Default: "1"
  • sm_jetpack_rate_spy
    • Rate at which the jetpack consumes fuel for spys
    • Default: "1"
  • sm_jetpack_rate_engineer
    • Rate at which the jetpack consumes fuel for engineers
    • Default: "1"

DOD CVARS:
  • sm_jetpack_rate_rifleman
    • Rate at which the jetpack consumes fuel for riflemen
    • Default: "1"
  • sm_jetpack_rate_assault
    • Rate at which the jetpack consumes fuel for assault
    • Default: "1"
  • sm_jetpack_rate_support
    • Rate at which the jetpack consumes fuel for support
    • Default: "1"
  • sm_jetpack_rate_sniper
    • Rate at which the jetpack consumes fuel for snipers
    • Default: "1"
  • sm_jetpack_rate_mg_type
    • Rate at which the jetpack consumes fuel for machine gunners
    • Default: "2"
  • sm_jetpack_rate_rocket
    • Rate at which the jetpack consumes fuel for rocket men
    • Default: "1"

OTHER MODS CVAR:
  • sm_jetpack_rate
    • Rate at which the jetpack consumes fuel
    • Default: "1"


Native Interface:
PHP Code:
/**
 * Assume control of the Jetpack plugin
 *
 * @param plugin_only     Set to 1 to assume complete control of the jetpack.
 * @param announce         Announce status changes to the player.
 * @return                none
 */
native ControlJetpack(bool:plugin_only=true);

/**
 * Get the jetpack indicator of the player
 *
 * @param index     Client index
 * @return            true if the player has a jetpack
 */
native bool:HasJetpack(client);

/**
 * Returns if the player's jetpack is on
 *
 * @param index     Client index
 * @return            true if the player's jetpack is on
 */
native bool:IsJetpackOn(client);

/**
 * Get the jetpack fuel amount of the player
 *
 * @param index     Client index
 * @return            amount of fuel the jetpack has
 */
native GetJetpackFuel(client);

/**
 * Get the fuel consumption rate for the jetpack of the player
 *
 * @param index     Client index
 * @return            Rate at which the jetpack consumes fuel
 */
native GetJetpackRate(client);

/**
 * Get the refueling time for the jetpack of the player
 *
 * @param index     Client index
 * @return            Refueling time for the jetpack
 */
native Float:GetJetpackRefuelingTime(client);

/**
 * Set fuel for the jetpack of the player
 *
 * @param index     Client index
 * @param fuel         Amount of fuel for the jetpack (-1 == infinate)
 * @param refuels    Number of times the jetpack can be refueled (-1 == infinate)
 * @return            none
 */
native SetJetpackFuel(clientfuel=-1refuels=-1);

/**
 * Set the fuel consumption rate for the jetpack of the player
 *
 * @param index     Client index
 * @param rate      Rate at which the jetpack consumes fuel (-1 == use class convars)
 * @return            none
 */
native SetJetpackRate(clientrate=-1);

/**
 * Set the refueling time for the jetpack of the player
 *
 * @param index     Client index
 * @param time         Refueling time for the jetpack
 * @return            none
 */
native SetJetpackRefuelingTime(clientFloat:fuel);

/**
 * Give a jetpack to the player
 *
 * @param index             Client index
 * @param fuel                 Amount of fuel for the jetpack (-1 == infinate)
 * @param refueling_time    Refueling time for the jetpack
 * @param max_refuels        Number of times the jetpack can be refueled (-1 == infinate)
 * @param rate              Rate at which the jetpack consumes fuel (per game frame)
 * @param explode           jetpack explodes on death if true
 * @param burn              jetpack burns enemies if true
 * @return                    amount of fuel the jetpack has
 */
native GiveJetpack(clientfuel=-1Float:refueling_time=0.0max_refuels=-1,
                   
rate=-1bool:explode=falsebool:burn=false);

/**
 * Take the jetpack from the player
 *
 * @param index     Client index
 * @return            none
 */
native TakeJetpack(client);

/**
 * Give jetpack fuel to the player
 *
 * @param index     Client index
 * @param fuel         Amount of fuel to add to the jetpack (-1 == infinate)
 * @param refuels    Number of refuels to add to the jetpack (-1 == infinate)
 * @return            amount of fuel the jetpack has
 */
native GiveJetpackFuel(clientfuel=-1refuels=-1);

/**
 * Take fuel from the jetpack of the player
 *
 * @param index     Client index
 * @param fuel         Amount of fuel to remove from the jetpack (-1 == all)
 * @param refuels    Number of refuels to remove from the jetpack (-1 == all)
 * @return            amount of fuel the jetpack has
 */
native TakeJetpackFuel(clientfuel=-1refuels=-1);

/**
 * Start the jetpack (bind to a keydown)
 *
 * @param index     Client index
 * @return            none
 */
native StartJetpack(client);

/**
 * Stop the jetpack (bind to a keyup)
 *
 * @param index     Client index
 * @return            none
 */
native StopJetpack(client);

/**
 * Gets called when the Jetpack is started
 *
 * @param client: The index of the client that used the jetpack.
 * @return          Plugin_Stop will prevent the jetpack from starting.
 */
forward Action:OnJetpack(client);

/**
 * Gets called when a Jetpack burns someone
 *
 * @param victim: The index of the victim to be set fire
 * @param client: The index of the client that is using the jetpack
 * @param damage: The damage to be done to the victim, can be changed.
 * @return          Plugin_Stop will prevent the jetpack from burning the victim.
 */
forward Action:OnJetpackBurn(victimclient, &damage);

/**
 * Gets called when a Jetpack explodes
 *
 * @param victim: The index of the victim of the explosion
 * @param client: The index of the client that exploded
 * @param damage: The damage to be done to the victim, can be changed.
 * @return          Plugin_Stop will prevent the jetpack from injuring the victim.
 */
forward Action:OnJetpackExplode(victimclient, &damage); 
Change log
1/3/2011 - v2.2
  • Fix refuel issues.

1/25/2011 - v2.3
  • Fixed jetpacks persisting when using convars and sm_jetpack is enabled and then disabled.
  • Fixed Fuel Rate getting set to 0, resulting in infinite fuel when using convars.
  • Fixed invalid convar handle error when a player spawns and the class isn't set (is 0) in TF2, when using convars.

6/22/2012 - v3.0
  • Added convars to allow/disallow jetpacks based on class
  • Changed jetpack to be activate by holing down JUMP (spacebar), +jetpack can still be used.
  • Added burn enemies and explode features to jetpack
  • Added burn and explode parameters to GiveJetpack()
  • Added a cookie to disable using +JUMP to activate the jetpack
  • Change GetJetpack()'s rate rate to default to -1
  • Change jetpack explode range and damage to vary depending on amount of remaining fuel.
  • Changed jetpack to create a light entity in addition to the particle effects
  • Added getref param to ztf2grabs's HasObject() native.
  • Changed jetpack to not activate if the players MoveType == MOVETYPE_NONE
  • Renamed GetJetpack() primitive to HasJetpack()
  • Added IsJetpackOn() primitive to jetpack
  • Fixed stand alone jetpack having no fuel instead of infinite fuel when sm_jetpack_fuel == -1
  • Fixed bug in jetpack when using convars to set fuel, rate and enable/disable
  • Fixed bug in jetpack when using convars to set enable/disable
  • Don't allow jetpack while taunting, dazed, cloaked, dead ringered, heavy firing or sniper zoomed.
  • Updated jetpack to use the ResourceManager
  • Changed jetpack to actually use the sm_jetpack_stop_sound
  • Added AUTO_DOWNLOAD to ResourceManger::SetupSound() to set download flag depending on if the file starts wit the name of one of the built in sound directories
  • Changed jetpack, ubershield & hgrsource to precache sounds OnConfigsExecuted().


6/26/2012 - v3.1
  • Fixed jetpack flames
  • Added OnJetpackBurn() & OnJetpackExplode() forwards
  • Added sm_jetpack_burn_range, sm_jetpack_burn_damage, sm_jetpack_explode_fuel,
  • sm_jetpack_explode_range & sm_jetpack_explode_damage convars
  • Renamed jetpack::SetMoveType() to SetMoveCollideType()
  • Changed jetpack to check SourceCraft immunities before exploding or burning enemies
  • Added damage parameter to OnJetpackBurn() & OnJetpackExplode()
  • Changed CreateFlameAttack() to call DamagePlayer() (or HurtPlayer() if available)
  • Changed jetpack to call ztf2grab::HasObject() to disallow players toting sentries and other buildings from using it.
  • Fixed Property "m_bBurning" not found errors.
Attached Files
File Type: sp Get Plugin or Get Source (jetpack.sp - 1094 views - 83.5 KB)
File Type: inc jetpack.inc (5.8 KB, 452 views)
File Type: inc gametype.inc (1.4 KB, 424 views)
File Type: inc dod.inc (2.8 KB, 459 views)
File Type: inc topmessage.inc (635 Bytes, 497 views)
File Type: inc particle.inc (9.6 KB, 409 views)
File Type: inc entlimit.inc (1.5 KB, 493 views)
File Type: inc tf2_flag.inc (918 Bytes, 505 views)

Last edited by naris; 06-26-2012 at 22:31.
naris is offline
lolmeded
New Member
Join Date: Dec 2010
Old 12-24-2010 , 21:53   Re: Jetpack
Reply With Quote #129

when i use my jetpack i cannot seem to refuel and always run out of fuel
lolmeded is offline
Zike
Junior Member
Join Date: Dec 2010
Old 12-27-2010 , 16:55   Re: Jetpack
Reply With Quote #130

Yes, unfortunately on TF2 when you get a jetpack there is no fuel attached and when you ignite it you get a message telling you that you are out of fuel...

I tried modifying every vars without luck...
Zike is offline
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 06:53.


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