Raised This Month: $75 Target: $400
 18% 

Hosties 2.3.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
databomb
Veteran Member
Join Date: Jun 2009
Location: Los Angeles, CA
Old 09-24-2016 , 18:05   Hosties 2.3.0
Reply With Quote #1

Hosties 2.3.0 is now on the Beta branch on GitHub. This translates all of Hosties to the new SM syntax (thanks to Bara!). This will stay in the Beta stages for awhile for people to test. This new version drops support for SM 1.6. All of the change that were in the Beta branch (version 2.2.3) are now in the Master branch with the same version number.
__________________
Public Plugins | Please: No new private requests.
databomb is offline
j1gg
Senior Member
Join Date: Dec 2015
Old 12-09-2016 , 09:03   Re: Hosties 2.3.0
Reply With Quote #2

Where I can download newest verion of hosties?
__________________
j1gg is offline
weeeishy
Senior Member
Join Date: Jul 2015
Location: Kuwait
Old 12-09-2016 , 15:01   Re: Hosties 2.3.0
Reply With Quote #3

Quote:
Originally Posted by j1gg View Post
Where I can download newest verion of hosties?
here? https://github.com/dataviruset/sm-hosties/tree/beta
__________________
weeeishy is offline
YellowSwag
Senior Member
Join Date: Jul 2016
Old 12-09-2016 , 16:06   Re: Hosties 2.3.0
Reply With Quote #4

Quote:
Originally Posted by databomb View Post
Hosties 2.3.0 is now on the Beta branch on GitHub. This translates all of Hosties to the new SM syntax (thanks to Bara!). This will stay in the Beta stages for awhile for people to test. This new version drops support for SM 1.6. All of the change that were in the Beta branch (version 2.2.3) are now in the Master branch with the same version number.
hey databomb, i want to recommendation you (big) request, ONLY LR, without sm_hosties
YellowSwag is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 12-09-2016 , 17:30   Re: Hosties 2.3.0
Reply With Quote #5

Quote:
Originally Posted by j1gg View Post
Where I can download newest verion of hosties?
like weeeishy pointed you the source is on github and but you have to compile it for yourself using this small tut: https://forums.alliedmods.net/showthread.php?t=276863

and here: http://csgottt.com/hosties/ you can find the latest commits as binary (compiled) with baras sweet build script

Quote:
Originally Posted by YellowSwag View Post
hey databomb, i want to recommendation you (big) request, ONLY LR, without sm_hosties
I never tried it for myself, I'm not sure it work. You can deactivate unwanted modules in hosties sourcefile and compile it.

take a look at this part. https://github.com/dataviruset/sm-ho...ies.sp#L44-L69
PHP Code:

// Note: you cannot safely turn these modules on and off yet. Use cvars to disable functionality.

// Add ability to disable collisions for players
#define    MODULE_NOBLOCK                        1
// Add the last request system
#define    MODULE_LASTREQUEST                    1
// Add a game description override
#define    MODULE_GAMEDESCRIPTION                1
// Add start weapons for both teams
#define    MODULE_STARTWEAPONS                    1
// Add round-end team overlays
#define    MODULE_TEAMOVERLAYS                    1
// Add !rules command
#define    MODULE_RULES                        1
// Add !checkplayers command
#define    MODULE_CHECKPLAYERS                    1
// Add muting system
#define    MODULE_MUTE                            1
// Add freekill detection and prevention
#define    MODULE_FREEKILL                        1
// Add gun safety
#define    MODULE_GUNSAFETY                    1
// Add intelli-respawn
#define    MODULE_RESPAWN                        1
// Add control system
#define    MODULE_CONTROL                        0 

I tried to compile it with deactivated modules and this is a combination that compile fine. but not tested on a server.
PHP Code:
// Add ability to disable collisions for players
#define    MODULE_NOBLOCK                        1
// Add the last request system
#define    MODULE_LASTREQUEST                    1
// Add a game description override
#define    MODULE_GAMEDESCRIPTION                0
// Add start weapons for both teams
#define    MODULE_STARTWEAPONS                    0
// Add round-end team overlays
#define    MODULE_TEAMOVERLAYS                    0
// Add !rules command
#define    MODULE_RULES                        0
// Add !checkplayers command
#define    MODULE_CHECKPLAYERS                    0
// Add muting system
#define    MODULE_MUTE                            0
// Add freekill detection and prevention
#define    MODULE_FREEKILL                        1
// Add gun safety
#define    MODULE_GUNSAFETY                    0
// Add intelli-respawn
#define    MODULE_RESPAWN                        0
// Add control system
#define    MODULE_CONTROL                        0 
would be nice when you could test it and report back
__________________
free software
coding
shanapu is offline
YellowSwag
Senior Member
Join Date: Jul 2016
Old 12-10-2016 , 08:27   Re: Hosties 2.3.0
Reply With Quote #6

