Raised This Month: $ Target: $400
 0% 

OnPlayerRunCmd tip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
G@ngst@r
Member
Join Date: Dec 2009
Old 01-06-2010 , 03:03   Re: OnPlayerRunCmd tip
Reply With Quote #1

Prediction was created for clients, that lag. For example if player pressed forward button, there is very big chance, that player will walk forward, so client's game become to update world with client's prediction with out server world update and permission. If server returned another world state (for example some plugin blocked walking forward) client's world will be updated again, but player will be returned to the old position.

Both OnPreThink and OnPlayerRunCmd are fired when server received client's data (if prediction is ON, clients have already walked forward) and ready to update world with client's command "forward".

For example to force client to do taunt when attack fired, the right way is to force bind "mouse1" "taunt" (this wont cause any lags) and then block any attack using SDKHooks or OnPlayerRunCmd.

I have felt lags connected with prediction, while fire was blocked without binding, ever on local server with ping 5, 200 client's fps and 500 server's fps.

There is no better way.

Last edited by G@ngst@r; 01-06-2010 at 03:18.
G@ngst@r 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 18:15.


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