Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

Plugin się nie kompiluje, jak to poprawić?


Xxcarbon22xX
 Udostępnij

Rekomendowane odpowiedzi

Witam,
Mam problem z pewnymi pluginami. Pluginy te mają ukrywać na czacie wiadomośći o dojściu do drużyny, wyjściu z serwera oraz o wejściu na serwer.

 

Przy próbie kompilacji wyskakuje mi błąd: "error 017: undefined symbol "active_zombie_riot""
Kompilowałem to jako 3 oddzielne pluginy.


Proszę o pomoc

Oto kod

/***********************************************************/
/********************** PLAYER CONNECT *********************/
/***********************************************************/
public Action PlayerConnect(Handle event, const char[] name, bool dontBroadcast)
{
    if(B_active_zombie_riot)
    {
        if(!dontBroadcast)
        {
            char S_name[32], networkID[22], address[26];
            GetEventString(event, "name", S_name, sizeof(S_name)-1);
            GetEventString(event, "networkid", networkID, sizeof(networkID)-1);
            GetEventString(event, "address", address, sizeof(address)-1);
            
            Handle new_event = CreateEvent("player_connect", true);
            SetEventString(new_event, "name", S_name);
            SetEventInt(new_event, "index", GetEventInt(event, "index"));
            SetEventInt(new_event, "userid", GetEventInt(event, "userid"));
            SetEventString(new_event, "networkid", networkID);
            SetEventString(new_event, "address", address);
            
            FireEvent(new_event, true);
            
            return Plugin_Handled;
        }
    }
    return Plugin_Continue;
}

/***********************************************************/
/********************* PLAYER DISCONNECT *******************/
/***********************************************************/
public Action PlayerDisconnect(Handle event, const char[] name, bool dontBroadcast)
{
    if(B_active_zombie_riot)
    {
        if(!dontBroadcast)
        {
            char S_name[32], networkID[22], address[26];
            GetEventString(event, "name", S_name, sizeof(S_name)-1);
            GetEventString(event, "networkid", networkID, sizeof(networkID)-1);
            GetEventString(event, "address", address, sizeof(address)-1);
            
            Handle new_event = CreateEvent("player_disconnect", true);
            SetEventString(new_event, "name", S_name);
            SetEventInt(new_event, "index", GetEventInt(event, "index"));
            SetEventInt(new_event, "userid", GetEventInt(event, "userid"));
            SetEventString(new_event, "networkid", networkID);
            SetEventString(new_event, "address", address);
            
            FireEvent(new_event, true);
            
            return Plugin_Handled;
        }
    }
    return Plugin_Continue;
}  
/***********************************************************/
/*********************** PLAYER TEAM PRE********************/
/***********************************************************/
public Action PlayerTeam_Pre(Handle event, const char[] name, bool dontBroadcast)
{
    if(B_active_zombie_riot)
    {
        
        if(!dontBroadcast)
        {
            Handle new_event = CreateEvent("player_team", true);
            
            SetEventInt(new_event, "userid", GetEventInt(event, "userid"));
            SetEventInt(new_event, "team", GetEventInt(event, "team"));
            SetEventInt(new_event, "oldteam", GetEventInt(event, "oldteam"));
            SetEventBool(new_event, "disconnect", GetEventBool(event, "disconnect"));
            
            FireEvent(new_event, true);
            
            return Plugin_Handled;
        }
    }
    return Plugin_Continue;
}  

 

Edytowane przez Xxcarbon22xX
Odnośnik do komentarza
Udostępnij na innych stronach

  • 1 miesiąc temu...

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

×
×
  • Dodaj nową pozycję...