Raised This Month: $ Target: $400
 0% 

Can this affect the server performance?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-23-2015 , 14:17   Can this affect the server performance?
Reply With Quote #1

I want to make a icon show on the HUD when the player is not moving, so would setting a task for this every 0.1 seconds affect the server performance in any way? Is there a better way of doing this?

PHP Code:
set_task(0.1"some_function"id""0"b"0)

public 
some_function(id)
{
    new 
Float:fVecVelocity[3]
    
entity_get_vector(idEV_VEC_velocityfVecVelocity)
    
iSpeed floatround(vector_length(fVecVelocity))

    
message_begin(MSG_ONEget_user_msgid("StatusIcon"), {000}, id)
    
write_byte(!iSpeed 0)
    
write_string(szSpriteName)
    
write_byte(0)
    
write_byte(154)
    
write_byte(255)
    
message_end()

OciXCrom is offline
Send a message via Skype™ to OciXCrom
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-23-2015 , 19:50   Re: Can this affect the server performance?
Reply With Quote #2

Quote:
Originally Posted by OciXCrom View Post
Is there a better way of doing this?
Take a look at Brad's Bad Camper

Last edited by Chihuahuax; 11-23-2015 at 19:51.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
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