Raised This Month: $32 Target: $400
 8% 

Solved /specall plugin for mix servers.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xMihai
Junior Member
Join Date: Jan 2018
Old 01-17-2018 , 05:23   /specall plugin for mix servers.
Reply With Quote #1

Hello! Glad to be part of Alliedmods!

If it's not annoying, can somebody make one plugin with a chat command called "/specall" with transfer all players ( dead or not ) at once at spectator team? I want to use it on my mix / war server. Thank you in advance! Have a great day!



Second problem, when i try to compile one plugin, i get this errors:

https://images2.imgbox.com/55/c2/LEPr33Oe_o.png

Quote:
#include < amxmodx >
#include < cstrike >

new g_Warm = 0;
new g_ON = 0;
new g_Count = 0;
new g_rCount = 0;
new g_Knives = 0;
new g_Starting = 0;
new g_Rounds = 0;
new g_Changed = 0;
new g_tT = 0;
new g_tCT = 0;

public plugin_init()
{
register_plugin( "match_system", "0.1", "compaq" );

register_event( "CurWeapon", "Current_Weapon", "be", "1=1", "2!29" );
register_event( "HLTV", "round_start", "a", "1=0", "2=0" );
register_event( "SendAudio","roundend","a","2=%!MRAD_terwin", "2=%!MRAD_ctwin","2=%!MRAD_rounddraw" );
register_event( "SendAudio","twin","a","2=%!MRAD_terwin" );
register_event( "SendAudio","ctwin","a","2=%!MRAD_ctwin" );

register_clcmd( "say /warm", "cmdWarm", ADMIN_KICK );
register_clcmd( "say /lame", "cmdKnives", ADMIN_KICK );
register_clcmd( "say /ready", "cmdReady", ADMIN_KICK );
register_clcmd( "say /pause", "cmdPause", ADMIN_KICK );
register_clcmd( "say /unpause", "cmdUPause", ADMIN_KICK );
register_clcmd( "say /start", "cmdStart", ADMIN_KICK );
register_clcmd( "say /password", "cmdP", ADMIN_KICK );
register_clcmd( "say /unpassword", "cmdUP", ADMIN_KICK );
register_clcmd( "say /stop", "cmdStop", ADMIN_KICK );
}

public cmdWarm( id )
{
g_Warm = 1;

if( g_Warm )
{
g_ON = 0;

set_cvar_string( "mp_friendlyfire", "0" );
set_cvar_string( "mp_startmoney", "16000" );
set_task( 120.0, "stopwarm" );
}
}

public stopwarm()
{
g_Warm = 0;
}

public cmdKnives( id )
{
g_Knives = 1;
set_task( 120.0, "Remove_Knives" );
}

public Current_Weapon( id )
{
if( g_Knives )
engclient_cmd( id, "weapon_knife" );
}

public Remove_Knives()
{
g_Knives = 0;
server_cmd( "sv_restart 1" );
}

public cmdReady( id )
{
g_Count++;

if( g_Count >= get_playersnum( 1 ) )
{
client_print( 0, print_chat, "[SYSTEM] Toti playerii sunt pregatiti!" );
}
}

public cmdPause( id )
{
server_cmd( "amx_pause 1" );
}

public cmdUPause( id )
{
server_cmd( "amx_unpause" );
}

public cmdStart( id )
{
g_Starting = 1;
g_ON = 1;

set_cvar_string( "mp_startmoney", "800" );
set_cvar_string( "mp_roundtime", "2" );

if( g_Starting )
{
server_cmd( "sv_restart 1" );
++g_rCount;

set_task( 1.5, "restart_again", _, _, _, "b" );
}

new iPlayers[ 32 ], iNum, i;
get_players( iPlayers, iNum );

for( i = 0; i < iNum; i++ )
{
client_cmd( iPlayers[ i ], "record ^"numedemo^"" );
}

}

public restart_again()
{
if( g_rCount >= 3 )
{
g_Starting = 0;
g_rCount = 0;
}

++g_rCount;
}

public roundend()
{
if( g_ON )
{
++g_Rounds;

if( g_Rounds >= 15 )
{
new iPlayers[ 32 ], iNum, i;
get_players( iPlayers, iNum );

for( i = 0; i < iNum; i++ )
{
new g = iPlayers[ i ];

switch( cs_get_user_team( g ) )
{
case CS_TEAM_T: cs_set_user_team( g, CS_TEAM_CT );
case CS_TEAM_CT: cs_set_user_team( g, CS_TEAM_T );
default: return 0;
}
}

g_Changed = 1;
}
}

return PLUGIN_CONTINUE;
}

public round_start()
{
if( g_Changed )
{
g_Starting = 1;

if( g_Starting )
{
server_cmd( "sv_restart 1" );
++g_rCount;

set_task( 1.5, "restart_again", _, _, _, "b" );
}

g_Changed = 0;
}

if( g_Rounds == 12 )
{
new iPlayers[ 32 ], iNum, i;
get_players( iPlayers, iNum );

for( i = 0; i < iNum; i++ )
{
new g = iPlayers[ i ];
client_print( 0, print_chat, "Balauru cu 7 capete" );
client_cmd( g, "snapshot" );
client_cmd( g, "snapshot" );
client_cmd( g, "toggleconsole" );
client_cmd( g, "cl_allowdownload" );
client_cmd( g, "cl_allowupload" );
// comenzile tale, fara valori
client_cmd( g, "snapshot" );
}
}
}

public cmdP( id )
{
new cmd[32], password[128];

read_argv(0, cmd, 31);
read_args(password, 127);
replace(password, 127, cmd, "");
format(password, 127, "%s", password);

set_cvar_string( "sv_password", password );

client_print( id, print_chat, "Password: %s", password );
}

public cmdUP( id )
{
set_cvar_string( "sv_password", "" );
}

public cmdStop( id )
{
if( g_tT > g_tCT )
client_print( 0, print_chat, "T au castigat cu %d - %d", g_tT, g_tCT );
else if( g_tCT > g_tT )
client_print( 0, print_chat, "CT au castigat cu %d - %d", g_tCT, g_tT );

g_ON = 0;
server_cmd( "sv_restart 1" );

new iPlayers[ 32 ], iNum, i;
get_players( iPlayers, iNum );

for( i = 0; i < iNum; i++ )
{
new g = iPlayers[ i ];
client_cmd( g, "stop" );
client_print( 0, print_chat, "Postati pozele si demourile." );
}
}

public twin()
{
g_tT++;
}

public ctwin()
{
g_tCT++;
}


Something wrong over there?

Last edited by xMihai; 01-17-2018 at 12:46. Reason: Added second problem. Hoperfully last one.
xMihai is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 01-17-2018 , 07:28   Re: /specall plugin for mix servers.
Reply With Quote #2

1) Search
2) It's just indentation error. No need to worry about it.
WhiteFang1319 is offline
xMihai
Junior Member
Join Date: Jan 2018
Old 01-17-2018 , 07:38   Re: /specall plugin for mix servers.
Reply With Quote #3

1. Can't really find it. Maybe doing something wrong on search field. Can you link me one? Pretty please.

2. Thank you.
xMihai is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-17-2018 , 08:44   Re: /specall plugin for mix servers.
Reply With Quote #4

There's a [code] tag for a reason. By putting it in [quote] you deleted its entire indentation.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

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 04:32.


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