Wynik
redlaki
12.10.2008
u mnie nie dziala....nie restartuje sie wynik....moze mi dacie amxx tego co ty masz Endry to zobacze
[ Dodano: 12-10-2008, 18:32 ]
ten nie dziala....
[ Dodano: 12-10-2008, 18:32 ]
ten nie dziala....
/* Wynik by MaKeL v 1.1 */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Wynik" #define VERSION "1.1" #define AUTHOR "MaKeL" #define MAXSLOTS 32 enum Color { YELLOW = 1, // Żółty GREEN, // Zielony TEAM_COLOR, // Kolor dla Temu GREY, // Szary RED, // Czerwony BLUE, // Niebieski } new TeamInfo; new SayText; new MaxSlots; new TeamName[][] = { "", "TERRORIST", "CT", "SPECTATOR" } new bool:IsConnected[MAXSLOTS + 1]; new CT = 0 new TT = 0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0") register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin") register_logevent("restart", 2, "1=Restart_Round_(1_second)") TeamInfo = get_user_msgid("TeamInfo"); SayText = get_user_msgid("SayText"); MaxSlots = get_maxplayers(); } public restart(id) { CT = TT = 0 return PLUGIN_CONTINUE } public Nowa_Runda() { if(CT == TT) { ColorChat(0, GREY, "Remis ^x01%d : ^x01%d",CT,TT); } if(CT > TT) { ColorChat(0, BLUE, "Antyterrorysci ^x04prowadza ^x01%d : ^x01%d",CT,TT); } if(CT <TT) { ColorChat(0, RED, "Terrorysci ^x04prowadza ^x01%d : ^x01%d",TT,CT); } } public ct_win() { CT++ } public t_win() { TT++ } public client_putinserver(player) { IsConnected[player] = true; } public client_disconnect(player) { IsConnected[player] = false; } public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) { static message[256]; switch(type) { case YELLOW: // Yellow { message[0] = 0x01; } case GREEN: // Green { message[0] = 0x04; } default: // White, Red, Blue { message[0] = 0x03; } } vformat(message[1], 251, msg, 4); // Make sure message is not longer than 192 character. Will crash the server. message[192] = '^0'; new team, ColorChange, index, MSG_Type; if(!id) { index = FindPlayer(); MSG_Type = MSG_ALL; } else { MSG_Type = MSG_ONE; index = id; } team = get_user_team(index); ColorChange = ColorSelection(index, MSG_Type, type); ShowColorMessage(index, MSG_Type, message); if(ColorChange) { Team_Info(index, MSG_Type, TeamName[team]); } } ShowColorMessage(id, type, message[]) { message_begin(type, SayText, _, id); write_byte(id) write_string(message); message_end(); } Team_Info(id, type, team[]) { message_begin(type, TeamInfo, _, id); write_byte(id); write_string(team); message_end(); return 1; } ColorSelection(index, type, Color:Type) { switch(Type) { case RED: { return Team_Info(index, type, TeamName[1]); } case BLUE: { return Team_Info(index, type, TeamName[2]); } case GREY: { return Team_Info(index, type, TeamName[0]); } } return 0; } FindPlayer() { new i = -1; while(i <= MaxSlots) { if(IsConnected[++i]) { return i; } } return -1; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1045 f0 fs16 n par } */
Qbasss
30.12.2008
Znalazłem w pluginie błąd.
Co to może być? I jak to naprawić bo nie lubie jak mam w logach syf xDDD.
L 12/30/2008 - 16:06:42: [AMXX] Displaying debug trace (plugin "Wynik.amxx") L 12/30/2008 - 16:06:42: [AMXX] Run time error 4: index out of bounds L 12/30/2008 - 16:06:42: [AMXX] [0] Wynik.sma::ColorChat (line 133) L 12/30/2008 - 16:06:42: [AMXX] [1] Wynik.sma::Nowa_Runda (line 54)
Co to może być? I jak to naprawić bo nie lubie jak mam w logach syf xDDD.
mgr inż. Pavulon
30.12.2008
Spróbuj zmienić:
na:FindPlayer()
{
new i = -1;
while(i <= MaxSlots)
{
if(IsConnected[++i])
{
return i;
}
}
return -1;
}
FindPlayer() { new i = 0; while(i < MaxSlots) { if(IsConnected[++i]) { return i; } } return -1; }
Qbasss
01.01.2009
Kilka zmian, potwierdzone działanie. Proszę:
Niestety nie wszystko jest dobrze.Dalej jest jakiś błąd:
Log:
L01/01/2009 - 20:43:39: [AMXX] Run time error 4: index out of bounds L 01/01/2009 - 20:43:39: [AMXX] [0] Wynik.sma::ColorChat (line 121) L 01/01/2009 - 20:43:39: [AMXX] [1] Wynik.sma::Nowa_Runda (line 64)
R3X
01.01.2009
get_user_team(index) zwraca -1 dla CS_TEAM_UNASSIGNED. Stąd out of bounds. Dodałem:
if(team==-1) team=3;Po 112 linijce. Powinno sobie poradzić.
Qbasss
02.01.2009
get_user_team(index) zwraca -1 dla CS_TEAM_UNASSIGNED. Stąd out of bounds. Dodałem:
if(team==-1) team=3;Po 112 linijce. Powinno sobie poradzić.
To mam to gdzieś wpisać rozumiem ?
Jeśli tak to mógłbyś ty to zrobić i plik sma dać w załączniku?
byczynho
04.01.2009
Eh ... ja już się pogubiłem Która wersja jest dobra ? Albo raczej który załącznik pobrać ?
pawlik
04.01.2009
tenEh ... ja już się pogubiłem Która wersja jest dobra ? Albo raczej który załącznik pobrać ?
Muffin
20.02.2009
Spoko plugin ale chyba było za dużo zachodu ze zrobieniem go . NIe lepiej już nacisnąć tab ;>
woodpecker
09.06.2009
A jak zrobić, że dana drużyna osiągnie 12 rund wygranych to automatycznie zmienia się mapa?
Tyber
11.11.2009
Czy plugin restartuje wynik z nożówki?
Czy dalej zostaje nie zrestartowany?
Czy dalej zostaje nie zrestartowany?
.::PhaNtoMaS::.
20.05.2010
Nie chodzi mi plugin, dodaje do plugins.ini Wynik.amxx, dodaje do folderu plugins plik .amxx i wyskakuje mi błąd :
L 05/20/2010 - 16:48:13: [AMXX] Run time error 4 (plugin "Wynik.amxx") - debug not enabled! L 05/20/2010 - 16:48:13: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.iniCo źle robie lub czego nie robię ?