Raised This Month: $ Target: $400
 0% 

Split T into 2 Team Withe GLow+Block Attack Betwin them


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ozakong
Junior Member
Join Date: Oct 2010
Old 02-22-2013 , 17:57   Split T into 2 Team Withe GLow+Block Attack Betwin them
Reply With Quote #1

Well Hellow Am, I need a plugin thats make the T team Spelit into 2 team
Ex: There is 8 T - 4 Go into Red Glow, 4 Go into Blue Glow.
Then FrendlyFire Will Be Enebled, but team Red Cant Deal Damager to ather Team Red Mmber.
And When the round ends, its all go to normal, No FF, And No Glow.

Purpose: To put it into the /box menu, and maybe into a Day - in a Jail Plugin.
Is It Possibel For You To Make Such A Thing? and sorry for my english, ty.
ozakong is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 02-23-2013 , 17:27   Re: Split T into 2 Team Withe GLow+Block Attack Betwin them
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "Split Terrorists"
#define VERSION "1.0"
#define AUTHOR "akcaliberg"

#define ADMIN_FLAG ADMIN_KICK

new gTeam[33];
new 
bool:game_started;
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /split","cmdSplit")
    
register_concmd("amx_split","cmdSplit")
    
    
RegisterHam(Ham_TakeDamage,"player","fwd_HamTakeDamage",0)
    
register_logevent("eRoundEnd",2,"1=Round_End")
    
}
public 
cmdSplit(id) {
    if(!
access(id,ADMIN_FLAG)) {
        
client_print(id,print_chat,"You have no access to this command.")
        
console_print(id,"You have no access to this command.")
        return 
PLUGIN_HANDLED
    
}
    
    new 
players[32],inum;
    static 
tempidbool:redteam;
    
get_players(players,inum,"ae","TERRORIST")
    for(new 
i;i<inum;i++) {
        
tempid players[i];
        if(
redteam) {
            
fm_set_user_rendering(tempid,kRenderFxGlowShell,255,0,0,kRenderNormal,25);
            
gTeam[tempid] = 1;
        }
        else {
            
fm_set_user_rendering(tempid,kRenderFxGlowShell,0,0,255,kRenderNormal,25);
            
gTeam[tempid] = 2;
        }
        if(
redteam) {
            
redteam false;
            continue;
        }
        if(!
redteam) {
            
redteam true;
            continue;
        }
    }
    
set_cvar_num("mp_friendlyfire",1)
    
game_started true;
    return 
PLUGIN_HANDLED
}
public 
eRoundEnd() {
    new 
players[32],inum;
    
get_players(players,inum)
    for(new 
i;i<inum;i++) {
        
gTeam[players[i]] = 0;
        
fm_set_user_rendering(players[i],kRenderFxGlowShell,0,0,0,kRenderNormal,25)
    }
    
game_started false;
}
public 
fwd_HamTakeDamage(victiminflictorattackerFloat:damage) {
    if((
<= victim <= 32) && (<= attacker <= 32) && game_started) {
        if(
gTeam[victim] == gTeam[attacker]) {
            return 
HAM_SUPERCEDE
        
}
    }
    return 
HAM_IGNORED

try
akcaliberg 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 06:40.


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