Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Problem z wyświetlaniem wiadomości na chatcieProblem dotyczy kilku pluginów

chat aktualizacja amxx sma

Najlepsza odpowiedź AvatarPoz91, 17.07.2017 19:07

 

Spróbuj tego, powinno śmigać ;)

Dopisać do ;Chat / Messages :)

#include <amxmodx>

#pragma semicolon 1

new Trie:_hashList;

new const
   _getResult[][][] = { 
      { "#Cstrike_Chat_CT",         "^x01(Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_CT_Dead",    "^x01*DEAD* (Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_All",        "^x03"},
      { "#Cstrike_Chat_Spec",       "^x01(Spectator)^x01"},
      { "#Cstrike_Chat_T",          "^x01(Terrorist)^x01"},
      { "#Cstrike_Chat_T_Dead",     "^x01*DEAD* (Terrorist)^x01"},
      { "#Cstrike_Chat_AllDead",    "^x01*DEAD*^x01"},
      { "#Cstrike_Chat_AllSpec",    "^x01*SPEC*^x01"}
   }
;

public plugin_end( )       TrieDestroy( _hashList );
public plugin_precache()   register_message(get_user_msgid("SayText"),"sayText_LastBuild_Hook");

public plugin_init(){
   
   register_plugin("Some shit", "1.0", "Spawner & SkillartzHD");
   
   _hashList = TrieCreate();
   for(new i; i < sizeof _getResult; i++)
      TrieSetString(  _hashList, _getResult[i][0], _getResult[i][1] );
   
}

public sayText_LastBuild_Hook(  ){
   
   // Isn't is user connected (->ingame) already checked?
   new _getMessage[ 192 ];
   read_args(_getMessage, charsmax(_getMessage));
   
   new _getType[ 24 ], _userName[ 32 ], _output[ 34 ];
   
   get_msg_arg_string(2, _getType, charsmax(_getType));
   get_user_name( get_msg_arg_int(1), _userName, charsmax(_userName) );
   TrieGetString( _hashList, _getType, _output, charsmax(_output) );
   
   replace(_getMessage, charsmax(_getMessage), "^"", "");
   format(_getMessage, charsmax(_getMessage), "%s ^x03%s : ^x01%s", _output,  _userName, _getMessage);
   
   !equali(_getType,"#Cstrike_Name_Change") ? set_msg_arg_string( 2, _getMessage ) : 1;  //#'" Somehow there is a unknown bug changing name which displace name :" xx, so this line code will fix it.
   
}

 

log - AMXX] Plugin file open error

( 13) Load fails: Plugin file open error (plugin "chattype1.amxx")

 

Sprawdziłem i problem z załadowaniem.

Lokalnie zrobione dobrze załadowane na serwer i błąd.

 

##############

 

Plugin załadowany i działa.

Ale zmian po nim nie widać.

Żadnych logów ani informacji w konsoli.

Chat nadal pokazuje "s".

 

 

Przejdź do postu


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
2 odpowiedzi w tym temacie

#1 AvatarPoz91

    Początkujący

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • GG:
  • Imię:Szymon
  • Lokalizacja:Poznań
Offline

Napisano 16.07.2017 23:38

Problem polega na tym że nawet w pluginie ad_manager pojawia się zamiast tekstu samo "s".

 

Próbowałem na wiele sposobów i nic.

 

w poniższych pluginach pokazywały się wiadomości na chatcie... po aktualizacji już nie.

 

Dodatkowo nie widać co gracze piszą na u@

 

Prefixy w  klasach czy sam vip, dzięki waszemu poradnikowi sobie poradziłem ale w innych miejscach po aktualizacji już nie.

Dziękuję za próby w tej sprawie.

Załączone pliki


  • +
  • -
  • 0

#2 NacpanyKsiaze

    Zaawansowany

  • Użytkownik

Reputacja: 27
Życzliwy

  • Postów:118
  • GG:
  • Imię:Szymon
  • Lokalizacja:Świętno
Offline

Napisano 17.07.2017 18:28

Spróbuj tego, powinno śmigać ;)

Dopisać do ;Chat / Messages :)

#include <amxmodx>

#pragma semicolon 1

new Trie:_hashList;

new const
   _getResult[][][] = { 
      { "#Cstrike_Chat_CT",         "^x01(Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_CT_Dead",    "^x01*DEAD* (Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_All",        "^x03"},
      { "#Cstrike_Chat_Spec",       "^x01(Spectator)^x01"},
      { "#Cstrike_Chat_T",          "^x01(Terrorist)^x01"},
      { "#Cstrike_Chat_T_Dead",     "^x01*DEAD* (Terrorist)^x01"},
      { "#Cstrike_Chat_AllDead",    "^x01*DEAD*^x01"},
      { "#Cstrike_Chat_AllSpec",    "^x01*SPEC*^x01"}
   }
