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

[TF2] how to check Round State and winning team?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Defal7
New Member
Join Date: Jul 2020
Location: Brazil
Old 07-07-2020 , 08:22   [TF2] how to check Round State and winning team?
Reply With Quote #1

I'm trying to make a plugin that stores which team has won and saving it to a SQL Database.
Some old threads were from CS modding so I don't know if it fits at my situation lol


Code:
public void OnPluginStart()
{
	HookEvent("teamplay_round_win", roundwin);
};

public action roundwin(Event event, const char[] team, bool dontBroadcast)
{
	int winnerTeam = GetEventInt(teamplay_round_win, "winner");
	
	if (winnerTeam)
	{
		PrintToChatAll("%s Won.", winnerTeam);
	}
        //God help me
};
Here is also my error file
Quote:
// C:\Program Files (x86)\Steam\steamapps\sourcemods\tf2classic\a ddons\sourcemod\scripting\RoundWin.sp(16) : warning 217: loose indentation
// C:\Program Files (x86)\Steam\steamapps\sourcemods\tf2classic\a ddons\sourcemod\scripting\RoundWin.sp(17) : error 010: invalid function or declaration
// C:\Program Files (x86)\Steam\steamapps\sourcemods\tf2classic\a ddons\sourcemod\scripting\RoundWin.sp(19) : error 139: could not find type "action"
// C:\Program Files (x86)\Steam\steamapps\sourcemods\tf2classic\a ddons\sourcemod\scripting\RoundWin.sp(21) : error 017: undefined symbol "teamplay_round_win"
// C:\Program Files (x86)\Steam\steamapps\sourcemods\tf2classic\a ddons\sourcemod\scripting\RoundWin.sp(27) : error 010: invalid function or declaration
First thread baby ;)
Defal7 is offline
SSheriFF
AlliedModders Donor
Join Date: May 2020
Location: Israel
Old 07-07-2020 , 08:50   Re: [TF2] how to check Round State and winning team?
Reply With Quote #2

You shouldnt put ";" in the end of every function...
__________________
Taking small private requests (Free) and big private requests (Paid).
Contact me via Discord: WilDick#1524

My Plugins:

Last edited by SSheriFF; 07-07-2020 at 08:51.
SSheriFF is offline
Defal7
New Member
Join Date: Jul 2020
Location: Brazil
Old 07-07-2020 , 09:11   Re: [TF2] how to check Round State and winning team?
Reply With Quote #3

Quote:
Originally Posted by SSheriFF View Post
You shouldnt put ";" in the end of every function...
Yes, thanks! I'm used to C# lol
Defal7 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:00.


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