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

Real Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
eduardolucioac
Member
Join Date: Jan 2016
Old 10-09-2019 , 12:30   Real Speed
Reply With Quote #1

INTRODUCTION:
This is my first plugin. It is based on this Oxygen Bar plugin.

DESCRIPTION:
With this plugin we can set different speeds for the player (including bots) on the ground, water and stairs.

CVARS:
rs_ground_speed 200 // 0~250, 200 plugin default
rs_water_speed 120 // 0~250, 120 plugin default
rs_ladder_speed 70 // 0~250, 70 plugin default

COMMUNITY:
1 - I would like you to comment and suggest improvements to this plugin, especially in performance;
2 - This plugin causes a slight "delay" when the user is in the water and emerges. Suggestions on how to correct that "delay" are welcome.

Thanks!
Attached Files
File Type: sma Get Plugin or Get Source (real_speed.sma - 364 views - 3.8 KB)

Last edited by eduardolucioac; 10-23-2019 at 12:55.
eduardolucioac is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 10-09-2019 , 14:54   Re: Real Speed
Reply With Quote #2

You are not allowed to post .amxx files. Remove it!
__________________

Mordekay is offline
eduardolucioac
Member
Join Date: Jan 2016
Old 10-09-2019 , 15:22   Re: Real Speed
Reply With Quote #3

Quote:
Originally Posted by Mordekay View Post
You are not allowed to post .amxx files. Remove it!
Done!
eduardolucioac is offline
wilianmaique
BANNED
Join Date: Nov 2016
Old 10-09-2019 , 18:54   Re: Real Speed
Reply With Quote #4

Wouldn't it be better to use: Ham_CS_Player_ResetMaxSpeed ?
wilianmaique is offline
Send a message via Skype™ to wilianmaique
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-09-2019 , 21:56   Re: Real Speed
Reply With Quote #5

Quote:
Originally Posted by eduardolucioac View Post
INTRODUCTION:
suggest improvements
Vehicle speed control! I have a accelerometer for ejector seat.

Quote:
1 - I would like you to comment and suggest improvements to this plugin, especially in performance;
2 - This plugin causes a slight "delay" when the user is in the water and emerges. Suggestions on how to correct that "delay" are welcome.
Did you base this off the original bugged code or the version where I cleaned it up?
__________________
DJEarthQuake is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 10-10-2019 , 03:36   Re: Real Speed
Reply With Quote #6

save a tempid so you do not re-index
Code:
static i for(i = 1; i < MAXPLAYERS; i++) {             if(g_PlayerAlive[i]) {              // other codes...
----------->
Code:
static i , tempid         for(i = 1; i < MAXPLAYERS; i++) {             tempid = i             if(g_PlayerAlive[tempid]) {             // other codes...
LearninG is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-10-2019 , 16:42   Re: Real Speed
Reply With Quote #7

First of all, he shouldn't use this kind of loop, better use get_players.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
eduardolucioac
Member
Join Date: Jan 2016
Old 10-24-2019 , 12:02   Re: Real Speed
Reply With Quote #8

@DJEarthQuake

1 - About the problem...
Quote:
This plugin causes a slight \"delay"\ when the user is in the water and emerges. Suggestions on how to correct that \"delay\" are welcome.
... I disabled all plugins in...
PHP Code:
". \cstrike\addons\amxmodx\configs\plugins.ini" 
...and also disabled the oxygen_bar.amxx/O2-bar.amxx and real_speed.amxx plugins. The "delay" (in fact a slight "shudder") has continued to happen, leading me to believe that this is a problem of hl.exe itself or another component.

2 - About...
Quote:
Did you base this off the original bugged code or the version where I cleaned it up?
...real_speed was based on the latest version of oxygen_bar/O2-bar.

Thanks! =D

UPDATE:

Quote:
Originally Posted by wilianmaique View Post
Wouldn't it be better to use: Ham_CS_Player_ResetMaxSpeed ?
@wilianmaique

I think item "1" also answers your question.

Last edited by eduardolucioac; 10-25-2019 at 12:23.
eduardolucioac is offline
eduardolucioac
Member
Join Date: Jan 2016
Old 10-24-2019 , 12:53   Re: Real Speed
Reply With Quote #9

Quote:
Originally Posted by EFFx View Post
First of all, he shouldn't use this kind of loop, better use get_players.
I suppose you are talking about something about this...

PHP Code:
// Maxplayers. I like it this way, not the "new g_Maxplayers = get_maxplayers() 
// / for(i = 1; i < g_Maxplayers; i++)" way.
#define MAXPLAYERS 32 + 1 
... and this code snippet...

FURTHER: Just to better understand what kind of improvement this would bring to the code?

PHP Code:
for(1MAXPLAYERSi++) { 
Thanks!

Last edited by eduardolucioac; 10-24-2019 at 12:53.
eduardolucioac is offline
eduardolucioac
Member
Join Date: Jan 2016
Old 10-24-2019 , 12:58   Re: Real Speed
Reply With Quote #10

Quote:
Originally Posted by LearninG View Post
save a tempid so you do not re-index
Code:
static i for(i = 1; i < MAXPLAYERS; i++) {             if(g_PlayerAlive[i]) {              // other codes...
----------->
Code:
static i , tempid         for(i = 1; i < MAXPLAYERS; i++) {             tempid = i             if(g_PlayerAlive[tempid]) {             // other codes...
Thanks for the suggestion, but I really couldn't understand what kind of improvement this will bring.

Thanks!
eduardolucioac 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 07:50.


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