AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can this affect the server performance? (https://forums.alliedmods.net/showthread.php?t=275160)

OciXCrom 11-23-2015 14:17

Can this affect the server performance?
 
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()



Chihuahuax 11-23-2015 19:50

Re: Can this affect the server performance?
 
Quote:

Originally Posted by OciXCrom (Post 2365759)
Is there a better way of doing this?

Take a look at Brad's Bad Camper


All times are GMT -4. The time now is 18:15.

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