User
Pass
2FA
 
 

[rezolvat]Modificare plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message590
DRYincing07

[Mentally Stable]



Status: Offline
(since 11-02-2019 15:09)
Joined: 02 Feb 2017
Posts: 40, Topics: 13
Location: Romania

Reputation: 18.3
Votes: 1

Post Posted: 04-02-2017, 16:32:50 | Translate post to: ... (Click for more languages)

Nume: DRYincing
Descrie problema: Doresc un cvar pentru a putea seta cat DM poate lua witch ca sa cada din zbor.
»Poze/Sma.:
Code:
#include <amxmodx>
#include <biohazard>
#include <hamsandwich>
#include <fakemeta_util>

#define DISABLE_TIME 2.0
#define STR_T 32
#define MAX_PLAYERS 32
#define D_ZOMBIE_NAME "Witch (Zboara)"
#define D_ZOMBIE_DESC "Jump+Mouse"
#define D_PLAYER_MODEL "models/alex/babayaga/babayaga.mdl"
#define D_CLAWS "models/3.mdl"

new g_class
new cvar_speed, g_smoke, cvar_minillum, cvar_damage, cvar_delay

new Float:g_wallorigin[33][3]
new Float:g_nextdmg[33]
new Float:g_shoottime[33]
new bool:g_bCantFly[33]

public plugin_init() {         
    register_plugin("bio_crowzombie","1.2b","bipbip")
    is_biomod_active() ? plugin_init2() : pause("ad")
}
public plugin_precache() {
    precache_model(D_PLAYER_MODEL)
    precache_model(D_CLAWS)
    g_smoke = precache_model( "sprites/steam1.spr" )
}

public plugin_init2() {
   
    g_class = register_class(D_ZOMBIE_NAME, D_ZOMBIE_DESC)
    if(g_class != -1)
    {
        set_class_data(g_class, DATA_HEALTH, 444.0)
        set_class_data(g_class, DATA_SPEED, 280.0)
        set_class_data(g_class, DATA_GRAVITY, 0.4)
        set_class_data(g_class, DATA_REGENDLY, 0.3)
        set_class_pmodel(g_class, D_PLAYER_MODEL)
        set_class_wmodel(g_class, D_CLAWS)
    }
   
    cvar_speed = register_cvar("bh_zm_climbingspeed", "260")
    cvar_minillum = register_cvar("bh_zm_minlight", "300")
    cvar_damage = register_cvar("bh_zm_lightdamage", "0")
    cvar_delay = register_cvar("bh_zm_climbdelay", "0")
   
    RegisterHam(Ham_Touch, "player", "cheese_player_touch", 1)
    RegisterHam(Ham_Player_PreThink, "player", "cheese_player_prethink", 1)
    RegisterHam(Ham_TakeDamage, "player", "cheese_takedamage", 1)
}

public cheese_player_touch(id, world) {
   
    if(!is_user_alive(id) || g_class != get_user_class(id))
        return HAM_IGNORED
   
    new classname[STR_T]
    pev(world, pev_classname, classname, (STR_T-1))
   
    if(equal(classname, "worldspawn") || equal(classname, "func_wall") || equal(classname, "func_breakable"))
        pev(id, pev_origin, g_wallorigin[id])
    return HAM_IGNORED
   
}
public cheese_player_prethink(id) {
    // Player not alive or not zombie
    if(!is_user_alive(id) || !is_user_zombie(id)) {
        return HAM_IGNORED
    }
    static Float:test ; pev(id, pev_light_level, test)
   
    // Player has not our zombie class
    if(g_class != get_user_class(id)) {
        return HAM_IGNORED
    }
    static Float:origin[3]
    pev(id, pev_origin, origin)
   
    if (get_gametime() > g_nextdmg[id]) {
        static Float:lightlevel; pev(id,pev_light_level, lightlevel)
       
        if (lightlevel > get_pcvar_float(cvar_minillum)) {
            fm_fakedamage(id, "light", get_pcvar_float(cvar_damage), DMG_BURN)
           
            // do some smokes
            message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
            write_byte( TE_SMOKE )
            engfunc(EngFunc_WriteCoord, origin[ 0 ] )
            engfunc(EngFunc_WriteCoord, origin[ 1 ] )
            engfunc(EngFunc_WriteCoord, origin[ 2 ] )
            write_short( g_smoke )
            write_byte( 20 )
            write_byte( 10 )
            message_end()
            g_nextdmg[id] = get_gametime() + 1.0
        }
    }
   
    // from Cheap_Suit's  Upgrades Mod eXtended
    static button ; button = pev(id, pev_button)
    if(button & IN_JUMP && !g_bCantFly[id])
    {
        static Float:velocity[3]
        velocity_by_aim(id, get_pcvar_num(cvar_speed), velocity)
        fm_set_user_velocity(id, velocity)
    }
   
   
    return HAM_IGNORED
}
public event_infect(victim, attacker) {
    g_nextdmg[victim] = 0.0
    g_shoottime[victim] = 0.0
}
public cheese_takedamage(victim, inflictor, attacker, Float:damage, damagetype)
{
    if (is_user_alive(victim))
    {
        if (g_class == get_user_class(victim))
        {
            g_shoottime[victim] = get_gametime() + get_pcvar_float(cvar_delay);
           
            g_bCantFly[victim] = true;
           
            set_task(DISABLE_TIME, "Reset", victim)
        }
    }
    return HAM_IGNORED
}
public Reset(id) g_bCantFly[id] = false; 

