View Single Post
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 07-14-2023 , 07:05   Re: [ZombieMod] New round all to CT
Reply With Quote #10

Quote:
Originally Posted by SoulWeaver16 View Post
Yes, the polymorph is configured correctly, in addition, it is something that all Zombie modes do, the players are distributed equally at the beginning of the round, until a new Zombie is chosen or a special mode begins, it is something that I can do manually, the thing it would automate it, that's why what I was looking for is that it will send an "amx_ct" or "amx_transfer @all CT" type command from the plugin "All spec transfer to CT" but this should be done automatically each round start without having to enter commands
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta >
 
#define MAX_CLIENTS 32
 
new bool:g_bPlayerNonSpawnEvent[MAX_CLIENTS 1]
 
new 
g_iFwFmClientCommandPost

public plugin_init( ) {
register_plugin"All to CT ZombieMod""1.0""xPaw edit" );
    
register_event("AllToCT""CmdAllToCT""b");
}

public 
CmdAllToCT(iPlayerId) {
        if (!
is_user_alive(iPlayerId))
                return
   
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum );
    
    for( new 
iiNumi++ ) {
        
id iPlayers];
        
        if( 
cs_get_user_teamid ) == CS_TEAM_T )
            
cs_set_user_teamidCS_TEAM_CT );
    }
    
    return 
PLUGIN_HANDLED;

Could this work?
I don't know, I tried to edit it to what seems to me in my common sense, but I don't know anything hahaha
The original sma of that post said the OP didn't help him
The way of retrieving the player's team is wrong, here's a fix to that code.

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >

public plugin_init( ) {
    
register_plugin"All to CT""1.0""xPaw" );
    
    
register_concmd"amx_ct""CmdAllToCT"ADMIN_KICK );
}

public 
CmdAllToCTidiLeveliCid ) {
    if( !
cmd_accessidiLeveliCid) )
        return 
PLUGIN_HANDLED;
    
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum"e""SPECTATOR" );
    
    for( new 
iiNumi++ ) {
        
id iPlayers];
        
cs_set_user_teamidCS_TEAM_CT );
    }
    
    return 
PLUGIN_HANDLED;

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be