You are not logged in.

Dear visitor, welcome to sourceserver.info. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

  • "TempletonPeck" started this thread

Posts: 2,498

Location: Schwelm

Occupation: Immobilien-Verwalter / Serveradministrator

wcf.user.option.userOption53: Nein

  • Send private message

1

Wednesday, July 27th 2011, 11:23pm

Mapvote Script gesucht (Scripting Anfrage)

Nabend....

Ich hätte gerne ein modifiziertes Mapvote Plugin.

Zur Sache: Wir nutzen zZ den standartmäßigen SM mapchooser. Der Vote wird 5:00min vor Mapende gestartet.
Zugegriffen wird auf eine von mir festgelegte votemapslist.txt

Spoiler Spoiler

/* For the "mapchooser" plugin */
"mapchooser"
{
"file" "votemaplist.txt"


Nun hätte ich aber gerne die Option, das diese dazugehörige votemapslist, nach Anzahl der Spieler verändert wird.

Beispiel:

- das Plugin ruft 5:05min vor Ende der Map ab, wieviele Spieler online sind. (Oder halt generell 5 Sekunden vor dem Vote)
- sind x Spieler online, wird votemaplist.txt abgeruft
- sind x Spieler online wird votemaplist2.txt abgeruft

Vorraussetzung wäre natürlich, dass man die Spieleranzahl einstellen kann, ab wann welche Liste abgerufen wird.

Vorteil so eines Plugins wäre, dass man die verfügbaren Maps, direkt an die Spieler angleichen kann, ohne das ein
Admin online sein muss. Mehr als 2 mögliche Listen wären viell. für einige hier auch sinnvoll - wäre aber nun für
mich persönlich nicht vonnöten.

This post has been edited 2 times, last edit by "TempletonPeck" (Jul 27th 2011, 11:47pm)


Kathy

Intermediate

Posts: 523

Location: München

Occupation: Roaster/Freelance Editor

wcf.user.option.userOption53: Ja

  • Send private message

2

Thursday, July 28th 2011, 3:57am

Kleiner Gedankenschubser.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* For the "mapchooser" plugin */
"mapchooser"
{
stock GetRealClientCount( bool:inGameOnly = true ) {
	new count = 0;
	for( new i = 1; i <= GetMaxClients(); i++ ) {
		if( ( ( inGameOnly ) ? IsClientInGame( i ) : IsClientConnected( i ) ) && !IsFakeClient( i ) ) {
			count++;
		}
	}
	return count;
if (count < 5);
	{
	"file" "votemaplist.txt"
	}
else if (count > 5);
	{
	"file" "votemaplist2.txt"
	}
}


NTcgNjggNmYgNjEgMmUgMjAgNDQgNjUgNmEgNjEgMjAgNzYgNzUgMmU=

Wer weiss was das ist?

  • "TempletonPeck" started this thread

Posts: 2,498

Location: Schwelm

Occupation: Immobilien-Verwalter / Serveradministrator

wcf.user.option.userOption53: Nein

  • Send private message

3

Thursday, July 28th 2011, 6:16pm

L 07/28/2011 - 12:34:20: Info (map "de_cbble") (file "errors_20110728.log")
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
L 07/28/2011 - 12:34:20: [SM] Error on line 51 (col 26): Line contained too many invalid tokens
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
L 07/28/2011 - 12:34:20: [SM] Error on line 51 (col 26): Line contained too many invalid tokens
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
L 07/28/2011 - 12:34:20: [SM] Error on line 51 (col 26): Line contained too many invalid tokens
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
L 07/28/2011 - 12:34:20: [SM] Error on line 51 (col 26): Line contained too many invalid tokens
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
L 07/28/2011 - 12:34:20: [SM] Error on line 51 (col 26): Line contained too many invalid tokens


Keine Ahnung wo ich da die Tippfehler drinhab. Vielleicht kannst du mir den Code ja mal in der cfg selbst einfügen und wieder hochladen.
Das wäre echt knorke :lovu:

Kann die Datei aufgrund der Dateiendung nicht hochladen, also hier ein externer Link.

http://www.file-upload.net/download-3620…plists.cfg.html

Rudi23

Unregistered

4

Friday, July 29th 2011, 10:26am

L 07/28/2011 - 12:34:20: Info (map "de_cbble") (file "errors_20110728.log")
L 07/28/2011 - 12:34:20: [SM] Could not parse file "/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"
Ist jetzt nur eine Vermutung, aber "invalid token" könnte der Bindesstrich bei "css-public" sein. Ich erinnere mich dunkel, dass ich damit auch schon mal Probleme hatte und verwende statt dessen immer einen Unterstrich.

Ansonsten ist die Idee wirklich super und es wäre toll, wenn das umsetzbar wäre.
Wir haben auch oft das Problem, dass nur wenige Spieler da sind und dann immer die allergrößten Maps voten und dann hinterher meckern/abzuhauen.

  • "TempletonPeck" started this thread

Posts: 2,498

Location: Schwelm

Occupation: Immobilien-Verwalter / Serveradministrator

wcf.user.option.userOption53: Nein

  • Send private message

5

Friday, July 29th 2011, 10:51am

Wie du siehst, bezieht sich die fehlermeldung auf die maplist.cfg

"/home/gs/css-public/orangebox/cstrike/addons/sourcemod/configs/maplists.cfg"

Ausserdem trat der Fehler erst nach Bearbeitung selbiger auf. Nachdem ich den Code wieder zurückgesetzt habe, läuft alles wieder
normal.

fluxX

Super Moderator

Posts: 1,056

Location: Österreich

Occupation: IT Systemadministrator

wcf.user.option.userOption53: Ja

  • Send private message

6

Friday, July 29th 2011, 11:41pm

schau mal hier -> Mapvote Plugin
das kann halt viel mehr ^^

  • "TempletonPeck" started this thread

Posts: 2,498

Location: Schwelm

Occupation: Immobilien-Verwalter / Serveradministrator

wcf.user.option.userOption53: Nein

  • Send private message

7

Tuesday, August 2nd 2011, 2:14pm

Problem ist, dass dieses Plugin die nextmap selber setzt. Wir wollen aber schon den Vote nutzen.

MadMakz

Super Moderator

Posts: 1,878

Location: ~#

wcf.user.option.userOption53: Ja

  • Send private message

8

Tuesday, August 2nd 2011, 4:39pm

glaube weniger das der code in die /configs/maplists.cfg als in die mapchooser.sp(.smx) kommt ;)

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
stock GetRealClientCount(bool:inGameOnly = true)
{
	new clients = 0
	for(new i = 1; i <= MaxClients; i++)
	{
		if(((inGameOnly) ? IsClientInGame(i) : IsClientConnected(i)) && !IsFakeClient(i))
		{
			clients++
		}
	}
	return clients
}

public OnConfigsExecuted()
{
	if (GetRealClientCount() < 5)
	{
		if (ReadMapList(g_MapList,
						 g_mapFileSerial, 
						 "mapchooser",
						 MAPLIST_FLAG_CLEARARRAY|MAPLIST_FLAG_MAPSFOLDER)
			!= INVALID_HANDLE)
	}
	else
	{
		if (ReadMapList(g_MapList,
						 g_mapFileSerial, 
						 "mapchooser2",
						 MAPLIST_FLAG_CLEARARRAY|MAPLIST_FLAG_MAPSFOLDER)
			!= INVALID_HANDLE)
	}


schwebt mir da im kopf. :)

zusätzlich nochmal triggern kurz bevor der mapvote startet (siehe dazu SetupTimeleftTimer()) am besten den code ab "if (GetRealClientCount() < 5)" in eine eigene funktion packen damit man ihn einfacher callen kann in "onconfigsexecuted" & "setuptimelefttimer" bzw dort wo der vote getriggert wird -> "InitiateVote".


in die maplsit.cfg kommt dann noch der neue eintrag für mapchooser2,der auf die maplist datei zeigt die bei mehr als X (hier 4) spielern benutz werden soll

soweit meine theorie, hab leider keine server zum testen, es weiter auszuarbeiten.

This post has been edited 9 times, last edit by "MadMakz" (Aug 2nd 2011, 5:15pm)


Similar threads