0 0
  
Back to top
View user's profile Send private message
ZPLegendary

[Mentally Stable]



Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142, Topics: 7
Location: Polovragi, GJ

Reputation: 15.4
Votes: 17

     
Post Posted: 04-02-2017, 18:29:57 | Translate post to: ... (Click for more languages)

1. La nume in modelul de cerere trebuie sa pui numele pluginului, nu al tau =]]
2. Aceasta clasa de zm nici nu are functia la care doresti sa adaugi cvar-ul.
3. AICI ai cerut sa-ti adaugam ca zm sa cada jos daca primeste 50 dmg, ti-am adaugat asta, ce ai pus tu aici nici nu are ce ti-am adaugat eu.
4. Nu m-ai lamurit inca daca a functionat sau nu, daca functioneaza ce ti-am dat iti adaug si cvar si aia e.


Be the one, not anyone.
Currently working on Zombie Legendary 8.1


0 0
  
Back to top
View user's profile Send private message
DRYincing07

[Mentally Stable]



Status: Offline
(since 11-02-2019 15:09)
Joined: 02 Feb 2017
Posts: 40, Topics: 13
Location: Romania

Reputation: 18.3
Votes: 1

Post Posted: 04-02-2017, 20:10:43 | Translate post to: ... (Click for more languages)

NU merge! De asta am si facut alt topic. Tot pica Witch jos
0 0
  
Back to top
View user's profile Send private message
ZPLegendary

[Mentally Stable]



Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142, Topics: 7
Location: Polovragi, GJ

Reputation: 15.4
Votes: 17

     
Post Posted: 04-02-2017, 20:29:22 | Translate post to: ... (Click for more languages)

Vrei ca acea clasa de zombie sa pluteasca in aer pana cand primeste 50 dmg?
Daca nu va primi sa ramana in aer?


Be the one, not anyone.
Currently working on Zombie Legendary 8.1


0 0
  
Back to top
View user's profile Send private message
DRYincing07

[Mentally Stable]



Status: Offline
(since 11-02-2019 15:09)
Joined: 02 Feb 2017
Posts: 40, Topics: 13
Location: Romania

Reputation: 18.3
Votes: 1

Post Posted: 04-02-2017, 20:31:14 | Translate post to: ... (Click for more languages)

Exact. dar sa fie si mai mare de 50
0 0
  
Back to top
View user's profile Send private message
ZPLegendary

[Mentally Stable]



Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142, Topics: 7
Location: Polovragi, GJ

Reputation: 15.4
Votes: 17

     
Post Posted: 04-02-2017, 20:39:04 | Translate post to: ... (Click for more languages)

Vezi asa, ti-am adaugat si cvar ca sa setezi tu damage-ul.

Spoiler:


Be the one, not anyone.
Currently working on Zombie Legendary 8.1


0 0
  
Back to top
View user's profile Send private message
DRYincing07

[Mentally Stable]



Status: Offline
(since 11-02-2019 15:09)
Joined: 02 Feb 2017
Posts: 40, Topics: 13
Location: Romania

Reputation: 18.3
Votes: 1

Post Posted: 04-02-2017, 21:06:25 | Translate post to: ... (Click for more languages)

Da eroare la copilare!
AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Modified for http://www.Freakz.ro / amx.freakz.ro

witch.txt(15) : error 021: symbol already defined: "cvar_damage"
witch.txt(156) : warning 204: symbol is assigned a value that is never used: "cvar_delay"

1 Error.
Compilarea a esuat!

0 0
  
Back to top
View user's profile Send private message
ZPLegendary

[Mentally Stable]



Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142, Topics: 7
Location: Polovragi, GJ

Reputation: 15.4
Votes: 17

     
Post Posted: 04-02-2017, 22:57:51 | Translate post to: ... (Click for more languages)

vezi acum , nu vazusem ca mai era un cvar numit cvar_damage si eu am mai facut unul cu acelasi nume

Spoiler:


Be the one, not anyone.
Currently working on Zombie Legendary 8.1


0 0
  
Back to top
View user's profile Send private message
DRYincing07

[Mentally Stable]



Status: Offline
(since 11-02-2019 15:09)
Joined: 02 Feb 2017
Posts: 40, Topics: 13
Location: Romania

Reputation: 18.3
Votes: 1

Post Posted: 06-02-2017, 13:35:10 | Translate post to: ... (Click for more languages)

Scuze pentru intarziere. Merge! Multumesc foarte mult! T/C
0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by TheVipera, 06 February 2017 12:10



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 24-01-2025, 10:19:52
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x