Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Python & LUA]__ServerCommand_Build


Rekomendowane odpowiedzi

Opublikowano

How's it goin bro's

I`ve designed few days ago a GUI. The GUI have´t actually a problem - I can see it rtc. But the big Problem is I can´t link it with my Server.

I´ve put the comman in the "__ServerCommand_Build" & defined it but it doesent work if i try to active it in a quest with cmd("xyz").

The Syserr (Client): Unknown Server Command xyz | xyz

Have a nice evening to all my polish folks !

Opublikowano

First, use cmdchat function, no cmd.

second, easy example:

 

 

 

quest serverCommand begin
state start begin
when login begin
cmdchat("login "..pc.get_name())
end
end
end

 

 

 

def __ServerCommand_Build(self):
        serverCommandList={
            "login"            : self.__LoginPlayer,
 
 
}

 

 

 

def __LoginPlayer(self, playerName):
        dbg.TraceError("Login Player Name: %s" % playerName)

 

 

don't use this code. Only example without tabs, python need tabs. ;)

50596142255057180250.png

Opublikowano

 

First, use cmdchat function, no cmd.

second, easy example:

 

 

quest serverCommand beginstate start beginwhen login begincmdchat("login "..pc.get_name())endendend

def __ServerCommand_Build(self):        serverCommandList={            "login"            : self.__LoginPlayer,  }

def __LoginPlayer(self, playerName):        dbg.TraceError("Login Player Name: %s" % playerName)

 

don't use this code. Only example without tabs, python need tabs. ;)

 

 

 

Hello & thank u 4 answering,

I did it like cmdchat("xyz") before but i wrote it wrong here in my thread.

I had have everything like u told it but i dont realy know why it doesnt work.

Maybe i can add u in skype :s

Opublikowano

cmdchat("login "..pc.get_name())

This is bad, you must get name of self or LoginPlayer without __, This must look like this

cmdchat("LoginPlayer"..pc.get_name())

I hope that I have helped, as to what is my GG 44582194

nexi.png

 

CYTOWAĆ MOJE POSTY, JEŚLI LICZYCIE NA POMOC !!

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...