Quote:
Originally Posted by shanapu View Post
like weeeishy pointed you the source is on github and but you have to compile it for yourself using this small tut: https://forums.alliedmods.net/showthread.php?t=276863

and here: http://csgottt.com/hosties/ you can find the latest commits as binary (compiled) with baras sweet build script



I never tried it for myself, I'm not sure it work. You can deactivate unwanted modules in hosties sourcefile and compile it.

take a look at this part. https://github.com/dataviruset/sm-ho...ies.sp#L44-L69
PHP Code:

// Note: you cannot safely turn these modules on and off yet. Use cvars to disable functionality.

// Add ability to disable collisions for players
#define    MODULE_NOBLOCK                        1
// Add the last request system
#define    MODULE_LASTREQUEST                    1
// Add a game description override
#define    MODULE_GAMEDESCRIPTION                1
// Add start weapons for both teams
#define    MODULE_STARTWEAPONS                    1
// Add round-end team overlays
#define    MODULE_TEAMOVERLAYS                    1
// Add !rules command
#define    MODULE_RULES                        1
// Add !checkplayers command
#define    MODULE_CHECKPLAYERS                    1
// Add muting system
#define    MODULE_MUTE                            1
// Add freekill detection and prevention
#define    MODULE_FREEKILL                        1
// Add gun safety
#define    MODULE_GUNSAFETY                    1
// Add intelli-respawn
#define    MODULE_RESPAWN                        1
// Add control system
#define    MODULE_CONTROL                        0 

I tried to compile it with deactivated modules and this is a combination that compile fine. but not tested on a server.
PHP Code:
// Add ability to disable collisions for players
#define    MODULE_NOBLOCK                        1
// Add the last request system
#define    MODULE_LASTREQUEST                    1
// Add a game description override
#define    MODULE_GAMEDESCRIPTION                0
// Add start weapons for both teams
#define    MODULE_STARTWEAPONS                    0
// Add round-end team overlays
#define    MODULE_TEAMOVERLAYS                    0
// Add !rules command
#define    MODULE_RULES                        0
// Add !checkplayers command
#define    MODULE_CHECKPLAYERS                    0
// Add muting system
#define    MODULE_MUTE                            0
// Add freekill detection and prevention
#define    MODULE_FREEKILL                        1
// Add gun safety
#define    MODULE_GUNSAFETY                    0
// Add intelli-respawn
#define    MODULE_RESPAWN                        0
// Add control system
#define    MODULE_CONTROL                        0 
would be nice when you could test it and report back
i dont know how to do it, please you can give me a .smx file?
YellowSwag is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 12-10-2016 , 09:57   Re: Hosties 2.3.0
Reply With Quote #7

Quote:
Originally Posted by YellowSwag View Post
i dont know how to do it, please you can give me a .smx file?
No, but here is a tutorial (one of hundreds) "How To Compile" https://forums.alliedmods.net/showthread.php?t=276863

Providing or trusting in precompile binarys is not good/smart.
You don't know which code edits (may backdoors,...) are in the compiled plugin.

As a server operator compiling sourcecode(.sp) to binarys(.smx) is a basic requirement and if you still don't know how to do it, you should learn it now.
__________________
free software
coding
shanapu is offline
YellowSwag
Senior Member
Join Date: Jul 2016
Old 12-11-2016 , 10:01   Re: Hosties 2.3.0
Reply With Quote #8

Quote:
Originally Posted by shanapu View Post
No, but here is a tutorial (one of hundreds) "How To Compile" https://forums.alliedmods.net/showthread.php?t=276863

Providing or trusting in precompile binarys is not good/smart.
You don't know which code edits (may backdoors,...) are in the compiled plugin.

As a server operator compiling sourcecode(.sp) to binarys(.smx) is a basic requirement and if you still don't know how to do it, you should learn it now.
thanks but i know how to compile .sp file, i just need the full code, can you give me the full code? here? i have a problem with the download...
YellowSwag is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 12-11-2016 , 10:33   Re: Hosties 2.3.0
Reply With Quote #9

Quote:
Originally Posted by YellowSwag View Post
...i just need the full code, can you give me the full code? here? ...
https://github.com/dataviruset/sm-hosties/

