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

Plugin buguje


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 ` ManieK

    Profesjonalista

  • Zbanowany

Reputacja: 7
Nowy

  • Postów:194
  • GG:
  • Lokalizacja:Ciechanów
Offline

Napisano 10.10.2009 10:36

Witam proszę o poprawienie pluginu welcome (wyswietlanie w say przy wejsciu gracza na serwer ip serwer)

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <csx>

#define TEXT_LEN 127
#define MAX_LINES 5

new gmsgidSayText;

new gszHost[32];

new bool:gbFirst[33];
new gszMessage[MAX_LINES][TEXT_LEN];
new giPointer=0;

public plugin_init(){
	register_plugin("Welcome message", "1.1", "R3X");
	RegisterHam(Ham_Spawn, "player", "player_spawn", 1);
	
	new szFile[128], szLine[TEXT_LEN+1], iLen;
	get_configsdir(szFile, 95);
	add(szFile, 127,"/welcome.txt");
	
	if(!file_exists(szFile))
		return set_fail_state("Nie ma pliku welcome.txt");
	
	for(new i=0;read_file(szFile, i, szLine, TEXT_LEN, iLen);i++){
		if(iLen==0) continue;
		if(giPointer>=MAX_LINES) break;
		copy(gszMessage[giPointer++], TEXT_LEN, szLine);
	}
	get_user_name(0, gszHost, 31);
	
	gmsgidSayText = get_user_msgid("SayText");
	return PLUGIN_CONTINUE;
}

public client_putinserver(id)
	gbFirst[id] = true;

public player_spawn(id){
	if(gbFirst[id]){
		static szMessage[TEXT_LEN+1];
		szMessage[0]='^x01';
		
		for(new i=0;i<giPointer;i++){
			copy(szMessage[1], TEXT_LEN, gszMessage[i]);
			formatMessage(id, szMessage);
			print(id, szMessage);
		}
			
		gbFirst[id] = false;
	}
	return HAM_IGNORED;
}
formatMessage(id, szMessage[]){
	static szBuff[32];
	get_user_name(id, szBuff, 31);
	replace_all(szMessage, 95, "[you]", szBuff);
	
	static one[8], two[8];
	new poz = get_user_stats(id, one, two);
	formatex(szBuff, 31, "%d", poz);
	replace_all(szMessage, 95, "[rank]", szBuff);
	
	formatex(szBuff, 31, "%d", get_statsnum());
	replace_all(szMessage, 95, "[rank_max]", szBuff);
	
	replace_all(szMessage, 95, "[host]", gszHost);
	
	replace_all(szMessage, 95, "!t", "^x03");
	replace_all(szMessage, 95, "!n", "^x01");
	replace_all(szMessage, 95, "!g", "^x04");
}
print(id, const szMessage[]){
	message_begin(MSG_ONE,gmsgidSayText , _, id);
	write_byte(id);
	write_string(szMessage);
	message_end();
}



W logach mi buguje ten plugin

L 10/10/2009 - 10:53:38: replace() buffer not big enough (90>=86)
L 10/10/2009 - 10:53:38: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:53:38: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (90>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (98>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:54:09: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:54:09: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:54:09: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (90>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (98>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:56:01: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:56:01: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:56:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (90>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (98>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:57:23: replace() buffer not big enough (94>=86)
L 10/10/2009 - 10:57:23: [AMXX] Run time error 10 (plugin "welcome.amxx") (native "replace") - debug not enabled!
L 10/10/2009 - 10:57:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/10/2009 - 10:58:29: replace() buffer not big enough (87>=86)
L 10/10/2009 - 10:58:29: [AMXX] Run time error 10 (plugin "welcome.amxx") (native


#2 zer0.

    Godlike

  • Przyjaciel

Reputacja: 429
Wszechobecny

  • Postów:2 116
  • Steam:steam
  • Lokalizacja:Kw
Offline

Napisano 10.10.2009 10:38

Dopisz do welcome.amxx debug
welcome.amxx debug
  • +
  • -
  • 0

#3 ` ManieK

    Profesjonalista

  • Autor tematu
  • Zbanowany

Reputacja: 7
Nowy

  • Postów:194
  • GG:
  • Lokalizacja:Ciechanów
Offline

Napisano 10.10.2009 11:07

L 10/10/2009 - 12:03:28: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:28: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:28: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:29: replace() buffer not big enough (103>=86)
L 10/10/2009 - 12:03:29: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:29: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:29: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:29: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:29: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:31: replace() buffer not big enough (89>=86)
L 10/10/2009 - 12:03:31: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:31: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:31: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:31: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:31: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:32: replace() buffer not big enough (103>=86)
L 10/10/2009 - 12:03:32: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:32: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:32: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:32: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:32: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:32: replace() buffer not big enough (98>=86)
L 10/10/2009 - 12:03:32: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:32: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:32: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:32: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:32: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:32: replace() buffer not big enough (89>=86)
L 10/10/2009 - 12:03:32: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:32: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:32: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:32: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:32: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:34: replace() buffer not big enough (94>=86)
L 10/10/2009 - 12:03:34: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:34: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:34: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:34: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:34: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:50: replace() buffer not big enough (89>=86)
L 10/10/2009 - 12:03:50: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:50: [AMXX] Run time error 10: native error (native "replace")
L 10/10/2009 - 12:03:50: [AMXX]    [0] string.inc::replace_all (line 239)
L 10/10/2009 - 12:03:50: [AMXX]    [1] welcome.sma::formatMessage (line 60)
L 10/10/2009 - 12:03:50: [AMXX]    [2] welcome.sma::player_spawn (line 49)
L 10/10/2009 - 12:03:51: replace() buffer not big enough (94>=86)
L 10/10/2009 - 12:03:51: [AMXX] Displaying debug trace (plugin "welcome.amxx")
L 10/10/2009 - 12:03:51: [AMXX] Run time error 10: native error (native "replace")

nie wiem czy to to powoduje ze mi sie serwer wylacza raz na jakis czas




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

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