Skocz do zawartości
  • 0

Za wysoki ping


jogurcik122pl
 Udostępnij

Pytanie

10 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
every 5 minutes:
    if player's ping > 100:
        send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
        wait 60 seconds
    else:
        cancel event
            if player's ping > 100:
                send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
                wait 60 seconds
            else:
                cancel event
                    if player's ping > 100:
                        send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
                        wait 60 seconds
                    else:
                        cancel event
                            if player's ping > 100
                                kick due to "Masz za wysoki ping"
                            else:
                                cancel event

 

Edytowane przez Peridot
Peridot

Wstawiam w code

Notatka dodana przez Peridot

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@Peridot wytabowałem tak jak mi pokazywał sk i pokazuję się teraz

[17:17:50 ERROR]: indentation error: expected 5 tabs, but found 6 tabs (test.sk, line 13: send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 12: if player's ping > 100:')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 15: else:')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 19: else:')
[17:17:50 ERROR]: There's no player in a periodical event (test.sk, line 2: if player's ping > 100:')
[17:17:50 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (test.sk, line 5: else:')

A sk wygląda aktualnie tak

every 5 minutes:
	if player's ping > 100:
		send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
		wait 60 seconds
	else:
					cancel event
		if player's ping > 100:
			send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
			ait 60 seconds
			else:
				cancel event
				if player's ping > 100:
						send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
				wait 60 seconds
				else:
				cancel event
				if player's ping > 100
		kick due to "Masz za wysoki ping"
		else:
		cancel event

 

Edytowane przez Peridot
Peridot

Usuwam niepotrzebne formatowanie

Notatka dodana przez Peridot

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
29 minut temu, jogurcik122pl napisał:

@Peridot wytabowałem tak jak mi pokazywał sk i pokazuję się teraz

[17:17:50 ERROR]: indentation error: expected 5 tabs, but found 6 tabs (test.sk, line 13: send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 12: if player's ping > 100:')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 15: else:')
[17:17:50 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (test.sk, line 19: else:')
[17:17:50 ERROR]: There's no player in a periodical event (test.sk, line 2: if player's ping > 100:')
[17:17:50 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (test.sk, line 5: else:')

A sk wygląda aktualnie tak

every 5 minutes:
	if player's ping > 100:
		send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
		wait 60 seconds
	else:
					cancel event
		if player's ping > 100:
			send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
			ait 60 seconds
			else:
				cancel event
				if player's ping > 100:
						send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
				wait 60 seconds
				else:
				cancel event
				if player's ping > 100
		kick due to "Masz za wysoki ping"
		else:
		cancel event

 

Masz dalej źle wytabowane :v Teraz zauważyłem też, że ten skrypt nie jest zbytnio dobrze napisany a ja się jakoś mocno na pisaniu skryptów nie znam ;v Ale masz może zadziała
 

every 5 minutes:
	loop all players:
      	if loop-player's ping > 100:
          	send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
          	wait 60 seconds
      	else:
          	if loop-player's ping > 100:
                send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
                wait 60 seconds
            else:
                  if loop-player's ping > 100:
                  		send title "&4&lOgarnij ping!" with subtitle " " for 4 seconds
                  		wait 60 seconds
                  else:
                  		if loop-player's ping > 100:
          					kick due to "Masz za wysoki ping"

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on join:
	while player is online:
		loop 3 times:
			if player's ping >= 100:
				add 1 to {_ping::%player%}
				send title "&c&l%player's ping% ms" with subtitle "&cTwój ping jest zbyt wysoki!" to player
			wait 20 second
		if {_ping::%player%} = 3:
			kick player due to "&cMasz zbyt wysoki ping!"
		clear {_ping::%player%}

 

Edytowane przez Helios1993
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@Helios1993 skrypt działa, był 1 błąd ale go poprawiłem ale jest kolejny a mianowicie skrypt wysyła bardzo dużo wiadomości do gracza przed wyrzuceniem a w założeniu było 3 wiadomości i za 4 kick, oraz przy każdym za wysokim pingu pokazuje że gracz wyszedł i wszedł na serwer pomino że ciągle na nim się znajduję 

on join:
	while player is online:
		loop 3 times:
			if player's ping >= 30:
				add 1 to {_ping::%player%}
				send player title "&c&l%player's ping% ms" with subtitle "&cTwój ping jest zbyt wysoki!" for 4 seconds
			wait 20 second
		if {_ping::%player%} = 3:
			kick player due to "&cMasz zbyt wysoki ping!"
		clear {_ping::%player%}		

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

2.1.2

spigot 1.8.8

 

@xAxee działa

a da radę dodać że to ostrzeżenie np 1/3 potem 2/3 i 3/3 i następny raz to kick ? 

(Połącz posty :/)

Edytowane przez jogurcik122pl
Wojciu

Łączę, następnym razem zgłoś post, aby poinformować moderację o wymaganej interwencji np.  połączenie postu.

Notatka dodana przez Wojciu

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
every 45 second:
	loop all players:
		if loop-player's ping >= 45:
			add 1 to {ping::%loop-player%}
			send loop-player title "&c&l%loop-player's ping% ms" with subtitle "&cTwój ping jest zbyt wysoki!" for 4 seconds
		else:
			set {ping::%loop-player%} to 0
		if {ping::%loop-player%} is 3:
			kick loop-player due to "&cMasz zbyt wysoki ping!"
			clear {ping::%loop-player%}	

 

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...