?!?
__________________
free software
coding
shanapu is offline
YellowSwag
Senior Member
Join Date: Jul 2016
Old 12-11-2016 , 14:47   Re: Hosties 2.3.0
Reply With Quote #10

Quote:
Originally Posted by shanapu View Post
\sm_hosties.sp(25) : fatal error 182: cannot read from file:

code:

Code:
/*
 * SourceMod Hosties Project
 * by: SourceMod Hosties Dev Team
 *
 * This file is part of the SM Hosties project.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, version 3.0, as published by the
 * Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <adminmenu>
#include <sdkhooks>
#include <hosties>
#include <emitsoundany>

#undef REQUIRE_PLUGIN
#undef REQUIRE_EXTENSIONS
#tryinclude <SteamWorks>
#tryinclude <sourcebans>
#define REQUIRE_EXTENSIONS
#define REQUIRE_PLUGIN

// Compiler directives
#pragma 	semicolon 					1

// Constants
#define 	PLUGIN_VERSION				"2.2.3"
#define 	MAX_DISPLAYNAME_SIZE		64
#define 	MAX_DATAENTRY_SIZE			5
#define 	SERVERTAG					"SM Hosties v2.2"

// Note: you cannot safely turn these modules on and off yet. Use cvars to disable functionality.

// Add ability to disable collisions for players
#define	MODULE_NOBLOCK						1
// Add the last request system
#define	MODULE_LASTREQUEST					        1
// Add a game description override
#define	MODULE_GAMEDESCRIPTION				        0
// Add start weapons for both teams
#define	MODULE_STARTWEAPONS					0
// Add round-end team overlays
#define	MODULE_TEAMOVERLAYS					0
// Add !rules command
#define	MODULE_RULES						        0
// Add !checkplayers command
#define	MODULE_CHECKPLAYERS					0
// Add muting system
#define	MODULE_MUTE							0
// Add freekill detection and prevention
#define	MODULE_FREEKILL						0
// Add gun safety
#define	MODULE_GUNSAFETY					        0  
// Add intelli-respawn
#define	MODULE_RESPAWN						1
// Add control system
#define	MODULE_CONTROL						0

/******************************************************************************
                   !EDIT BELOW THIS COMMENT AT YOUR OWN PERIL!
******************************************************************************/

// Global vars
new bool:g_bSBAvailable = false; // SourceBans
new GameType:g_Game = Game_Unknown;

#if (MODULE_FREEKILL == 1)
new Handle:gH_Cvar_Freekill_Sound = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_Threshold = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_Notify = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_BanLength = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_Punishment = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_Reset = INVALID_HANDLE;
new Handle:gH_Cvar_Freekill_Sound_Mode = INVALID_HANDLE;
new String:gShadow_Freekill_Sound[PLATFORM_MAX_PATH];
new gShadow_Freekill_Threshold;
new gShadow_Freekill_BanLength;
new gShadow_Freekill_Reset;
new gShadow_Freekill_Sound_Mode;
new FreekillPunishment:gShadow_Freekill_Punishment;
new bool:gShadow_Freekill_Notify;
new gA_FreekillsOfCT[MAXPLAYERS+1];
#endif

new Handle:gH_TopMenu = INVALID_HANDLE;
new TopMenuObject:gM_Hosties = INVALID_TOPMENUOBJECT;

#if (MODULE_NOBLOCK == 1)
#include "hosties/noblock.sp"
#endif
#if (MODULE_LASTREQUEST == 1)
#include "hosties/lastrequest.sp"
#endif
#if (MODULE_GAMEDESCRIPTION == 1)
#include "hosties/gamedescription.sp"
#endif
#if (MODULE_STARTWEAPONS == 1)
#include "hosties/startweapons.sp"
#endif
#if (MODULE_TEAMOVERLAYS == 1)
#include "hosties/teamoverlays.sp"
#endif
#if (MODULE_RULES == 1)
#include "hosties/rules.sp"
#endif
#if (MODULE_CHECKPLAYERS == 1)
#include "hosties/checkplayers.sp"
#endif
#if (MODULE_MUTE == 1)
#include "hosties/muteprisoners.sp"
#endif
#if (MODULE_FREEKILL == 1)
#include "hosties/freekillers.sp"
#endif
#if (MODULE_GUNSAFETY == 1)
#include "hosties/gunsafety.sp"
#endif
#if (MODULE_RESPAWN == 1)
#include "hosties/respawn.sp"
#endif
#if (MODULE_CONTROL == 1)
#include "hosties/control.sp"
#endif

