Raised This Month: $51 Target: $400
 12% 

[REQ] simple plugin for ZE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aminek
Junior Member
Join Date: Apr 2013
Old 06-26-2015 , 18:52   [REQ] simple plugin for ZE
Reply With Quote #1

Hello there everybody!

i need a simple plugin that would hold zombies for "X" seconds after the first zombie(s) had been nominated, it is normally included in the zombies escape mod i know, but i mixed the zombies escape with zombie plague to get the zombie plauge extra menu and items, and now the zombies get relesed in the exact same time at humans, giving them no chance to run away, what i would like on my plugin is:

1) holding zombies after the first zombie(s) had been nominated, and give a cvar to change the time that zombies should be held
2) send a central message on middle of all players screen saying "Zombies will be relesed in "X" seconds!! RUN! RUN!"

thanks for anyone who is weeling to help, i apreciate it alote
Kind reguards,
aminek is offline
aminek
Junior Member
Join Date: Apr 2013
Old 06-29-2015 , 12:46   Re: [REQ] simple plugin for ZE
Reply With Quote #2

Update: i found a plugin that could do all what am asking for, but has some errors and i would really love if someone could help me fixing these:

1) the freeze doesnt come on first round
2) the freeze last forever (doesnt unfreeze)
3) i want it to freeze ALL first zombies (like if there are 3 first zombies, then they all should be frozen not only one)

here is the code:

Code:
#include < amxmodx >
#include < fun >
#include < fakemeta >
#include < hamsandwich >

#include < zp50_core >
#include < zp50_colorchat >
 
#define _PLUGIN "[ZP50] Addon: Escape Servers"
#define _VERSION "1.0"
#define _AUTHOR "H.RED.ZONE"

// Bits.
#define flag_get(%1,%2)            ( %1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2)    (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2)            ( %1 |= (1 << (%2 & 31)))
#define flag_unset(%1,%2)          ( %1 &= ~(1 << (%2 & 31)))

// Task.
#define TASK_FROZEN    1444

// Bit.
new _bitPlayerBlocked

// Cvars.
new _pCvarTimeFrozen

// Call When Map Loads.
public plugin_init( ) {
    
    // Register Plugin.
    register_plugin( _PLUGIN, _VERSION, _AUTHOR)    
    
    // Register Ham.
    RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_knife", "FW__KnifeAttack" )
    RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_knife", "FW__KnifeAttack" )
    
    // Register Cvar.
    _pCvarTimeFrozen = register_cvar( "zp_escape_freeze", "5.0" )
}

// Call When Player is Infected.
public zp_fw_core_infect( id, attacker ) {
    
    // If User is First Zombie.
    if( zp_core_is_first_zombie(id) ) {
        
    
        // If Pev Not Valid Return.
        if( !pev_valid(id) )
            return
    
        // Print Message.
        zp_colored_print( id, "You are frozen." )
        
        // Mark Him As Blocked.
        flag_set( _bitPlayerBlocked, id )
        
        // Set User Frozen.
        set_pev( id, pev_flags, pev( id, pev_flags) | FL_FROZEN )
    
        // Set User God Mode.
        set_user_godmode( id, true )
        
        // Set task.
        set_task( get_pcvar_float(_pCvarTimeFrozen), "RemoveFreeze", id + TASK_FROZEN)
    }
}

// Are Task.
public RemoveFreeze( id ) {
    
    // If Pev Not Valid Return.
    if( !pev_valid(id) )
        return
    
    // Remove Frost.
    set_pev( id, pev_flags, pev( id, pev_flags ) & ~FL_FROZEN );
    
    // Print Message.
    zp_colored_print( id, "Infect humans now." )
    
    // Clear Player As Blocked.
    flag_unset( _bitPlayerBlocked, id )
    
    // Remove God Mode.
    set_user_godmode( id, false )
}

// For Blocking Attack.
public FW__KnifeAttack( Ent ) {
    
    // Get Owner.
    new id = pev( Ent, pev_owner )
    
    // Return So he Can't Attack.
    if( flag_get(_bitPlayerBlocked, id) )
        return HAM_SUPERCEDE
    
    // Ham Ignored.
    return HAM_IGNORED
}

// If Client Disconnects.
public client_disconnect( id ) {
    
    // Remove Task.
    remove_task(TASK_FROZEN)
    
    // UnMark Him.
    flag_unset( _bitPlayerBlocked, id )
}
__________________
aminek is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode