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

[L4D] Force Mission Changer 1.4.0


Post New Thread Reply   
 
Thread Tools Display Modes
KroleG
Junior Member
Join Date: Dec 2008
Old 12-15-2008 , 07:51   Re: [L4D] Force mapchanger
Reply With Quote #11

Dionys, скажи на русском, что этот плагин делает :-)

Last edited by KroleG; 12-15-2008 at 08:08.
KroleG is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-15-2008 , 08:33   Re: [L4D] Force mapchanger
Reply With Quote #12

Quote:
Originally Posted by DontWannaName View Post
Hey im running 62 plugins on a 32 slot server and not one of them makes me lag. If I were to add 1 bad one, it could screw me up and all 62 of my plugins. Just an example.
This message on what is concrete? Or it is simple flood? About what one bad plug-in there is a conversation? I have a server since CS1.6 and well I know that I do. On my l4d server there is a problem with change of mission and falling of a server in the end of mission - this plug-in has corrected this problem. The plug-in is published for the aid to people at which similar problems. If you do not have problems on a server - it is not necessary flood about it.
Simple do not establish this plug-in...
Quote:
Originally Posted by Sammy-ROCK! View Post
If you wanna keep with bad coding have fun. I personaly don't care was just trying to help you make better plugins. Also you should think on what the sourcemod function would process instead of ignoring and doing it by anyway.
I only will be glad if to appear similar, but the "optimised" plug-in, you will be which author.
My opinion remains at me - the direct command to a server will be processed faster with smaller expenses of server resources.
The cycle on a server l4d will not be more than 8. On other server this plug-in will not be started.
It is better to make 8 cycles of one times for a round, than each time at an input/exit of the player to count function maxplayers - is a usual logic, and that that in my plug-in is more on pair byte of the text it it is not important at code execution.
"bad coding" - has amused me, thx

Last edited by Dionys; 12-15-2008 at 08:42.
Dionys is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-15-2008 , 08:40   Re: [L4D] Force mapchanger
Reply With Quote #13

Quote:
Originally Posted by KroleG View Post
Dionys, скажи на русском, что этот плагин делает :-)

вопщем на моем сервере после установки сурсмода появилась проблема в режиме версус - когда миссия заканчивается - сервер выкидывает всех игроков, но не сбрасывает сервер на первую карту миссии. причем это проблема именно сурсмода - это видно в консоле сервера... без него все норм.
вместо этого он респит бота выжившего и зомби, оставшийся танк и зареспившийся бот бессмертны - и могут долбить друг друга часами - есть видео - ужс (но это происходит не всегда, именно в определенных условиях, в каких не разбирался - нет времени. я просто понял что ботов в момент окончания миссии быть не должно - и плагин подстраховывает эту ситуацию)
при смене вручную в этот момент карты сервер падает с ошибкой с++. т.е. мой плагин принудительно в конце миссии после подсчета очков кикает всех ботов и вместе с игроками переходит к первой карте указанной миссии..

Last edited by Dionys; 12-15-2008 at 08:49.
Dionys is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-15-2008 , 08:48   Re: [L4D] Force mapchanger
Reply With Quote #14

Quote:
Originally Posted by Dionys View Post
I only will be glad if to appear similar, but the "optimised" plug-in, you will be which author.
My opinion remains at me - the direct command to a server will be processed faster with smaller expenses of server resources.
The cycle on a server l4d will not be more than 8. On other server this plug-in will not be started.
It is better to make 8 cycles of one times for a round, than each time at an input/exit of the player to count function maxplayers - is a usual logic, and that that in my plug-in is more on pair byte of the text it it is not important at code execution.
Before saying "but the "optimised" plug-in, you will be which author." look at the optimized code I posted before. I didn't change author if you haven't noticed. My point was just show you that you could've did it better which I'd like peoples to do with me.
Also it's weird you say "My opinion remains at me - the direct command to a server will be processed faster with smaller expenses of server resources." and waste GetMaxClients() and StrEqual. You can call GetMaxClients a small function but you can't say the same of StrEqual.
Sammy-ROCK! is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-15-2008 , 08:58   Re: [L4D] Force mapchanger
Reply With Quote #15

Thx for the remark. I ask you to read the first post again.
Concerning the help - I have told that is necessary for me - but code-pro which write here do not hurry up to help

Last edited by Dionys; 12-15-2008 at 09:01.
Dionys is offline
KroleG
Junior Member
Join Date: Dec 2008
Old 12-15-2008 , 09:15   Re: [L4D] Force mapchanger
Reply With Quote #16

Quote:
Originally Posted by Dionys View Post