// ConVars
new Handle:gH_Cvar_Add_ServerTag = INVALID_HANDLE;
new Handle:gH_Cvar_Display_Advert = INVALID_HANDLE;

public Plugin:myinfo =
{
	name = "SM_Hosties v2",
	author = "databomb & dataviruset & comando",
	description = "Hosties/jailbreak plugin for SourceMod",
	version = PLUGIN_VERSION,
	url = "http://forums.alliedmods.net/showthread.php?t=108810"
};

public OnPluginStart()
{
	// Load translations
	LoadTranslations("common.phrases");
	LoadTranslations("hosties.phrases");

	// Events hooks
	HookEvent("round_start", Event_RoundStart);

	// Create ConVars
	gH_Cvar_Add_ServerTag = CreateConVar("sm_hosties_add_servertag", "1", "Enable or disable automatic adding of SM_Hosties in sv_tags (visible from the server browser in CS:S): 0 - disable, 1 - enable", FCVAR_NONE, true, 0.0, true, 1.0);
	gH_Cvar_Display_Advert = CreateConVar("sm_hosties_display_advert", "1", "Enable or disable the display of the Powered by SM Hosties message at the start of each round.", FCVAR_NONE, true, 0.0, true, 1.0);
	
	CreateConVar("sm_hosties_version", PLUGIN_VERSION, "SM_Hosties plugin version (unchangeable)", FCVAR_NONE|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
	
	RegAdminCmd("sm_hostiesadmin", Command_HostiesAdmin, ADMFLAG_SLAY);
	
	#if (MODULE_STARTWEAPONS == 1)
	StartWeapons_OnPluginStart();
	#endif
	#if (MODULE_NOBLOCK == 1)
	NoBlock_OnPluginStart();
	#endif
	#if (MODULE_CHECKPLAYERS == 1)
	CheckPlayers_OnPluginStart();
	#endif
	#if (MODULE_RULES == 1)
	Rules_OnPluginStart();
	#endif
	#if (MODULE_GAMEDESCRIPTION == 1)
	GameDescription_OnPluginStart();
	#endif
	#if (MODULE_TEAMOVERLAYS == 1)
	TeamOverlays_OnPluginStart();
	#endif
	#if (MODULE_LASTREQUEST == 1)
	LastRequest_OnPluginStart();
	#endif
	#if (MODULE_MUTE == 1)
	MutePrisoners_OnPluginStart();
	#endif
	#if (MODULE_FREEKILL == 1)
	Freekillers_OnPluginStart();
	#endif
	#if (MODULE_GUNSAFETY == 1)
	GunSafety_OnPluginStart();
	#endif
	#if (MODULE_RESPAWN == 1)
	Respawn_OnPluginStart();
	#endif
	#if (MODULE_CONTROL == 1)
	Control_OnPluginStart();
	#endif
	
	AutoExecConfig(true, "sm_hosties2");
}

public OnMapStart()
{
	#if (MODULE_TEAMOVERLAYS == 1)
	TeamOverlays_OnMapStart();
	#endif
	#if (MODULE_LASTREQUEST == 1)
	LastRequest_OnMapStart();
	#endif
	#if (MODULE_CONTROL == 1)
	Control_OnMapStart();
	#endif
}

public OnMapEnd()
{
	#if (MODULE_FREEKILL == 1)	
	Freekillers_OnMapEnd();
	#endif
}

public OnAllPluginsLoaded()
{
	if (LibraryExists("sourcebans"))
	{
		g_bSBAvailable = true;
	}
	
	new Handle:h_TopMenu = GetAdminTopMenu();
	if (LibraryExists("adminmenu") && (h_TopMenu != INVALID_HANDLE))
	{
		OnAdminMenuReady(h_TopMenu);
	}
	
	#if (MODULE_MUTE == 1)
	MutePrisoners_AllPluginsLoaded();
	#endif
}

public APLRes:AskPluginLoad2(Handle:h_Myself, bool:bLateLoaded, String:sError[], error_max)
{
	if (GetEngineVersion() == Engine_CSS)
	{
		g_Game = Game_CSS;
	}
	else if (GetEngineVersion() == Engine_CSGO)
	{
		g_Game = Game_CSGO;
	}
	else
	{
		SetFailState("Game is not supported.");
	}

	MarkNativeAsOptional("SteamWorks_SetGameDescription");

	LastRequest_APL();
	
	RegPluginLibrary("hosties");
	
	return APLRes_Success;
}

public OnLibraryAdded(const String:name[])
{
	if (StrEqual(name, "sourcebans"))
	{
		g_bSBAvailable = true;
	}
	else if (StrEqual(name, "adminmenu") && (GetAdminTopMenu() != INVALID_HANDLE))
	{
		OnAdminMenuReady(GetAdminTopMenu());
	}
}

public OnLibraryRemoved(const String:name[])
{
	if (StrEqual(name, "sourcebans"))
	{
		g_bSBAvailable = false;
	}
	else if (StrEqual(name, "adminmenu"))
	{
		gH_TopMenu = GetAdminTopMenu();
	}
}

public OnConfigsExecuted()
{
	if (GetConVarInt(gH_Cvar_Add_ServerTag) == 1)
	{
		new Handle:hTags = FindConVar("sv_tags");
		decl String:sTags[128];
		GetConVarString(hTags, sTags, sizeof(sTags));
		if (StrContains(sTags, SERVERTAG, false) == -1)
		{
			decl String:sTagsFormat[128];
			Format(sTagsFormat, sizeof(sTagsFormat), ", %s", SERVERTAG);
			
			StrCat(sTags, sizeof(sTags), sTagsFormat);
			SetConVarString(hTags, sTags);
		}
		CloseHandle(hTags);
	}
	
	#if (MODULE_FREEKILL == 1)
	Freekillers_OnConfigsExecuted();
	#endif
	#if (MODULE_MUTE == 1)
	MutePrisoners_OnConfigsExecuted();
	#endif
	#if (MODULE_CHECKPLAYERS == 1)
	CheckPlayers_OnConfigsExecuted();
	#endif
	#if (MODULE_GAMEDESCRIPTION == 1)
	GameDesc_OnConfigsExecuted();
	#endif
	#if (MODULE_TEAMOVERLAYS == 1)
	TeamOverlays_OnConfigsExecuted();
	#endif
	#if (MODULE_RULES == 1)
	Rules_OnConfigsExecuted();
	#endif
	#if (MODULE_LASTREQUEST == 1)
	LastRequest_OnConfigsExecuted();
	#endif
	#if (MODULE_NOBLOCK == 1)
	NoBlock_OnConfigsExecuted();
	#endif
	#if (MODULE_STARTWEAPONS == 1)
	StartWeapons_OnConfigsExecuted();
	#endif
}

public OnClientPutInServer(client)
{
	#if (MODULE_LASTREQUEST == 1)
	LastRequest_ClientPutInServer(client);
	#endif
	#if (MODULE_FREEKILL == 1)
	Freekillers_ClientPutInServer(client);
	#endif
}

public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
	if (GetConVarInt(gH_Cvar_Display_Advert))
	{
		// Print out a messages about SM_Hosties 
		PrintToChatAll(CHAT_BANNER, "Powered By Hosties");
	}
}

