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
 

Alien_01 - zdjęcie

Alien_01

Rejestracja: 25.04.2023
Aktualnie: Nieaktywny
Poza forum Ostatnio: 26.04.2023 15:42
-----

Moje posty

W temacie: Silnik Jb N1K1Cz'a

25.04.2023 20:04

To daj float.inc oraz string.inc i będzie po problemie

W temacie: Silnik Jb N1K1Cz'a

25.04.2023 19:43

A tego kodu czasem nie masz na JB ?

Float:operator*(Float:,_:)(Float:oper1, oper2)
{
    return oper1 * float(oper2);
}

Float:operator/(_:,Float:)(oper1, Float:oper2)
{
    return float(oper1) / oper2;
}

Float:operator+(Float:,_:)(Float:oper1, oper2)
{
    return oper1 + float(oper2);
}

Float:operator-(Float:,_:)(Float:oper1, oper2)
{
    return oper1 - float(oper2);
}

bool:operator==(Float:,Float:)(Float:oper1, Float:oper2)
{
    return floatcmp(oper1, oper2) == 0;
}

bool:operator!=(Float:,Float:)(Float:oper1, Float:oper2)
{
    return floatcmp(oper1, oper2) != 0;
}

bool:operator>(Float:,Float:)(Float:oper1, Float:oper2)
{
    return 0 < floatcmp(oper1, oper2);
}

bool:operator>=(Float:,Float:)(Float:oper1, Float:oper2)
{
    return 0 <= floatcmp(oper1, oper2);
}

bool:operator<(Float:,Float:)(Float:oper1, Float:oper2)
{
    return 0 > floatcmp(oper1, oper2);
}

bool:operator<=(Float:,Float:)(Float:oper1, Float:oper2)
{
    return 0 >= floatcmp(oper1, oper2);
}

replace_all(String:string[], len, String:what[], String:with[])
{
    new pos = 0;
    new var1 = contain(string, what);
    pos = var1;
    if (var1 == -1)
    {
        return 0;
    }
    new total = 0;
    new with_len = strlen(with);
    new diff = strlen(what) - with_len;
    new total_len = strlen(string);
    new temp_pos = 0;
    while (replace(string[pos], len - pos, what, with))
    {
        total++;
        pos = with_len + pos;
        total_len -= diff;
        if (pos >= total_len)
        {
            return total;
        }
        else
        {
            temp_pos = contain(string[pos], what);
            if (temp_pos == -1)
            {
                return total;
            }
            else
            {
                pos = temp_pos + pos;
            }
            return total;
        }
        return total;
    }
    return total;
}