Post and pre forward .
Hi ,
I have to fucntions which are being called in postthink . (FM_PlayerPostThink). Now the logic is simple and they can be moved to prethink too. So my question is 1)will it be better if i move them to prethink ? 2)will it be better if i move one of them to prethink ? Just asking for my knowledge :) . |
Re: Post and pre forward .
Show us what you have in your functions.
|
Re: Post and pre forward .
1st one :
public CheckSpinHack_Post(id) { if(is_user_alive(id)) { static Float:fAngles[3] pev(id, pev_angles, fAngles) fTotalAngle[id] += vector_distance(fLastAngles[id], fAngles) CopyVector(fAngles, fLastAngles[id]) static Button Button = pev(id, pev_button) if((Button & IN_LEFT) || (Button & IN_RIGHT)) { g_dSpinWarnings[id] = 0 //server_cmd("say pressing left/right") } } } Another one I can't post :( as it uses some slowhacking . But its a very simple developer 0 function :) . |
Re: Post and pre forward .
Use "prethink".
|
Re: Post and pre forward .
See here
I don't think it matters which you use (pre or post) since you are not changing anything, you are only using it as a monitoring mechanism. If you plan to alter anything, then prethink must be used. Here's just a slight improvement to button checking PHP Code:
|
Re: Post and pre forward .
hey the plugin is working fine ..
I just want to know whether 1)will it be better if i move them to prethink ? 2)will it be better if i move one of them to prethink ? just wrt to CPU load and lag :) . Quote:
|
Re: Post and pre forward .
Quote:
|
Re: Post and pre forward .
Still doing something in pre forward is better I think. Correct me when I am wrong.
|
Re: Post and pre forward .
Quote:
|
| All times are GMT -4. The time now is 00:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.