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

Bug with RegConsoleCmd in TF2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 07-07-2008 , 15:08   Bug with RegConsoleCmd in TF2
Reply With Quote #1

Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

public Action:Command_Ent(Client, Arguments)
{
 new Ent;
 
 Ent = GetClientAimTarget(Client, false);
 PrintToChatAll("Ent %d", Ent);
}
 
public OnPluginStart()
{

 RegConsoleCmd("ent", Command_Ent);
 
}
When I run the "ent" command in-game in TF2 it returns as an error because the Client is 0. When it *Should* be a player id, i.e., 1.
I just took this into cs:s and it works fine, returning 1. And it works in sourcemod 1.0.0 on tf2, but not in 1.0.3.
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-07-2008 , 15:34   Re: Bug with RegConsoleCmd in TF2
Reply With Quote #2

Are you testing this on a listen server?
bl4nk is offline
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 07-07-2008 , 15:49   Re: Bug with RegConsoleCmd in TF2
Reply With Quote #3

Yeah, but when it worked on a listen server on 1.0.0 tf2 and works on a listen in 1.0.3 on cs:s, just not tf2 1.0.3
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-07-2008 , 19:19   Re: Bug with RegConsoleCmd in TF2
Reply With Quote #4

Most stuff doesn't work on client 0 (the server). Test your plugins on a dedicated server to make sure it works.
bl4nk 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 13:45.


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