Raised This Month: $ Target: $400
 0% 

[Dota 2] Jointeam Plugin Request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZZkirk
Junior Member
Join Date: Jul 2013
Old 07-09-2014 , 02:36   [Dota 2] Jointeam Plugin Request
Reply With Quote #1

Until now, you have to type "jointeam good" or "jointeam bad" when you join a Dota 2 dedicated server (unless you bind it to a key).

I want to request a simple plugin so that you can easily choose sides upon joining the dedicated server (just like in Counter-Strike).

Thanks in advance,
ZZkirk
ZZkirk is offline
Screamer89
Junior Member
Join Date: Sep 2014
Old 01-21-2015 , 14:25   Re: [Dota 2] Jointeam Plugin Request
Reply With Quote #2

Code:
#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.0"

public Plugin:myinfo = {
	name = "Dota 2 - Server side chooser.",
	author = "Screamer",
	description = "Server dire/radiant side chooser.",
	version = PLUGIN_VERSION,
	url = "http://suntar-tracker.ru"
}

public OnPluginStart(){
	AddCommandListener(Command_Say, "say");
	AddCommandListener(Command_Say, "say_team");
}

public Action:Command_Say(client, const String:command[], args){
	decl String:sayString[32];
	decl String:clientName[32];
	GetCmdArg(1,sayString,sizeof(sayString));
	GetClientName(client, clientName, sizeof(clientName));
	GetCmdArgString(sayString, sizeof(sayString));
	StripQuotes(sayString);
	
	if(!strcmp(sayString,"-g",false))
	{
		FakeClientCommand(client, "jointeam good");
		} 
		
    if(!strcmp(sayString,"-b",false))
	{
		FakeClientCommand(client, "jointeam bad");
		} 
		
	if(!strcmp(sayString,"-s",false))
	{
		FakeClientCommand(client, "jointeam spec");
		} 
}
Screamer89 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 05:14.


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