Raised This Month: $ Target: $400
 0% 

Amx_match in CS tournament


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
adiction
Junior Member
Join Date: Oct 2007
Old 10-24-2007 , 13:49   Amx_match in CS tournament
Reply With Quote #1

Is possible make a script that associate the STEAM ID of the captains with their teams, and then, replace the line in amx_match command?

for example

abc|captain(CT) : /start
def|captain(T) : /start

[Console writes : rcon amx_match "abc" "def" mr15 cal recboth"]
then, the match can start with "all type ready" sistem, it doesnt matter.

can u do this 4 me?

im going to do a tournament and i need a method to exec amx_match by the most easy way 4 the captains without using rcon, or amx_match complete command, i mean, the most automaticly possible.

Thanks for your time again
waiting 4 help
adiction

Last edited by adiction; 11-01-2007 at 18:33.
adiction is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-26-2007 , 04:57   Re: Amx_match in CS tournament
Reply With Quote #2

First of all you establish global variables and hook the command.

Code:
new bool:g_started[2]; // t=0, ct=1 public plugin_init() {    register_clcmd( "say /start", "hook_startmatch" ); }

Then you process the hooked commands and adjust the global variables. If both global variables are set, start the match.

Code:
public hook_startmatch( id ) {    // Steamid bit would go here    new team = get_user_team( id );    g_started[team] = true;    if( g_started[0] && g_started[1] )       server_cmd( "amx_match abc def mr15 cal recboth" ); }

Then if you want to insert a steamid check, you do it where I commented above. First, at the very top, in the global variables, add a steamid global. Make sure you change "3" in the first brackets to how many you have.

Code:
new g_steamids[3][32] = {    "STEAM_0:1:123456",    "STEAM_0:0:789123",    "STEAM_0:1:234098234" }

Then, inside the hook_startmatch, where I commented to insert...

Code:
// Get user's steamid and declare match_found variable new steamid[32], bool:match_found; get_user_authid( id, steamid, 31 ); // Loop through steamids and check if any match for( new i; i < sizeof g_steamids; i++ )    if( equali( steamid, g_steamids[i] ) ) match_found = true; // If no steamid matches were found, get the hell outa here if( !match_found ) return PLUGIN_CONTINUE;

Now at the very bottom of the hook_startmatch function you'll have to add a return PLUGIN_CONTINUE -- otherwise you'll get a warning when you compile.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
adiction
Junior Member
Join Date: Oct 2007
Old 10-28-2007 , 17:55   Re: Amx_match in CS tournament
Reply With Quote #3

thanks, but that script doesnt connect the ID of captain with the amx_match command????
adiction is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-28-2007 , 21:53   Re: Amx_match in CS tournament
Reply With Quote #4

You have to make sure that the captain's steamid is defined in the global variable..
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
adiction
Junior Member
Join Date: Oct 2007
Old 10-29-2007 , 13:57   Re: Amx_match in CS tournament
Reply With Quote #5

this is chinesse 4 me , can u explain me?

i need this :

(CT)SK|fisker : /start
(T)fnatic f0rest : /start

then, the console writes :

amx_match sk fnatic mr15 cal recboth
[STEAM ID fisker = sk; STEAM ID f0rest = fnatic]


thanks !

Last edited by adiction; 11-03-2007 at 01:20.
adiction is offline
adiction
Junior Member
Join Date: Oct 2007
Old 11-01-2007 , 18:34   Re: Amx_match in CS tournament
Reply With Quote #6

up
adiction 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 01:21.


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