Raised This Month: $12 Target: $400
 3% 

Sourcemod for Dota 2?


Post New Thread Closed Thread   
 
Thread Tools Display Modes
ghostdlr
Senior Member
Join Date: Aug 2010
Old 04-11-2013 , 17:03   Re: Sourcemod for Dota 2?
#281

Thanks.

I started writing my plugin but I couldn't find a way to write something to server console , so I can check some stuff easier.

Neither of these work:
PrintToServer("something");

ServerCommand("echo something");
ghostdlr is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-11-2013 , 19:20   Re: Sourcemod for Dota 2?
#282

Quote:
Originally Posted by ghostdlr View Post
Thanks.

I started writing my plugin but I couldn't find a way to write something to server console , so I can check some stuff easier.

Neither of these work:
PrintToServer("something");

ServerCommand("echo something");
Those both work fine for me. Can you show your actual code?
psychonic is offline
Xliado
New Member
Join Date: Mar 2013
Old 04-11-2013 , 19:53   Re: Sourcemod for Dota 2?
#283

Does anybody know how to use spectator mode???

Last edited by Xliado; 04-11-2013 at 20:33.
Xliado is offline
kp3
New Member
Join Date: Mar 2013
Old 04-11-2013 , 22:23   Re: Sourcemod for Dota 2?
#284

I believe it is jointeam spectator/spectators
kp3 is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 04-12-2013 , 04:17   Re: Sourcemod for Dota 2?
#285

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

public Plugin:myinfo = 
{
	name = "New Plugin",
	author = "Unknown",
	description = "<- Description ->",
	version = "1.0",
	url = "<- URL ->"
}

public OnPluginStart()
{
	PrintToServer("Hello world!");
	ServerCommand("echo test");
}

public OnClientPutInServer(client){

	PrintToServer("Hello world!");
	ServerCommand("echo test");
}
Startup arguments: -console -game dota -port 1505 -ip my_ip +maxplayers 10 +map dota +exec server.cfg

Last edited by ghostdlr; 04-12-2013 at 04:28.
ghostdlr is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-12-2013 , 07:20   Re: Sourcemod for Dota 2?
#286

Quote:
Originally Posted by ghostdlr View Post
Code:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo = 
{
	name = "New Plugin",
	author = "Unknown",
	description = "<- Description ->",
	version = "1.0",
	url = "<- URL ->"
}

public OnPluginStart()
{
	PrintToServer("Hello world!");
	ServerCommand("echo test");
}

public OnClientPutInServer(client){

	PrintToServer("Hello world!");
	ServerCommand("echo test");
}
Startup arguments: -console -game dota -port 1505 -ip my_ip +maxplayers 10 +map dota +exec server.cfg
That works for me.

The ServerCommand one is slightly delayed there as server commands are queued and then processed at the top of each frame, and there's a lot going on at initial start, leading to a very long frame.

Dumb question, but did you compile the plugin and put the smx in sourcemod/plugins/ ? Does it display when you type "sm plugins list" into the console?



psychonic is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 04-12-2013 , 07:44   Re: Sourcemod for Dota 2?
#287

I found the problem ... I copied dota 2 server in another location and source mod thinks the plugins are in the old one .

How can I reset it for the new location?

Last edited by ghostdlr; 04-12-2013 at 07:51.
ghostdlr is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-12-2013 , 10:32   Re: Sourcemod for Dota 2?
#288

Quote:
Originally Posted by ghostdlr View Post
I found the problem ... I copied dota 2 server in another location and source mod thinks the plugins are in the old one .

How can I reset it for the new location?
I've not sure that I understand. MM:S and SM use paths relative to the game directory, not absolute paths. Are you maybe starting srcds with a shortcut to the old install?
psychonic is offline
IRANeverMore
Junior Member
Join Date: Apr 2013
Old 04-12-2013 , 13:18   Re: Sourcemod for Dota 2?
#289

1- psychonic whats "Dota2 connect fix" and "Dota modes" in your plugins ?
If they are useful would you mind if i ask you to post them ?
2- Why the server crashes when i enter "exec server.cfg" command ?
IRANeverMore is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-12-2013 , 13:25   Re: Sourcemod for Dota 2?
#290

Quote:
Originally Posted by IRANeverMore View Post
1- psychonic whats "Dota2 connect fix" and "Dota modes" in your plugins ?
Dota 2 Connect Fix was just an early version of a portion of what became D2Fixups. The one listed though is actually something else. It's now just an SM extension that I use to test various things. I never changed the name of it.

Dota Modes is just an early version of Drifter's OMG/LOD extension here, https://forums.alliedmods.net/showthread.php?t=212785

Quote:
Originally Posted by IRANeverMore View Post
2- Why the server crashes when i enter "exec server.cfg" command ?
I don't know; it works fine for me. Is your server.cfg in <install dir>/dota/cfg/ ? What's in your server.cfg, maybe something executed in there that is causing the crash?
psychonic is offline
Closed Thread


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 20:36.


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