вопщем на моем сервере после установки сурсмода появилась проблема в режиме версус - когда миссия заканчивается - сервер выкидывает всех игроков, но не сбрасывает сервер на первую карту миссии. причем это проблема именно сурсмода - это видно в консоле сервера... без него все норм.
вместо этого он респит бота выжившего и зомби, оставшийся танк и зареспившийся бот бессмертны - и могут долбить друг друга часами - есть видео - ужс (но это происходит не всегда, именно в определенных условиях, в каких не разбирался - нет времени. я просто понял что ботов в момент окончания миссии быть не должно - и плагин подстраховывает эту ситуацию)
при смене вручную в этот момент карты сервер падает с ошибкой с++. т.е. мой плагин принудительно в конце миссии после подсчета очков кикает всех ботов и вместе с игроками переходит к первой карте указанной миссии..
оу, спс!
KroleG is offline
ants
New Member
Join Date: Dec 2008
Old 12-15-2008 , 15:38   Re: [L4D] Force mapchanger
Reply With Quote #17

thanks, plugin works perfectly )
now i can use L4D Enforcer too, no c++ error at mapchange
********
спасибо, Dionys, пиши еще ;)
ants is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-16-2008 , 13:00   Re: [L4D] Force mapchanger
Reply With Quote #18

Quote:
Originally Posted by ants View Post
thanks, plugin works perfectly )
now i can use L4D Enforcer too, no c++ error at mapchange
********
спасибо, Dionys, пиши еще ;)
спасибо за отзыв
но хочу добавить что для повышения стабильности сервера я использую свой плагин принуждения director_no_human_zombies.
пытаюсь довести сейчас свою идею до автора плагина L4D Director Enforcer, чтобы он использовал ее в своем плагине...
Dionys is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 12-17-2008 , 03:47   Re: [L4D] Force mapchanger
Reply With Quote #19

Quote:
Originally Posted by Sammy-ROCK! View Post
I'll show you why I linked you to optimizations page.
Code:
public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
    if(GetConVarInt(Allowed))
    {
        decl String:currentMap[64];
        GetCurrentMap(currentMap, 64); //Why get map name everytime a roundend is called? Simply get once on mapstart and your done.

        if (StrEqual(currentMap, "l4d_vs_farm05_cornfield") == true || StrEqual(currentMap, "l4d_vs_hospital05_rooftop") == true)
        {
            RoundEndCounter += 1;

            if (RoundEndCounter == 4 && StrEqual(currentMap, "l4d_vs_farm05_cornfield") == true) //Didn't we already check if we were on this map?
            {
                for (new player=1; player<=GetMaxClients(); player++) //Here you'll be using GetMaxClients() for each loop we do. If server has 16 slots GetMaxClients() will be called 16 times without a need.
                {
                    if (IsClientInGame(player) && IsFakeClient(player))
                    {
                        ServerCommand("kick %s", player); //We got a command for this: KickClient
                    }
                }

                ServerCommand("changelevel %s", "l4d_vs_hospital01_apartment"); //Why are you using %s if your setting it in core not by variable?
            }
            if (RoundEndCounter == 4 && StrEqual(currentMap, "l4d_vs_hospital05_rooftop") == true) //Again we already checked the map and if the code above matched this is a waste. Also 2nd time we check RoundEndCounter
            {
                for (new player=1; player<=GetMaxClients(); player++)
                {
                    if (IsClientInGame(player) && IsFakeClient(player))
                    {
                        ServerCommand("kick %s", player);
                    }
                }

                ServerCommand("changelevel %s", "l4d_vs_farm01_hilltop");
            }
        }
    }
}
While Sammy's intentions are to assist, he seems to do so in a somewhat degrading manner, you may respond in some sarcastic tone to him as english may not be your first language, tone does not translate well over the internet. Anyway, what sammy is emphasizing here is that this block of code is actually quite poorly optimized overall in terms of code standards, (that's a lot of nested ifs), you could go as far as move some of these if statements into their own functions to make the code look cleaner. There's a bunch of possibilities here.

However there are some simple optimization points that have been pointed out, you do only need to get the map name OnMapStart. KickClient is actually better than using the ServerCommand option as (it's rare) sometimes the servercommand method just doesn't work (also, the KickClient command utilizes indexes as opposed to strings, which is (at times) better and more optimized. And there are some unnecessary redundancies in your code.

However, we do appreciate your work and urge you to constantly improve upon yourself, when I first started sourcemod coding you should have seen the ugly crap I wrote... seriously, it was bad.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers

Last edited by FlyingMongoose; 12-17-2008 at 16:36.
FlyingMongoose is offline
Dionys
Senior Member
Join Date: Sep 2008
Location: Terra, Russia
Old 12-17-2008 , 08:35   Re: [L4D] Force mapchanger
Reply With Quote #20

Thanks
I know that the plug-in code is far from an ideal
But when I spoke that at me the big lack of time - I did not joke
I have published that that have made for the my server (choice was not, and the server behaved disgustingly). Has made it wishing to help another.
Certainly - if there will be a possibility - I will be engaged in code optimisation.
A little me of the published plug-ins - first my tests in sourcemod. I created them relying on the knowledge php and only.
Dionys is offline
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 03:39.


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