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 Message1305
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: 02-02-2017, 14:44:35 | Translate post to: ... (Click for more languages)

Buna ziua!

Doresc o mica modificare la acest plugin.
Ce vreau sa contina modificare:
- un cvar in care pot seta cat dmg sa primeasca pentru a pica din zbor jos Witch. (ex:la 50dm dat de un player sa pice jos, iar daca playerul nu ii da 50dm, sa stea in aer").

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: 02-02-2017, 18:43:14 | Translate post to: ... (Click for more languages)

Vezi asa
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: 02-02-2017, 21:19:03 | Translate post to: ... (Click for more languages)

Salut! Nu merge! Tot pica 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: 02-02-2017, 21:42:15 | Translate post to: ... (Click for more languages)

Vezi asa
Am si imbunatatil codul putin.

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: 02-02-2017, 22:18:52 | Translate post to: ... (Click for more languages)

Imi sa eroare la copilare..
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: 02-02-2017, 22:31:43 | Translate post to: ... (Click for more languages)

spune ce eroare sa o pot repara

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: 03-02-2017, 00:36:00 | Translate post to: ... (Click for more languages)

A aparut o eroare la compilare, verificati logul alaturat pentru a depista problema.

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

New Text Document (2).txt(144) : error 010: invalid function or declaration

1 Error.
Compilarea a esuat!

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

[GOOGLE SEARCHER]



Status: Offline
(since 17-05-2023 01:23)
Joined: 04 May 2007
Posts: 6962, Topics: 147
Location: Romania

Reputation: 2724.4
Votes: 231

 
Post Posted: 03-02-2017, 01:28:47 | Translate post to: ... (Click for more languages)

Normal ca iti da eroare daca vrei sa compilezi un fisier .txt
Pluginul se compileaza perfect, iar voi aveti un model dupa care se fac cererile, nu mai faceti la intamplare.



0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


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

Locked by TwisTer, 02 February 2017 23:29



 
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 19-04-2024, 06:05:57
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