Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 22:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Gm-Befehle für "Normale User" Sperrn

Discussion on Gm-Befehle für "Normale User" Sperrn within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2011
Posts: 80
Received Thanks: 29
Gm-Befehle für "Normale User" Sperrn

Tut mir leid, aber mir fiel gerade kein richtiger Threadtitel ein

Nun denn, fangen wir an.
Ich dachte mir: "Wie sperre ich für normale User jeden Befehl mit / Vornedran?"

Nun, meine Version der Lösung stelle ich euch vor
Nicht Perfekt, aber eine gute Lösung, denke ich

Dazu öffnet man seine uichat.py (root.epk)

Sucht dort folgende Stelle: (Bei mir Zeile 118)
PHP-Code:
def __init__(self):
ui.EditLine.__init__(self)
self.SetWindowName("Chat Line")
self.lastShoutTime = 0
self.eventEscape = lambda *arg: None
self.eventReturn = lambda *arg: None
self.eventTab = None
self.chatMode = chat.CHAT_TYPE_TALKING
self.bCodePage = TRUE
fügt darunter Folgendes ein:
PHP-Code:
self.ENABLE_GM_CODE = FALSE
* Damit Standardmäßig keine Gm-Codes eingegeben werden können

So. Nun die Funktion zum Umstellen:
Sucht diese Stelle (Bei mir Z. 210, selbe Datei)

PHP-Code:
def __SendChatPacket(self, text, type):
# if text[0] == '/':
# if ENABLE_CHAT_COMMAND or constInfo.CONSOLE_ENABLE:
# pass
# else:
# return

if net.IsChatInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
else:
net.SendChatPacket(text, type)
und ersetzt sie durch das:

PHP-Code:
def __SendChatPacket(self, text, type):
if text[0] == '/':
if text == "/gm_code":
self.ENABLE_GM_CODE = TRUE
chat.AppendChat(chat.CHAT_TYPE_INFO, "Du darfst jetzt '/' Codes ausführen")
if not self.ENABLE_GM_CODE:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Du darfst keine GM-Codes ausführen")
else:
net.SendChatPacket(text, type)
else:
if net.IsChatInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
else:
net.SendChatPacket(text, type)
Ersetzt bei ..
PHP-Code:
if text == "/gm_code":
.. einfach den Text zwischen " " (Muss natürlich mit / beginnen). Dies ist der Befehl, der GM-Befehle freigibt.
Also der MasterKey

Achtet auf die richtige Einrückung!

Mit diesem "Update" ist es dem User nicht mehr möglich zB PK-Mode anzustellen oder /ski (für Skillhack) zu nutzen.

by .Hazelnuss.
.°"!§HazelnussStyLe§!"°. is offline  
Old 04/03/2011, 17:25   #2
 
gerald500's Avatar
 
elite*gold: 150
Join Date: Sep 2010
Posts: 1,049
Received Thanks: 275
Mal austesten ob das funktioniert^^
gerald500 is offline  
Old 04/03/2011, 18:20   #3


 
ZyoX's Avatar
 
elite*gold: 83
Join Date: Apr 2010
Posts: 1,665
Received Thanks: 685
Das wurde doch desletzt gereleast?

Außerdem kommt das dann hier hin:
ZyoX is offline  
Old 04/03/2011, 18:22   #4
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,406
Received Thanks: 2,024
du released irgendwie nur zeug das es schon gibt oder? auerdem bitte die code funktion dafür nutzen da es so nicht sehr übersichtich ist
NotEnoughForYou is offline  
Old 04/03/2011, 18:22   #5
 
elite*gold: 0
Join Date: Jul 2009
Posts: 1,341
Received Thanks: 692
Doppelpost ?
metin2killah is offline  
Reply

Tags
metin2


Similar Threads Similar Threads
Kann mir bitte jemmand eine Hmachi HP erstellen """""SOS HELP""""
09/15/2010 - Metin2 Private Server - 11 Replies
SO wie der Titel schon sagt ich suche einen der mir per Teamviwer eine hp machen kann habe schon alles ausprobiert aber es klappt nie!!!! PLS HELP...
Suche Guide to INSTALL "bessere "normale" Serverfiles!
08/20/2010 - Metin2 Private Server - 2 Replies
Habe Sufu benutzt doch nichts gefunden, was mir weiterhelfen könnte! http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/380631-release-how-ch2-installer.h tml zu Beispiel in dem Thread habe ich nichts verstanden! Gibt es auch einen Video TuT wo es mir einer detailliert erklären könnte? Naja... Ich hoffe auf schnelle Antworten



All times are GMT +1. The time now is 22:34.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.