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

Preventing Pause in Air for ProKreedz


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hey AM,

There are certain KZ maps that require you to fall from a certain height and perform bugs (jumpbug, edgebug, wallbug, etc), and people can pause their timer in air to reduce fall damage, thus allowing them to cross the map without doing any work.

Are there ways to allow the previous fall velocity to be added to the player on unpausing, or preventing pausing in air? I'm worried that the latter cannot be achieved because that would affect hook and noclip usage as well, but I'd like to know what you think.

Going through the ProKreedz 2.31's thread, I read that the Pause in Air was implemented after v2.3, so I found a snippet to prevent pausing in air, but I don't have a great idea as to how and where it should be placed to make it functional. The code snippet is showcased below:

Code:

public Pause(id) {
    if (get_pcvar_num(kz_pause) == 0) {
        kz_hud_message(id, "Pause is disabled")
        return PLUGIN_HANDLED
    }

    if (!timer_started[id]) {
        kz_hud_message(id, "Timer is not started")
        return PLUGIN_HANDLED
    }

    if (!is_user_alive(id)) {
        kz_hud_message(id, "You must be alive to use this command")
        return PLUGIN_HANDLED
    }


    if ((pev(id, pev_flags) & FL_ONGROUND2)) {
        if (!IsPaused[id]) {
            g_pausetime[id] = get_gametime() - timer_time[id]
            timer_time[id] = 0.0
            IsPaused[id] = true
            kz_hud_message(id, "Your timer has been paused")
            set_pev(id, pev_flags, pev(id, pev_flags) | FL_FROZEN)
            pev(id, pev_origin, PauseOrigin[id])
        } else {
            timer_time[id] = get_gametime() - g_pausetime[id] + timer_time[id]
            IsPaused[id] = false
            kz_hud_message(id, "Your timer has been unpaused")
            set_pev(id, pev_flags, pev(id, pev_flags) & ~FL_FROZEN)
        }
    } else
        kz_hud_message(id, "You must be on ground to get paused")

    return PLUGIN_HANDLED
}

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

×
×
  • Dodaj nową pozycję...