Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
1 Active | 72 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: Weird Lags With a Script
tHMatt
General Member
Since: Sep 11, 2007
Posts: 473
Last: Mar 20, 2013
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Wednesday, Aug. 11, 2010 09:10 pm
your mod only lags when the client number gets over a certain amount.. so your threads are to expensive or you are running to many of them - for instance, if they arent stopping when a client dies and continue and then re-load again and again. I told you what to do, set cvars that control what threads can run, then when your server starts lagging, shut each thread down 1 by 1 until the lagging stops. You will then know what thread causes the problem and can find a way to fix it. Even with wait 0.05; threads can still cause lag when many of them run - I have been through this all before myself.
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Wednesday, Aug. 11, 2010 10:12 pm
Well i think i'm just running a lot of thread in a frame. But i don't know how to avoid that......
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Aug. 12, 2010 12:47 pm
I'm almost sure the problem is that. Because it lags when a"lot" of people are killing in same time (so it runs like 2-3 threads for each player after each kill lol).

So can someone explain me how to run threads in different frames please ?

Thanks.
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Aug. 12, 2010 07:55 pm
Ok what i did is disabling all my scripts from the Paulus Zom Mod, and there is still high cpu usage (30% with 20-25 players, like when my mod is ON)....So i start thinking that the problem isn't from my script at all...but what's left ? Paulus Zom Mod ? Many servers use it without any problem. Weapon Mod ? I tried 2 different one. Skins ? With or without, same result....


So what could be wrong here and make server to lag ?

PS : BraX, whats the point in telling me to add you when you never answer on xfire ?
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 13, 2010 06:15 pm
Actually, BraX checked my script and told me to increase all the "wait .05" to wait .1 because with a lot of people it'll make high cpu usage which is logic. I did it...and it wasn't ok. I even increase all the wait to wait .3......and still high cpu usage.

To get my problem solved fast, i'll pay 5$ to the guy who will solve this error (i'm tired of this......searching for days, can't find whats wrong).

My xfire : bijeeh

Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Aug. 14, 2010 12:56 am
attachment: application(322.4Kb)
Hmm, what i did is replacing my _zom.gsc file (that is server side) by _zom.gsc from paulus mod. And i had a weird cpu usage (6-7% with 6-7 players). So the problem can be from my aaaZ file. I'll attach it here, if someone want to take a look :



EDIT : Well i'm now sure its not from my custom mod. Because i had a high cpu usage (80-90%) with 35 players, like with my mod ON.

I got two iwds (as a mod) on my server (aaaZ90.iwd and z___weap.iwd) and one iwd for skins...(but skins are fine, because with or without, same result).

The aaaZ90.iwd is almost same as Paulus mod. What i modified is zom.gsc to :

Code:
main()
{	
	thread maps\mp\gametypes\_zom::main();
}


_zom.gsc is server side.

And i added some "images", "materials", "xmodel", "xmodelparts", "xmodelsurfs".

I did same thing for z___weapon.iwd and i added some files also in "weapons" folder.
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Saturday, Aug. 14, 2010 10:06 pm
(up) [sad]
Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Sunday, Aug. 15, 2010 12:54 pm
I enabled developer (set to 2) and developer_script on my server with 36 people, and i see this :



It keeps saying that, what does it means please ?



1337MattY writes...
Quote:
your mod only lags when the client number gets over a certain amount.. so your threads are to expensive or you are running to many of them - for instance, if they arent stopping when a client dies and continue and then re-load again and again. I told you what to do, set cvars that control what threads can run, then when your server starts lagging, shut each thread down 1 by 1 until the lagging stops. You will then know what thread causes the problem and can find a way to fix it. Even with wait 0.05; threads can still cause lag when many of them run - I have been through this all before myself.


Forgot to answer you. I did that and it didn't change anything : Cpu Usage didn't change after killing threads.

Share |
cresuso
General Member
Since: Aug 29, 2009
Posts: 51
Last: Apr 14, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Aug. 16, 2010 12:06 am
Hey guys, help please [sad]

I'll pay 5$ (with paypal) to the guy who'll help me to solve this issue (most weird issue ever seen -,-)

PS : About the screen above its normal. When someone is downloading a file, it shows writing block, etc...

Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Aug. 16, 2010 02:09 pm
Looks like you don't have a download redirect, which means that files come straight from the server at ~10KB/s max, this puts extra load on the server.

Also, if you're running the server from your own computer (which is looks like you are, since you got a screenshot of the console), then the reason you are getting lag when going above a certain number of players is becuase your net connection is being maxed out and can no longer deliver (or receive) all the data to/form the clients fast enough.
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»