Raised This Month: $ Target: $400
 0% 

[TF2] Search player with determinied class doesn't work..?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cidra
Junior Member
Join Date: Jun 2016
Location: Italy
Old 07-05-2016 , 16:33   Re: [TF2] Search player with determinied class doesn't work..?
Reply With Quote #1

Quote:
Originally Posted by Potato Uno View Post
Asherkin meant server error logs, not compiler error logs.

Look inside addons/sourcemod/logs for them.
Here is the log from the last game:

Code:
L 07/05/2016 - 21:05:36: [SM] Native "GetEntProp" reported: Property "m_iClass" not found (entity 0/worldspawn)
L 07/05/2016 - 21:05:36: [SM] Displaying call stack trace for plugin "HIGHLANDER PUB PROJECT.smx":
L 07/05/2016 - 21:05:36: [SM]   [0]  Line 372, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\include\tf2_stocks.inc::TF2_GetPlayerClass()
L 07/05/2016 - 21:05:36: [SM]   [1]  Line 31, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\HIGHLANDER PUB PROJECT.sp::IsBotIn()
L 07/05/2016 - 21:05:36: [SM]   [2]  Line 16, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\HIGHLANDER PUB PROJECT.sp::Event_ChangeClass()
I just can't figure out which is the problem in these lines. Is maybe a tag problem? (Is TFClassType an int value?)

Last edited by cidra; 07-05-2016 at 16:34.
cidra is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 07-05-2016 , 16:43   Re: [TF2] Search player with determinied class doesn't work..?
Reply With Quote #2

Quote:
Originally Posted by cidra View Post
Here is the log from the last game:

Code:
L 07/05/2016 - 21:05:36: [SM] Native "GetEntProp" reported: Property "m_iClass" not found (entity 0/worldspawn)
L 07/05/2016 - 21:05:36: [SM] Displaying call stack trace for plugin "HIGHLANDER PUB PROJECT.smx":
L 07/05/2016 - 21:05:36: [SM]   [0]  Line 372, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\include\tf2_stocks.inc::TF2_GetPlayerClass()
L 07/05/2016 - 21:05:36: [SM]   [1]  Line 31, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\HIGHLANDER PUB PROJECT.sp::IsBotIn()
L 07/05/2016 - 21:05:36: [SM]   [2]  Line 16, C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\addons\sourcemod\scripting\HIGHLANDER PUB PROJECT.sp::Event_ChangeClass()
I just can't figure out which is the problem in these lines. Is maybe a tag problem? (Is TFClassType an int value?)
Use this:
Code:
bool:IsBotIn(iTeam, iClass)
{
	for (new i = 1; i <= MaxClients ; i++)
	{
	if(IsClientConnected(i) && IsClientInGame(i) && _:TF2_GetPlayerClass(i) == iClass && GetClientTeam(i) == iTeam)
		{
		if (IsFakeClient(i))
			{
			return true;
			}
		else if (!IsFakeClient(i))
			{
			return false;
			}
		}
	}
return false;
}
__________________
luki1412 is offline
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 21:34.


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