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

variable movement speed


Post New Thread Reply   
 
Thread Tools Display Modes
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-24-2021 , 14:16   Re: variable movement speed
Reply With Quote #11

@Natshesh thats interesting because can go beyond cl_*speed 400. Only disadventage is its called in prethink but current servers can handle it xd
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-24-2021 , 19:33   Re: variable movement speed
Reply With Quote #12

Quote:
Originally Posted by JocAnis View Post
@Natshesh thats interesting because can go beyond cl_*speed 400. Only disadventage is its called in prethink but current servers can handle it xd
I don't think the resources have ever been an issue there. The issue is that clients can't predict that so the motion will be jittery.
__________________
klippy is offline
strikevz
Junior Member
Join Date: Mar 2021
Old 03-25-2021 , 08:39   Re: variable movement speed
Reply With Quote #13

it still doesn't work, neither with both modifed versions. there are no error logs the whole day. I also deleted all the 3rd party plugins and set only the default ones&speed, still doesn't work. I get messages it changed the speed but it's the same (checked also with speedometer)

p.s. all modules enabled

Last edited by strikevz; 03-25-2021 at 08:39.
strikevz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-25-2021 , 08:57   Re: variable movement speed
Reply With Quote #14

I updated the code again, tested it and it works now.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
strikevz
Junior Member
Join Date: Mar 2021
Old 03-25-2021 , 12:54   Re: variable movement speed
Reply With Quote #15

thank you very very much, it works well. can you add the option to enable it for the whole server? like amx_speed @all value/reset

and also the speed to be set for everyone who enters the server after I set the cmd. that should be a quiet-auto-trigger every round I guess... ? I don't really know how this works
strikevz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-25-2021 , 15:10   Re: variable movement speed
Reply With Quote #16

It never ends with just one simple request. I added @all/@ct/@alive etc support. I don't feel like doing the permanent thing.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <hamsandwich> #tryinclude <cromchat> #if !defined _cromchat_included     #error "cromchat.inc" is missing in your "scripting/include" folder. Download it from: "https://amxx-bg.info/inc/" #endif #tryinclude <targetex> #if !defined _targetex_included     #error "targetex.inc" is missing in your "scripting/include" folder. Download it from: "https://forums.alliedmods.net/showthread.php?t=331010" #endif #define MAX_NAME_LENGTH 32 #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif const Float:SPEED_DEFAULT = -120.9 new Float:g_fSpeed[MAX_PLAYERS + 1] = { SPEED_DEFAULT, ... } public plugin_init() {     register_plugin("Change Speed Command", "1.1", "OciXCrom")     register_concmd("amx_speed", "Cmd_Speed", ADMIN_SLAY, "<player|group> <speed amount|reset>")     RegisterHam(Ham_CS_Player_ResetMaxSpeed, "player", "OnResetMaxSpeed", 1) } public OnResetMaxSpeed(id) {     if(g_fSpeed[id] != SPEED_DEFAULT)     {         set_user_maxspeed(id, g_fSpeed[id])     } } public client_putinserver(id) {     g_fSpeed[id] = SPEED_DEFAULT } public Cmd_Speed(id, iLevel, iCid) {     if(!cmd_access(id, iLevel, iCid, 3))     {         return PLUGIN_HANDLED     }     new szArg[MAX_NAME_LENGTH], szTarget[MAX_NAME_LENGTH]     read_argv(1, szArg, charsmax(szArg))     new iPlayers[MAX_PLAYERS], iPnum = cmd_targetex(id, szArg, iPlayers, szTarget, charsmax(szTarget), TARGETEX_OBEY_IMM_SINGLE)     if(!iPnum)     {         return PLUGIN_HANDLED     }     new szName[MAX_NAME_LENGTH], szAmount[8]     get_user_name(id, szName, charsmax(szName))     read_argv(2, szAmount, charsmax(szAmount))     if(equali(szAmount, "reset"))     {         for(new iPlayer, i; i < iPnum; i++)         {             iPlayer = iPlayers[i]             g_fSpeed[iPlayer] = SPEED_DEFAULT             ExecuteHamB(Ham_CS_Player_ResetMaxSpeed, iPlayer)         }         CC_LogMessage(0, _, "ADMIN &x03%s &x01reset speed for &x03%s", szName, szTarget)     }     else     {         for(new iPlayer, i; i < iPnum; i++)         {             iPlayer = iPlayers[i]             g_fSpeed[iPlayer] = str_to_float(szAmount)             OnResetMaxSpeed(iPlayer)         }                 CC_LogMessage(0, _, "ADMIN &x03%s &x01set &x04%s speed &x01on &x03%s", szName, szAmount, szTarget)     }     return PLUGIN_HANDLED }
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
strikevz
Junior Member
Join Date: Mar 2021
Old 03-25-2021 , 17:04   Re: variable movement speed
Reply With Quote #17

I'll pay for it, please
strikevz is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-25-2021 , 17:53   Re: variable movement speed
Reply With Quote #18

thats not less than 30euros, think again bro ;)
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
strikevz
Junior Member
Join Date: Mar 2021
Old 03-30-2021 , 13:11   Re: variable movement speed
Reply With Quote #19

thank you oxicrom for you help.

solved

Last edited by strikevz; 03-30-2021 at 13:11.
strikevz 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 16:08.


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