Raised This Month: $44 Target: $400
 11% 

[HLDS Linux] Server makes players quit at the half of loading section without reason.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 08-09-2022 , 20:40   [HLDS Linux] Server makes players quit at the half of loading section without reason.
Reply With Quote #1

One of my plugins causes the problem above but can' t share them because of privacy reasons. I think the startup command may cause this problem:
Code:
./hlds_run -console -game [hidden] -port 27021 -sport 26900 +map de_dust2 +maxplayers 21 -pingboost 0 -strictportbind -norestart -debug -condebug -noipx +sv_lan 0 -nojoy -insecure
Plugins used to work without problems in my previous windows server

Last edited by Snake.; 08-17-2022 at 00:37.
Snake. is offline
Send a message via Skype™ to Snake.
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: United States
Old 08-09-2022 , 23:56   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #2

Thats fine
__________________
bigdaddy424 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-10-2022 , 00:28   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #3

You said "one of [your] plugins causes the problem" but then you say "[You] think the startup command may cause the problem". So, which is it?

If you think it's the plugin, why do you think that? Did you disable the plugin to see if it still happens?

If you think it's the command line, did you try the minimum options?

Why would you hide the -game argument?
__________________
fysiks is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 08-10-2022 , 06:13   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
You said "one of [your] plugins causes the problem" but then you say "[You] think the startup command may cause the problem". So, which is it?
Well, the problem is plugin but as i said, it used to work without problems on my previous windows server.

