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

RSSProblem with zombie ghost class


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hello AlliedModders,

I put zombie class ghost but invisibility doesn't work at all, I don't know what it could be from ..

Plugin zombie ghost:
HTML Code:

#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <zombie_plague_advance>
#include <zombiexp>

new const zclass_name[] = "Sneaky Creature"
new const zclass_info[] = "[T]"
new const zclass_model[] = "hell_invisible"
new const zclass_clawmodel[] = "claws_light.mdl"
new const zclass_clawmodel_invi[] = "models/zombie_plague/claws_light_invisible.mdl"
const zclass_health = 16000
const zclass_speed = 370
const Float:zclass_gravity = 0.7
const Float:zclass_knockback = 1.2
const zclass_level = 25 // level required to use

new const zombie_sound_invisible[] = "zombie_plague/zsneaky_ability.wav"

new idclass
const Float:invisible_time = 10.0
const Float:invisible_timewait = 10.0
const invisible_dmg = 300
const Float:invisible_speed = 650.0
const Float:invisible_gravity = 0.5

new g_invisible[33], g_invisible_wait[33]
new g_maxplayers
new g_roundend

enum (+= 100)
{
        TASK_INVISIBLE = 2000,
        TASK_WAIT_INVISIBLE,
        TASK_INVISIBLE_SOUND
}

#define ID_INVISIBLE (taskid - TASK_INVISIBLE)
#define ID_WAIT_INVISIBLE (taskid - TASK_WAIT_INVISIBLE)
#define ID_INVISIBLE_SOUND (taskid - TASK_INVISIBLE_SOUND)

public plugin_init()
{
        register_plugin("Sneaky Creature", "1.0", "ALBTeam, Rainq")
       
        register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
        register_event("DeathMsg", "Death", "a")
        register_event("CurWeapon", "EventCurWeapon", "be", "1=1")
        register_logevent("logevent_round_end", 2, "1=Round_End")
       
        register_clcmd("impulse 201", "cmd_invisible")
        g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
        precache_model(zclass_clawmodel_invi)
        precache_sound(zombie_sound_invisible)
       
        idclass = zpxp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback, zclass_level)
}

public client_impulse(id, impulse)
{
        if(impulse == 201)
        {
                if(is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == idclass)
                {
                        cmd_invisible(id);
                        return PLUGIN_HANDLED;
                }
        }
        return PLUGIN_CONTINUE;
}

public client_putinserver(id)
{
        reset_value_player(id)
}

public client_disconnected(id)
{
        reset_value_player(id)
}

public event_round_start()
{
        g_roundend = 0
       
        for (new id=1; id<=g_maxplayers; id++)
        {       
                reset_value_player(id)
        }
}

public logevent_round_end()
{
        g_roundend = 1
}

public Death()
{
        new victim = read_data(2)
        reset_value_player(victim)
}

public EventCurWeapon(id)
{       
        if(g_invisible[id]) set_user_maxspeed(id, invisible_speed);
       
        return PLUGIN_CONTINUE;
}

public zp_user_humanized_post(id)
{
        reset_value_player(id)
}

public cmd_invisible(id)
{       
        if(is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == idclass && !g_invisible[id] && !g_invisible_wait[id])
        {
                g_invisible[id] = 1
               
                set_wpnmodel(id)
                set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha, 0)
                set_user_maxspeed(id, invisible_speed)
                set_user_gravity(id, invisible_gravity)
                PlayEmitSound(id, zombie_sound_invisible)
               
                set_task(invisible_time, "RemoveInvisible", id+TASK_INVISIBLE)

                client_print(id, print_center, "You can hide in the fog in %.1f seconds.", invisible_time)               
               
                return PLUGIN_HANDLED
        }
        if (g_roundend) return PLUGIN_CONTINUE
        return PLUGIN_CONTINUE
}

public RemoveInvisible(taskid)
{
        new id = ID_INVISIBLE
       
        g_invisible[id] = 0
       
        set_wpnmodel(id)
        set_user_rendering(id)
        set_user_maxspeed(id, float(zclass_speed))
        set_user_gravity(id, zclass_gravity)
       
        g_invisible_wait[id] = 1
       
        set_task(invisible_timewait, "RemoveWaitInvisible", id+TASK_WAIT_INVISIBLE)
}

public RemoveWaitInvisible(taskid) // Picarea n-are treaba de la asta
{
        new id = ID_WAIT_INVISIBLE
       
        g_invisible_wait[id] = 0
}

set_wpnmodel(id)
{       
        if (get_user_weapon(id) == CSW_KNIFE)
        {
                if (g_invisible[id])
                {
                        set_pev(id, pev_viewmodel2, zclass_clawmodel_invi)
                }
                else
                {
                        static temp[100]
                        format(temp, charsmax(temp), "models/zombie_plague/%s", zclass_clawmodel) // aici schimbati daca modelul de knife are alt fisier prestabilit,eu am lasat zombie_plague pentru ca asa are toata lumea
                        set_pev(id, pev_viewmodel2, temp)
                }
        }       
}

PlayEmitSound(id, const sound[])
{
        emit_sound(id, CHAN_VOICE, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
}

reset_value_player(id)
{
        g_invisible[id] = 0
        g_invisible_wait[id] = 0
       
        remove_task(id+TASK_INVISIBLE)
        remove_task(id+TASK_WAIT_INVISIBLE)
}

List plugins:
plugins-zplague.ini
HTML Code:

; - Quick tips -
; * Rename this file to disabled-zplague.ini to turn the mod off
; * Rename it back to plugins-zplague.ini to turn it on
; * Put a semi-colon in front of a plugin to disable it
; * Remove a semi-colon to re-enable a plugin
; * Add the word debug after a plugin to place it in debug mode

; Main plugin
zombiebasexp.amxx debug

; Zombie XP
zombie_xp.amxx debug

zp_save_ammo.amxx
zp_clase_oameni_zp.amxx

; Default zombie classes
zp_zclass_bhzombie.amxx
lvl11_zombie_creature_healing.amxx
zp_zclass_real_hunter_2.amxx
zp_zcls_tank.amxx
zombie_creature_boomer.amxx
zp_zclass_smoker.amxx
zp_zombie_classes_predator.amxx
zp_class_tight10c.amxx
zp_zclass_cerberusdog.amxx
zp_zclass_siren.amxx
Class_Banchee.amxx
zombie_creature_sneaky.amxx debug

;Human classes
1human.amxx
2human.amxx
3human.amxx
4human.amxx
5human.amxx
6human.amxx
7human.amxx
8human.amxx
9human.amxx
10human.amxx
11human.amxx
12human.amxx
13human.amxx
14human.amxx
15human.amxx
16human.amxx
17human.amxx
18human.amxx

; Add custom game modes here
zp_custom_gamemodes.amxx debug

; VIP
zm_vip_extra_human_armor.amxx
zp_vip_extra_no_recoil.amxx
teleport.amxx
zm_vip_extra_goldendg.amxx



; Add sub-plugins, custom zombie classes, and extra items here
zp_extra_items.amxx debug
zp_extra_drag_ability.amxx
zp_buy_health_points.amxx
zp_extra_plazmagun.amxx
zp_extra_balrog11.amxx
;zp_extra_lasermine.amxx
zp_extra_sandbags.amxx
zp_extra_buymode.amxx debug


;VIP
zm_vip.amxx
zp_nietoperz_2.amxx debug
zp_weapon_ak47_beast.amxx
azp_weapon_sfgun.amxx



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

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...