Raised This Month: $32 Target: $400
 8% 

SpeedUP .:Movementspeed adjuster:.


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   VEN (29)
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 09:27   SpeedUP .:Movementspeed adjuster:.
Reply With Quote #1

SpeedUP - Movementspeed adjuster
.
.

Quote:
/********************************************* *************************************
* Author: regalis ([email protected])
*
* Version: 1.1
*
* Description:
* -SpeedUP is a plugin that changes the movement speed for your players.
* -There can be any Speedvalue between 0 and 2000!
* -It emulates stop emitting the footstep sound while walking.(which is normaly done by the HL-engine)
* That means you can sneak around corners despite the amazing speed ;)
* -There is a Digital speed-meter on top of the screen which shows the current speed in px/s (pixel/second)
* NEW-Now i have added an special effect:
* You can choose between "fire" or "smoke" which will follow you while running at highspeed
*
*
* Requirements:
* -Fun-Modul
* -Fakemeta-Modul
*
*
* Admin-Commands:
* -amx_speedup_toggle - Toggles SpeedUP ON|OFF
* -amx_speedup_value <speed> - Changes the Speed for the players. (Values are available from 0 to 2000)
* -amx_speedup_bar - Toggles the appearance of the SpeedUP-Bar on the top of the screen ON|OFF
* -amx_speedup_trail - Toggles the SpeedUP-Trail ON|OFF
* -amx_speedup_sprite - Toggles the SpeedUP-Trail-Sprite between FIRE|SMOKE
*
*
*
* CVARS:
* -amx_speedup 0|1 (Default: 1)
* -amx_speedvalue 0 - 2000 (Default: 250)
* "0" means no movement.
* "250" is standard speed. ("500" is a good amount to be able to play at)
* -amx_speedbar 0|1 (Default: 1)
* -amx_speedtrail 0|1 (Default: 1)
* -amx_speedsprite 0|1 (Default: 1)
*
*
* Changelog:
* V0.1
* !Changed "for(new i=1;i<=get_maxplayers();i++)" to "get_players"
* !Changed "set_cvar_num" to "set_pcvar_num"
* +Added weapon based variation of speed (awp is slower than knife)
* +Rewritten hole code because some strange behavior
*
* V0.2
* !Fixed a Bug checking if switched weapon is active
* !Fixed the Bug where sometimes at roundstart the speed wasn't set before weaponswitch
*
* V0.3
* !Fixed various problems encountered by VEN
* !Fixed a bug that when a round_starts sometimes the players had default speed instead of the speedvalue
*
* V0.4
* +Added a routine which checks if the player is walking (+speed) or running and emits the footprintsound or not
* +Added Plugin-Version as CVAR
*
* V0.5
* +Added a Speed-Bar which displays the current speed to the player (cvar and admincommand for this feature is also implemented)
*
* V0.6
* !Fixed some minor bugs
* !Changed indentiation
* !Fixed serious bug which doesn't allow the freezetime at new_round
* +Added SpeedUP-Trail: Choose between FIRE or SMOKE which follow you as a trail while running at highspeed
*
* V0.6.1
* !Fixed a little bug with postition of special efx when stop running and continue running...
* !Fixed another bug with amx_speedup_sprite toggle...expected too much parameter for that toggle
*
* V0.7
* !Fixed a bug with playercount
* +Optimized the freezetime detection routine
*
* V1.0
* !Fixed a minor bug
* @Got approved and therefore changed Version to 1.0
*
* V1.1
* !Fixed a bug within deathmatch..if you respawned without a weapon the speed didn't changed--fixed
*
*
* Known Bugs:
* -NONE- as always ;)
*
*
* TODO:
* I thought about a bunnyhop feature...
* Adding possibility to switch modes between (instant on and on while key press)
* Adding a feature where the Field of View is changed upon an given speed(this is harder than i have thought)
* maybe someone make a suggestion for a feature!?
*
*
* Credits:
* p3tsin: For his codesniped in http://forums.alliedmods.net/showpos...5&postcount=10 (helped alot making "walking" possible)
* v3x & jtp10181: For their codesnipeds in http://forums.alliedmods.net/showthread.php?t=23942 (helped optimizing my plugin)
* VEN & emp`: For their suggestions and advice in my thread (helped clean up my code and learn to optimize it)
* and especially VEN for his TUTORIAL: http://forums.alliedmods.net/showthread.php?t=42159
* Bahrmanou: For his "plugin_trail.amxx" which gave me lots of hints how to do a trail
Prowler: For this nice thread: http://forums.alliedmods.net/showthread.php?t=31682
* http://wiki.alliedmods.net/Main_Page
* http://www.amxmodx.org/doc/
*
********************************************* **************************************/
.
.
!! FUN-Module required !!
!! FAKEMETA-Module required !!


If anyone does find a bug, let me know!

greetz regalis
.
Below is the sprite.zip which contains the two used sprites, for the smoke/dust-effekt and the fire sprite.
All views: ~372 times
Attached Files
File Type: zip sprites.zip (53.8 KB, 4115 views)
File Type: sma Get Plugin or Get Source (SpeedUP.sma - 6813 views - 21.1 KB)
__________________