Quote:
Originally Posted by fysiks View Post
[If you think it's the plugin, why do you think that? Did you disable the plugin to see if it still happens?
Sure, i was able to join the server without these plugins.

Quote:
Originally Posted by fysiks View Post
you think it's the command line, did you try the minimum options?
Well, im lack of knowledge about the linux startup command and not able to change it because it's set by hosting. I told them the problem but couldn't get a proper response.

Quote:
Originally Posted by fysiks View Post
would you hide the -game argument?
I didn't do that but i may have them changed it if you think it may cause a problem
Snake. is offline
Send a message via Skype™ to Snake.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-11-2022 , 00:31   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #5

If it is indeed in the plugin then we can't really do much debugging without the source code. In theory, it shouldn't matter what operating system it's running on but that's just theory.

Regarding the -game, I was just not sure if you were trying to hide the game type because maybe it's not something that is not supported by AMX Mod X. What game is it?
__________________
fysiks is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 08-12-2022 , 17:51   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
If it is indeed in the plugin then we can't really do much debugging without the source code. In theory, it shouldn't matter what operating system it's running on but that's just theory.

Regarding the -game, I was just not sure if you were trying to hide the game type because maybe it's not something that is not supported by AMX Mod X. What game is it?
The problem was caused by a plugin. I fixed it. Thank you for you help anyway
Snake. is offline
Send a message via Skype™ to Snake.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2022 , 21:48   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #7

It was hard to help you with the issue since you didn't provide any information about your plugins but it's nice to know that you were able to resolve it. Do you know what specifically in the plugin caused the issue? It would be helpful to explain what the issue was in case some future user runs into the same issue.
__________________
fysiks is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 08-14-2022 , 20:33   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
It was hard to help you with the issue since you didn't provide any information about your plugins but it's nice to know that you were able to resolve it. Do you know what specifically in the plugin caused the issue? It would be helpful to explain what the issue was in case some future user runs into the same issue.
You are right and i also need the plugin to be fixed, here how that problem occurs: When i add { "Abstract", 400, "models/usp/v_usp_abstract.mdl", "models/p_usp.mdl" }, to new const USPSkins[][skin_e], i can't enter the server even though it's running. There is no model error.

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <hamsandwich>
#include <fvault>
#include <fakemeta>

#define MAX_PLAYERS 32

#pragma compress 1

native back_skin_menu( id )

new const SkinVault[] = "DeathRun_USP_Knife";

new g_bitOwnedUSPs[MAX_PLAYERS+1], g_iEquippedUSP[MAX_PLAYERS+1]
new g_bitOwnedKnifes[MAX_PLAYERS+1], g_iEquippedKnife[MAX_PLAYERS+1]


#define BIT(%0) (1<<%0)

native get_dr_points( id )
native set_dr_points( id, amount )

new g_iUID[ 33 ]

enum _:skin_e
{
	SKIN_NAME[32],
	SKIN_COST,
	SKIN_V_MODEL[64],
	SKIN_P_MODEL[64],
};


new const USPSkins[][skin_e] =
{
	{ "Default USP" }, // Always keep this USP
	{ "Fov USP", 100, "models/usp/v_usp_fov.mdl", "models/p_usp.mdl" },
	{ "Laser USP", 150, "models/usp/v_usp_laser.mdl", "models/p_usp.mdl" },
	{ "No Hand USP", 200, "models/usp/v_no_hand.mdl", "models/p_usp.mdl" },
	{ "Chrome Slide", 250, "models/usp/v_chrome_slide.mdl", "models/p_usp.mdl" },
	{ "Guardian", 300, "models/usp/v_guardian.mdl", "models/p_usp.mdl" },
	{ "Black Sleeve", 350, "models/usp/v_black_sleeve.mdl", "models/p_usp.mdl" },
	{ "Brutal Sleeve", 380, "models/usp/v_brutal_sleeve.mdl", "models/p_usp.mdl" },
};
new const KnifeSkins[][skin_e] =
{
	{ "Default Knife" }, // Always keep this Knife
	{ "Fov Knife", 100, "models/knife/v_knife_fov.mdl", "models/p_knife.mdl" },
	{ "Spiderman", 150, "models/knife/v_spiderman.mdl", "models/p_knife.mdl" },
	{ "Blue", 200, "models/knife/v_blue_default.mdl", "models/p_knife.mdl" },
	{ "Veteran", 250, "models/knife/v_veteran.mdl", "models/p_knife.mdl" },
	{ "Among Us", 300, "models/knife/v_among.mdl", "models/p_knife.mdl" },
	{ "Gray KZ", 400, "models/knife/v_graykz.mdl", "models/p_knife.mdl" },
	{ "Fire Carbon", 450, "models/knife/v_fire_carbon.mdl", "models/p_knife.mdl" },
	{ "Tattoo", 550, "models/knife/v_tattoo.mdl", "models/p_knife.mdl" },
	{ "Tattoo White", 600, "models/knife/v_tattoo_white.mdl", "models/p_knife.mdl" },
	{ "Black&White", 650, "models/knife/v_blackwhite.mdl", "models/p_knife.mdl" },
	{ "Blue Lori", 700, "models/knife/v_bluelori.mdl", "models/p_knife.mdl" },
	{ "Orange Commander", 750, "models/knife/v_orangecoma.mdl", "models/p_knife.mdl" },
	{ "Venom", 800, "models/knife/v_venom.mdl", "models/p_knife.mdl" },
	{ "Kreedz", 850, "models/knife/v_kz.mdl", "models/p_knife.mdl" },
	{ "Foot Red", 900, "models/knife/v_footred.mdl", "models/p_knife.mdl" },
	{ "Razer", 1000, "models/knife/v_razer.mdl", "models/p_knife.mdl" },
	{ "Sharp", 1500, "models/knife/v_sharp.mdl", "models/p_knife.mdl" },
	{ "Bayonet Safari", 2000, "models/knife/v_bayonet_safari.mdl", "models/p_knife.mdl" },
};


public plugin_init()
{
	register_plugin( "DR Usp/Knife Menu", "1.0", "author" )
	RegisterHam( Ham_Item_Deploy, "weapon_usp", "CUSP_Deploy_Post", true )
	RegisterHam( Ham_Item_Deploy, "weapon_knife", "CKnife_Deploy_Post", true )
	register_dictionary( "deathrun.txt" )
	set_task( 3.0, "curl_example", 0 )
}
public plugin_natives()
{
	register_native( "usp_menu", "USPMenu", 1 )
	register_native( "knife_menu", "KnifeMenu", 1 )
}
public plugin_precache()
{
	for (new i = 0; i < sizeof USPSkins; i++)
	{
		if (USPSkins[i][SKIN_V_MODEL][0])
			precache_model(USPSkins[i][SKIN_V_MODEL]);

		if (USPSkins[i][SKIN_P_MODEL][0])
			precache_model(USPSkins[i][SKIN_P_MODEL]);
	}
	for( new i; i < sizeof KnifeSkins; i++ )
	{
		if( KnifeSkins[ i ][ SKIN_V_MODEL ][ 0 ] )
			precache_model( KnifeSkins[ i ][ SKIN_V_MODEL ] )
		if( KnifeSkins[ i ][ SKIN_P_MODEL ][ 0 ] )
			precache_model( KnifeSkins[ i ][ SKIN_P_MODEL ] )
	}
}

public client_putinserver( id )
{
	g_iUID[ id ] = get_user_userid( id )

	g_bitOwnedUSPs[ id ] = 0;
	g_iEquippedUSP[ id ] = 0;
	g_bitOwnedKnifes[ id ] = 0
	g_iEquippedKnife[ id ] = 0

	if( !is_user_bot( id ) || !is_user_hltv( id ) )
		LoadPlayerData(id, g_iUID[ id ]);
}
public client_disconnected( id )
{
	if( g_bitOwnedUSPs[ id ] != 0 || g_bitOwnedKnifes[ id ] != 0 )
		SavePlayerData(id, g_iUID[ id ] );
}

LoadPlayerData(id, uid)
{
	new szAuthId[35];
	get_user_authid(id, szAuthId, charsmax(szAuthId));

	new uid1 = get_user_userid( id )

	if (!szAuthId[0])
		return;

	new szBuffer[56], data[5][15];

	if (fvault_get_data(SkinVault, szAuthId, szBuffer, charsmax(szBuffer)))
	{
		if( uid1 != uid )
			return

		parse(szBuffer, data[0], charsmax(data[]), data[1], charsmax(data[]), data[2], charsmax(data[]), data[3], charsmax(data[]));
		g_iEquippedUSP[id] = str_to_num(data[0]);
		g_bitOwnedUSPs[id] = str_to_num(data[1]);
		g_iEquippedKnife[id] = str_to_num(data[2]);
		g_bitOwnedKnifes[id] = str_to_num(data[3]);
	}

}

SavePlayerData(id, uid)
{
	new szAuthId[35];
	get_user_authid(id, szAuthId, charsmax(szAuthId));

	new szBuffer[56];

	if( uid == get_user_userid( id ) )
	{
		formatex(szBuffer, charsmax(szBuffer), "%d %d %d %d", g_iEquippedUSP[id], g_bitOwnedUSPs[id], g_iEquippedKnife[id], g_bitOwnedKnifes[id]);
		fvault_pset_data(SkinVault, szAuthId, szBuffer);
	}
}
public USPMenu(id)
{
	new szBuffer[96];

	//formatex(szBuffer, charsmax(szBuffer), "USP Skins^n\dYour Points:\y %d", get_dr_points( id ));
	formatex(szBuffer, charsmax(szBuffer), fmt( "%L", id, "USP_SKIN_TITLE", get_dr_points( id )));

	new iMenu = menu_create(szBuffer, "USPMenu_Handler");

	new szItemInfo[3], iLen;

	for (new i = 0; i < sizeof USPSkins; i++)
	{
		iLen = 0;

		if (!(g_bitOwnedUSPs[id] & BIT(i)) && USPSkins[i][SKIN_COST] && get_dr_points( id ) < USPSkins[i][SKIN_COST])
			iLen = copy(szBuffer, charsmax(szBuffer), "\d");
		else if (g_iEquippedUSP[id] == i)
			iLen = copy(szBuffer, charsmax(szBuffer), "\r");

		iLen += copy(szBuffer[iLen], charsmax(szBuffer)-iLen, USPSkins[i][SKIN_NAME]);

		if (g_bitOwnedUSPs[id] & BIT(i))
			//iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, "\y [ OWNED ]" );
			iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, fmt( "%L", id, "OWNED"));

		else if (USPSkins[i][SKIN_COST])
			//iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, " [ %d Points ]", USPSkins[i][SKIN_COST] );
			iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, fmt( " %L", id, "POINTS", USPSkins[i][SKIN_COST] ));

		num_to_str(i, szItemInfo, charsmax(szItemInfo));
		menu_additem(iMenu, szBuffer, szItemInfo);
	}

	menu_display(id, iMenu)
}
public USPMenu_Handler(id, iMenu, iItem)
{
	if (iItem == MENU_EXIT)
	{
		menu_destroy(iMenu);
		back_skin_menu( id )
		return PLUGIN_HANDLED;
	}
	new szItemInfo[3], iUSPId, dummy;

	menu_item_getinfo(iMenu, iItem, dummy, szItemInfo, charsmax(szItemInfo), _, _, dummy);
	menu_destroy(iMenu);

	iUSPId = str_to_num(szItemInfo);

	if (g_iEquippedUSP[id] == iUSPId)
	{
		//ColorChat(id, RED, "^4[DR]^1 You already have this skin." );
		client_print_color(id, print_chat, "^4[DR] %L", LANG_PLAYER, "ALR_SKIN" )

		USPMenu(id);
		return PLUGIN_HANDLED;
	}

	if (!(g_bitOwnedUSPs[id] & BIT(iUSPId)))
	{
		if (USPSkins[iUSPId][SKIN_COST] && get_dr_points( id ) < USPSkins[iUSPId][SKIN_COST])
		{
			//ColorChat(id, RED, "^4[DR]^1 You don't have enough points." );
			client_print_color(id, print_chat, "^4[DR] %L", LANG_PLAYER, "NO_POINT" )


			USPMenu(id);
			return PLUGIN_HANDLED;
		}

		set_dr_points( id, -USPSkins[iUSPId][SKIN_COST] )
		g_bitOwnedUSPs[id] |= BIT(iUSPId);

		//client_print_color(0, print_chat, "^4[DR]^3 %n^1 bought^3 %s^1.", id, USPSkins[iUSPId][SKIN_NAME]);
		client_print_color(0, print_chat, "^4[DR] %L", LANG_PLAYER, "BOUGHT_SKIN", id, USPSkins[iUSPId][SKIN_NAME]);
	}

	g_iEquippedUSP[id] = iUSPId;

	if (is_user_alive(id))
	{
		new pActiveItem = get_pdata_cbase(id, 373, 5);

		if (is_valid_ent(pActiveItem) && cs_get_weapon_id(pActiveItem) == CSW_USP)
		{
			ExecuteHamB(Ham_Item_Holster, pActiveItem, 0);
			ExecuteHamB(Ham_Item_Deploy, pActiveItem);
		}
	}
	USPMenu(id);
	return PLUGIN_HANDLED;
}
public KnifeMenu(id)
{
	new szBuffer[96];

	//formatex(szBuffer, charsmax(szBuffer), "Knife Skins^n\dYour Points:\y %d", get_dr_points( id ));
	formatex(szBuffer, charsmax(szBuffer), fmt( "%L", id, "KNIFE_SKIN_TITLE", get_dr_points( id )));

	new iMenu = menu_create(szBuffer, "KnifeMenu_Handler");

	new szItemInfo[3], iLen;

	for (new i = 0; i < sizeof KnifeSkins; i++)
	{
		iLen = 0;

		if (!(g_bitOwnedKnifes[id] & BIT(i)) && KnifeSkins[i][SKIN_COST] && get_dr_points( id ) < KnifeSkins[i][SKIN_COST])
			iLen = copy(szBuffer, charsmax(szBuffer), "\d");
		else if (g_iEquippedKnife[id] == i)
			iLen = copy(szBuffer, charsmax(szBuffer), "\r");

		iLen += copy(szBuffer[iLen], charsmax(szBuffer)-iLen, KnifeSkins[i][SKIN_NAME]);

		if (g_bitOwnedKnifes[id] & BIT(i))
			//iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, " [ OWNED ]" );
			iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, fmt( "%L", id, "OWNED"));
		else if (KnifeSkins[i][SKIN_COST])
			//iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, " [ %d Points ]", KnifeSkins[i][SKIN_COST] );
			iLen += formatex(szBuffer[iLen], charsmax(szBuffer)-iLen, fmt( " %L", id, "POINTS", KnifeSkins[i][SKIN_COST] ));

		num_to_str(i, szItemInfo, charsmax(szItemInfo));
		menu_additem(iMenu, szBuffer, szItemInfo);
	}

	menu_display(id, iMenu)
}
public KnifeMenu_Handler(id, iMenu, iItem)
{
	if (iItem == MENU_EXIT)
	{
		menu_destroy(iMenu);
		back_skin_menu( id )
		return PLUGIN_HANDLED;
	}

	new szItemInfo[3], iKnifeId, dummy;

	menu_item_getinfo(iMenu, iItem, dummy, szItemInfo, charsmax(szItemInfo), _, _, dummy);
	menu_destroy(iMenu);

	iKnifeId = str_to_num(szItemInfo);

	if (g_iEquippedKnife[id] == iKnifeId)
	{
		//ColorChat(id, RED, "^4[DR]^1 You already have this skin." );
		client_print_color(id, print_chat, "^4[DR] %L", LANG_PLAYER, "ALR_SKIN" )

		KnifeMenu(id);
		return PLUGIN_HANDLED;
	}

	if (!(g_bitOwnedKnifes[id] & BIT(iKnifeId)))
	{
		if (KnifeSkins[iKnifeId][SKIN_COST] && get_dr_points( id ) < KnifeSkins[iKnifeId][SKIN_COST])
		{
			//ColorChat(id, RED, "^4[DR]^1 You don't have enough points." );
			client_print_color(id, print_chat, "^4[DR] %L", LANG_PLAYER, "NO_POINT" )

			KnifeMenu(id);
			return PLUGIN_HANDLED;
		}

		set_dr_points( id, -KnifeSkins[iKnifeId][SKIN_COST] )
		g_bitOwnedKnifes[id] |= BIT(iKnifeId);

		//client_print_color(0, print_chat, "^4[DR]^3 %n^1 bought^3 %s^1.", id, KnifeSkins[iKnifeId][SKIN_NAME]);
		client_print_color(id, print_chat, "^4[DR] %L", LANG_PLAYER, "BOUGHT_SKIN", id, KnifeSkins[iKnifeId][SKIN_NAME])
	}

	g_iEquippedKnife[id] = iKnifeId;

	if (is_user_alive(id))
	{
		new pActiveItem = get_pdata_cbase(id, 373, 5);

		if (is_valid_ent(pActiveItem) && cs_get_weapon_id(pActiveItem) == CSW_KNIFE)
		{
			ExecuteHamB(Ham_Item_Holster, pActiveItem, 0);
			ExecuteHamB(Ham_Item_Deploy, pActiveItem);
		}
	}

	KnifeMenu(id);
	return PLUGIN_HANDLED;
}
public CUSP_Deploy_Post(iEntity)
{
	new id = get_pdata_cbase(iEntity, 41, 4);
	new iUSPId = g_iEquippedUSP[id];

	if (USPSkins[iUSPId][SKIN_V_MODEL][0])
		entity_set_string(id, EV_SZ_viewmodel, USPSkins[iUSPId][SKIN_V_MODEL]);

	if (USPSkins[iUSPId][SKIN_P_MODEL][0])
		entity_set_string(id, EV_SZ_weaponmodel, USPSkins[iUSPId][SKIN_P_MODEL]);
}
public CKnife_Deploy_Post(iEntity)
{
	new id = get_pdata_cbase(iEntity, 41, 4);
	new iKnifeId = g_iEquippedKnife[id];

	if (KnifeSkins[iKnifeId][SKIN_V_MODEL][0])
		entity_set_string(id, EV_SZ_viewmodel, KnifeSkins[iKnifeId][SKIN_V_MODEL]);

	if (KnifeSkins[iKnifeId][SKIN_P_MODEL][0])
		entity_set_string(id, EV_SZ_weaponmodel, KnifeSkins[iKnifeId][SKIN_P_MODEL]);
}

Last edited by Snake.; 08-14-2022 at 20:34.
Snake. is offline
Send a message via Skype™ to Snake.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-14-2022 , 21:37   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #9

Are you sure that the server is running? Do you have direct access to the server console (e.g. via your ISP's control panel)? Does the status command still work while it's in this state?
__________________
fysiks is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 08-14-2022 , 21:53   Re: [HLDS Linux] Server makes players quit at the half of loading section without rea
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
Are you sure that the server is running? Do you have direct access to the server console (e.g. via your ISP's control panel)? Does the status command still work while it's in this state?
Yes it seems running and im also able to join but server makes me quit on the half of loading bar. I have access. Status command works as well

Last edited by Snake.; 08-14-2022 at 21:55.
Snake. is offline
Send a message via Skype™ to Snake.
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 13:56.


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