Witam, mam problem, który mam nadzieję, pomożecie mi rozwiązać. Poniżej wrzucam info z logów.
L 03/23/2014 - 13:01:53: Start of error session.
L 03/23/2014 - 13:01:53: Info (map "de_train") (file "addons/amxmodx/logs/error_20140323.log")
L 03/23/2014 - 13:01:53: [AMXX] Displaying debug trace (plugin "harsay_nozowka.amxx")
L 03/23/2014 - 13:01:53: [AMXX] Run time error 4: index out of bounds
L 03/23/2014 - 13:01:53: [AMXX] [0] Untitled.sma::rozgrzewka (line 33)
L 03/23/2014 - 13:02:32: [AMXX] Displaying debug trace (plugin "harsay_nozowka.amxx")
L 03/23/2014 - 13:02:32: [AMXX] Run time error 4: index out of bounds
L 03/23/2014 - 13:02:32: [AMXX] [0] Untitled.sma::p_res (line 67)
Próbowałem zatrzymać podczas nożówki plugin "M_Antirusher" jednak jako, że jestem laikiem w kodowaniu najprawdopodobniej popełniłem jakiś błąd. Ogólnie funkcja, którą dodałem w 33 i 67 linii działa, jednak niepokojące są logi z serwera. Poniżej wrzucam sma edytowanego pliku. Liczę na Waszą pomoc.
// Nozowka w pierwszej rundzie.
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#define PLUGIN "Nozowka (1 runda)"
#define VERSION "0.2"
#define AUTHOR "Harsay"
new bool:rr = true
new bool:noze = false
new bool:gamec = false
new pluginy[][]= {
"m_antirusher_2.6_alfa.amxx"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("TextMsg","rozgrzewka","a","2&#Game_C")
register_event("SendAudio", "tt" , "a", "2&%!MRAD_terwin" );
register_event("SendAudio", "ct" , "a", "2&%!MRAD_ctwin" );
register_event("CurWeapon","switchweapon","be","1=1","2!29")
}
public rozgrzewka() {
if(rr==true) {
gamec = true
noze = true
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 Runda nozowa!");
}
for(new i=0; i<=sizeof(pluginy); i++){
pause("ac", pluginy[i]);
}
}
public tt() {
if(rr==true) {
if(gamec==true) {
noze = false
rr = false
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 Terrorysci wygrali runde nozowa!");
set_task(2.0, "p_res", 0)
}
}
}
public ct() {
if(rr==true) {
if(gamec==true) {
noze = false
rr = false
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 Anty-terrorysci wygrali runde nozowa!");
set_task(2.0, "p_res", 0)
}
}
}
public p_res() {
if (!rr) {
server_cmd("sv_restart 1")
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 #1 Restart");
set_task(1.0, "d_res", 0)
}
for(new i=0; i<=sizeof(pluginy); i++){
unpause("ac", pluginy[i]);
}
}
public d_res() {
if (!rr) {
server_cmd("sv_restart 1")
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 #2 Restart");
set_task(1.0, "t_res", 0)
}
}
public t_res() {
if (!rr) {
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 #3 Restart");
server_cmd("sv_restart 1")
set_task(1.0, "gamelive", 0)
}
}
public gamelive() {
if (!rr) {
ColorChat(0, GREEN, "^x04[TP ESL MAPS]^x01 * LIVE GL & HF *");
}
}
public switchweapon(id)
{
if (!noze)
return PLUGIN_CONTINUE
engclient_cmd(id,"weapon_knife")
return PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/