Raised This Month: $32 Target: $400
 8% 

[l4d2] Server lag problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cpsap2
New Member
Join Date: Oct 2020
Old 07-26-2021 , 14:46   [l4d2] Server lag problem
Reply With Quote #1

Generating a large number of special infections at one time will cause the server to lag, how to optimize

Similar code
PHP Code:
for (new 016i++)
{
    switch(
GetRandomInt(05))
    {
        case 
0:
            
FakeClientCommand(client"z_spawn_old smoker auto");
        case 
1:
            
FakeClientCommand(client"z_spawn_old boomer auto");
        case 
2:
            
FakeClientCommand(client"z_spawn_old hunter auto");
        case 
3:
            
FakeClientCommand(client"z_spawn_old spitter auto");
        case 
4:
            
FakeClientCommand(client"z_spawn_old jockey auto");
        case 
5:
            
FakeClientCommand(client"z_spawn_old charger auto");    
    }

-google translate
-my English is not good
cpsap2 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 07-26-2021 , 15:58   Re: [l4d2] Server lag problem
Reply With Quote #2

spawn them over a time period e.g. 1 every 2 frames until you have desired amount.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Reply


Thread Tools
Display Modes

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 08:28.


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