public OnAdminMenuReady(Handle:h_TopMenu)
{
	// block double calls
	if (h_TopMenu == gH_TopMenu)
	{
		return;
	}
	
	gH_TopMenu = h_TopMenu;
	
	// Build Hosties menu
	gM_Hosties = AddToTopMenu(gH_TopMenu, "Hosties", TopMenuObject_Category, HostiesCategoryHandler, INVALID_TOPMENUOBJECT);
	
	if (gM_Hosties == INVALID_TOPMENUOBJECT)
	{
		return;
	}
	
	// Let other modules add menu objects
	#if (MODULE_LASTREQUEST == 1)
	LastRequest_Menus(gH_TopMenu, gM_Hosties);
	#endif
	#if (MODULE_GUNSAFETY == 1)
	GunSafety_Menus(gH_TopMenu, gM_Hosties);
	#endif
	#if (MODULE_RESPAWN == 1)
	Respawn_Menus(gH_TopMenu, gM_Hosties);
	#endif
}

public Action:Command_HostiesAdmin(client, args)
{
	DisplayTopMenu(gH_TopMenu, client, TopMenuPosition_LastRoot);
	return Plugin_Handled;
}

public HostiesCategoryHandler(Handle:h_TopMenu, TopMenuAction:action, TopMenuObject:item, param, String:buffer[], maxlength)
{
	switch (action)
	{
		case (TopMenuAction_DisplayTitle):
		{
			if (item == gM_Hosties)
			{
				Format(buffer, maxlength, "Hosties:");
			}
		}
		case (TopMenuAction_DisplayOption):
		{
			if (item == gM_Hosties)
			{
				Format(buffer, maxlength, "Hosties");
			}
		}
	}
}

Last edited by YellowSwag; 12-11-2016 at 14:48.
YellowSwag 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 23:00.


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