Last edited by regalis; 06-01-2007 at 17:52. Reason: Version 1.1 uploaded - bug in deathmatch fixed
regalis is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-07-2007 , 10:33   Re: SpeedUP - Change movement speed for the players
Reply With Quote #2

There's this plugin, but it was moved to old/unapproved:

http://forums.alliedmods.net/showthread.php?t=10770

Also a tweak of above plugin I made so it works in ESF:

http://forums.alliedmods.net/showthr...550#post112550

Did you check if any of the existing plugins do the same?

http://forums.alliedmods.net/showthread.php?p=250982
http://forums.alliedmods.net/showthread.php?p=175049
http://forums.alliedmods.net/showthread.php?p=64730
http://forums.alliedmods.net/showthread.php?p=33745
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-07-2007 at 10:36.
pizzahut is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 11:22   Re: SpeedUP - Change movement speed for the players
Reply With Quote #3

Quote:
Originally Posted by pizzahut View Post
There's this plugin, but it was moved to old/unapproved:

http://forums.alliedmods.net/showthread.php?t=10770

Also a tweak of above plugin I made so it works in ESF:

http://forums.alliedmods.net/showthr...550#post112550
This Plugin have no CVARS.
To set an movement speed to the players an Admin have to enable it everytime...


Admin Speed v1.1 ( set user max speed ) is nearly the same (he uses percentage of Speed i use the speed value.. )
*edit* Tested Admin Speed v1.1 and it does not work correct! You can not disable the speed or set it back to standard value*edit*

Hmm...i searched for "Speed" but only found the Legal Speed Hack by GHW_chronic
Thats the reason of creating a CVAR based plugin to set the movement speed for the players.
__________________

Last edited by regalis; 04-07-2007 at 11:43. Reason: Just testet other Plugin and it doesnt work..
regalis is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 04-07-2007 , 13:01   Re: SpeedUP - Change movement speed for the players
Reply With Quote #4

okay...

why are you registering cvars in plugin_precache

don't do for(new i=1;i<=get_maxplayers();i++), use get_players

use set_pcvar_num

look here http://forums.alliedmods.net/showthr...210#post308210. not all weapons have the same weapon speed. (you plugin will be making players with awps run the same speed as players with knife)
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`
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 13:48   Re: SpeedUP - Change movement speed for the players
Reply With Quote #5

Quote:
Originally Posted by Emp` View Post
okay...

why are you registering cvars in plugin_precache
I'm a noob
I think i'm copied too much ;)

Quote:
Originally Posted by Emp` View Post
don't do for(new i=1;i<=get_maxplayers();i++), use get_players

use set_pcvar_num
Ok, i'll change this

Quote:
Originally Posted by Emp` View Post
look here http://forums.alliedmods.net/showthr...210#post308210. not all weapons have the same weapon speed. (you plugin will be making players with awps run the same speed as players with knife)
Interesting!
I'll work with that and try to find a solution...

Thanks for looking over the code and giving me advice,
greetz regalis
__________________
regalis is offline
Old 04-07-2007, 15:24
Angelina
This message has been deleted by Angelina.
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-07-2007 , 15:56   Re: SpeedUP - Change movement speed for the players
Reply With Quote #6

No, here you need no activation key...the speed is turned on all the time (if it is enabled)
__________________
regalis is offline
godlike
Senior Member
Join Date: Apr 2005
Old 04-08-2007 , 08:09   Re: SpeedUP - Change movement speed for the players
Reply With Quote #7

i have no idea why you use the <geoip> module.

It compiles fine without it.Also place in your thread that the fun module is required.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me

Last edited by godlike; 04-08-2007 at 08:11.
godlike is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-08-2007 , 08:56   Re: SpeedUP - Change movement speed for the players
Reply With Quote #8

Ops, i have made this uppon a request and i know the one which need this and he also needs a plugin which shows the country from people connecting...
I have forgotten to remove this include ;)

Ok, i'll place the fun module requirement in the thread

Thank you for the info about that!

greetz regalis
__________________
regalis is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-09-2007 , 15:23   Re: SpeedUP - Change movement speed for the players
Reply With Quote #9

I have rewritten the entire code and optimized some little things...

*edit* Fixed all bugs *edit*

greetz regalis
__________________

Last edited by regalis; 04-09-2007 at 20:16. Reason: Fixed all known bugs...
regalis is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-12-2007 , 14:40   Re: SpeedUP - Change movement speed for the players
Reply With Quote #10

Quote:
server_cmd("sv_maxspeed 10000")
FYI: You could use set_cvar_num for that. Not a big deal but since this is a CVar why use a command native.

Quote:
set_task(0.2, "give_speed", 0, param, 2, "a", 1)
Do you realize what does this mean?

Fix your indentation.

Filter out dead players with get_players native flags instead of looping is_user_alive().

I do not see why would you need to hook round start event. HUD reset should be enough.

Do not hardcode CSW_* constants.

You shouldn't use the same param array for every player. Often that value will be overwriten.

Too many issues. Unapproved. Learn more about amxx scripting before you going to release something else.

Last edited by VEN; 04-12-2007 at 14:47.
VEN 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 02:08.


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