Raised This Month: $32 Target: $400
 8% 

Solved Is there a plugin that can restore a device before disconnection after a crash?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AK978
Senior Member
Join Date: Jun 2018
Old 03-14-2019 , 10:37   Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #1

The player will not play again because the weapon disappears after the disconnection.

Is there a plugin that can recover a weapon when logging in after disconnecting?

Last edited by AK978; 03-17-2019 at 01:02.
AK978 is offline
rusocop
Junior Member
Join Date: Jun 2018
Location: Spain
Old 03-14-2019 , 11:11   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #2

I think its better idea to avoid crashes xD
But yeah, I think.... using database maybe?
rusocop is offline
Send a message via Skype™ to rusocop
AK978
Senior Member
Join Date: Jun 2018
Old 03-14-2019 , 11:18   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #3

Applicable to server crashes and player crashes.
Document records should also be ok.
AK978 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-14-2019 , 15:14   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #4

A little more context on what you're trying to do could help you find a better solution than storing everything into a database when you think the server will crash. I don't think you can do this as the server is actually crashing.
Mitchell is offline
AK978
Senior Member
Join Date: Jun 2018
Old 03-14-2019 , 15:26   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #5

Save data when replacing weapons.
Clear the data after leaving the game normally.
When logging in, there is no offline record, give save weapon.

Last edited by AK978; 03-14-2019 at 15:30.
AK978 is offline
AK978
Senior Member
Join Date: Jun 2018
Old 03-16-2019 , 02:26   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #6

Code:
	iSlot1[client] = GetPlayerWeaponSlot(client, 1);
	if (iSlot1[client] > 0)
	{
		GetEdictClassname(iSlot1[client], weapon, sizeof(weapon));
		if (StrEqual(weapon, "weapon_pistol_magnum"))
		{
			iSlot1[client] = 1;
		}
		else if (StrEqual(weapon, "weapon_chainsaw"))
		{
			iSlot1[client] = 2;
		}
		else if (StrEqual(weapon, "weapon_melee"))
		{
			GetEntPropString(GetPlayerWeaponSlot(client, 1), Prop_Data, "m_strMapSetScriptName", weapon, sizeof(weapon));		
			if (StrContains(weapon, "katana", false))
			{
				iSlot1[client] = 3;
			}
			else if (StrContains(weapon, "baseball_bat", false))
			{
				iSlot1[client] = 4;
			}
			else if (StrContains(weapon, "knife", false))
			{
				iSlot1[client] = 5;
			}
		}
	}
finsh all, only melee weapon mysql save file is wrong.(katana=4, baseball_bat=3, knife=3)
i don't know why?

Last edited by AK978; 03-17-2019 at 01:00.
AK978 is offline
AK978
Senior Member
Join Date: Jun 2018
Old 03-17-2019 , 01:01   Re: Is there a plugin that can restore a device before disconnection after a crash?
Reply With Quote #7

problem solved.
AK978 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 12:45.


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