|
Veteran Member
Join Date: Jul 2011
Location: Belgium
|
07-14-2023
, 07:05
Re: [ZombieMod] New round all to CT
|
#10
|
Quote:
Originally Posted by SoulWeaver16
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 iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum );
for( new i; i < iNum; i++ ) {
id = iPlayers[ i ];
if( cs_get_user_team( id ) == CS_TEAM_T )
cs_set_user_team( id, CS_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 CmdAllToCT( id, iLevel, iCid ) {
if( !cmd_access( id, iLevel, iCid, 1 ) )
return PLUGIN_HANDLED;
new iPlayers[ 32 ], iNum;
get_players( iPlayers, iNum, "e", "SPECTATOR" );
for( new i; i < iNum; i++ ) {
id = iPlayers[ i ];
cs_set_user_team( id, CS_TEAM_CT );
}
return PLUGIN_HANDLED;
}
__________________
|
|
|
|