;

public plugin_end( )       TrieDestroy( _hashList );
public plugin_precache()   register_message(get_user_msgid("SayText"),"sayText_LastBuild_Hook");

public plugin_init(){
   
   register_plugin("Some shit", "1.0", "Spawner & SkillartzHD");
   
   _hashList = TrieCreate();
   for(new i; i < sizeof _getResult; i++)
      TrieSetString(  _hashList, _getResult[i][0], _getResult[i][1] );
   
}

public sayText_LastBuild_Hook(  ){
   
   // Isn't is user connected (->ingame) already checked?
   new _getMessage[ 192 ];
   read_args(_getMessage, charsmax(_getMessage));
   
   new _getType[ 24 ], _userName[ 32 ], _output[ 34 ];
   
   get_msg_arg_string(2, _getType, charsmax(_getType));
   get_user_name( get_msg_arg_int(1), _userName, charsmax(_userName) );
   TrieGetString( _hashList, _getType, _output, charsmax(_output) );
   
   replace(_getMessage, charsmax(_getMessage), "^"", "");
   format(_getMessage, charsmax(_getMessage), "%s ^x03%s : ^x01%s", _output,  _userName, _getMessage);
   
   !equali(_getType,"#Cstrike_Name_Change") ? set_msg_arg_string( 2, _getMessage ) : 1;  //#'" Somehow there is a unknown bug changing name which displace name :" xx, so this line code will fix it.
   
}

  • +
  • -
  • 1

#3 AvatarPoz91

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:14
  • GG:
  • Imię:Szymon
  • Lokalizacja:Poznań
Offline

Napisano 17.07.2017 19:07   Najlepsza odpowiedź

 

Spróbuj tego, powinno śmigać ;)

Dopisać do ;Chat / Messages :)

#include <amxmodx>

#pragma semicolon 1

new Trie:_hashList;

new const
   _getResult[][][] = { 
      { "#Cstrike_Chat_CT",         "^x01(Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_CT_Dead",    "^x01*DEAD* (Counter-Terrorist)^x01"},
      { "#Cstrike_Chat_All",        "^x03"},
      { "#Cstrike_Chat_Spec",       "^x01(Spectator)^x01"},
      { "#Cstrike_Chat_T",          "^x01(Terrorist)^x01"},
      { "#Cstrike_Chat_T_Dead",     "^x01*DEAD* (Terrorist)^x01"},
      { "#Cstrike_Chat_AllDead",    "^x01*DEAD*^x01"},
      { "#Cstrike_Chat_AllSpec",    "^x01*SPEC*^x01"}
   }
;

public plugin_end( )       TrieDestroy( _hashList );
public plugin_precache()   register_message(get_user_msgid("SayText"),"sayText_LastBuild_Hook");

public plugin_init(){
   
   register_plugin("Some shit", "1.0", "Spawner & SkillartzHD");
   
   _hashList = TrieCreate();
   for(new i; i < sizeof _getResult; i++)
      TrieSetString(  _hashList, _getResult[i][0], _getResult[i][1] );
   
}

public sayText_LastBuild_Hook(  ){
   
   // Isn't is user connected (->ingame) already checked?
   new _getMessage[ 192 ];
   read_args(_getMessage, charsmax(_getMessage));
   
   new _getType[ 24 ], _userName[ 32 ], _output[ 34 ];
   
   get_msg_arg_string(2, _getType, charsmax(_getType));
   get_user_name( get_msg_arg_int(1), _userName, charsmax(_userName) );
   TrieGetString( _hashList, _getType, _output, charsmax(_output) );
   
   replace(_getMessage, charsmax(_getMessage), "^"", "");
   format(_getMessage, charsmax(_getMessage), "%s ^x03%s : ^x01%s", _output,  _userName, _getMessage);
   
   !equali(_getType,"#Cstrike_Name_Change") ? set_msg_arg_string( 2, _getMessage ) : 1;  //#'" Somehow there is a unknown bug changing name which displace name :" xx, so this line code will fix it.
   
}

 

log - AMXX] Plugin file open error

( 13) Load fails: Plugin file open error (plugin "chattype1.amxx")

 

Sprawdziłem i problem z załadowaniem.

Lokalnie zrobione dobrze załadowane na serwer i błąd.

 

##############

 

Plugin załadowany i działa.

Ale zmian po nim nie widać.

Żadnych logów ani informacji w konsoli.

Chat nadal pokazuje "s".

 

 


Użytkownik AvatarPoz91 edytował ten post 17.07.2017 19:26

  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych