Sari la conținut

Reset Score BUG


Mr X

Postări Recomandate

Salutare  , sunt nou pe srv asa ca nu acuz ...... poate inca nu am inteles eu cum merge , cred ca reset Score are BUG , iti reseteaza kilurile dar dead nu   , iar daca ai score 11 /11 /20  si iesi pt 2 minute de pe srv  , cand revi ai 0 /0 20 .... si nu merge sa dai rs!

 

Steam ID : doctorul84

Origin ID : doctorul84

Uplay ID : doctorul84

Link spre comentariu
Distribuie pe alte site-uri

Acest bug se afla de mult timp pe server si nu stiu sigur daca se poate rezolva atat de simplu, dar daca vrei sa nu mai se intample de atatea ori acest lucru dai !rs in timp ce esti in viata de 2 ori.

red dead redemption 2 sniper GIF by Rockstar Games

Link spre comentariu
Distribuie pe alte site-uri

Pun cand ajung acasa o  sursa si un plugin(editate amandoua) , poate il ajuta pe sound

/*
	[CSS/CS:GO] AbNeR ResetScore V1.5
	-Added admin command m_setpoints <name or #userid> <points> to set custom points.
	-sm_setscore changed to sm_setscore <name or #userid> <Kills> <Deaths><Assists><Stars><Points> in CSGO.
	-sm_setscore changed to sm_setscore <name or #userid> <Kills> <Deaths><Stars> in CSS.
	-Added sm_resetscore_savescores 1/0 - To save scores when players retry.
	-Added sm_resetscore_cost "amount" - If you want charge money by reset, 0 to disable.
	
	V1.5fix
	- Fixed an error when a invalid player disconnects.
*/


#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <colors>

#define PLUGIN_VERSION "1.5fix"
#pragma newdecls required

Handle hPluginEnable;
Handle hPublic;
Handle hSaveScores;
Handle hResetCost;
bool CSGO;

ArrayList playersList;
ArrayList scores;

public Plugin myinfo =
{
	name = "[CSS/CS:GO] AbNeR ResetScore",
	author = "AbNeR_CSS",
	description = "Type !resetscore to reset your score",
	version = PLUGIN_VERSION,
	url = "www.tecnohardclan.com"
};

public void OnPluginStart()
{  
	HookEvent("player_disconnect", PlayerDisconnect);
	
	char theFolder[40];
	GetGameFolderName(theFolder, sizeof(theFolder));
	CSGO = StrEqual(theFolder, "csgo");
	
	RegConsoleCmd("resetscore", CommandResetScore);
	RegConsoleCmd("rs", CommandResetScore);
	
	RegAdminCmd("sm_resetplayer", CommandResetPlayer, ADMFLAG_SLAY);
	RegAdminCmd("sm_reset", CommandResetPlayer, ADMFLAG_SLAY);
	RegAdminCmd("sm_setstars", CommandSetStars, ADMFLAG_SLAY);
	
	LoadTranslations("common.phrases");
	LoadTranslations("abner_resetscore.phrases");
	
	ServerCommand("mp_backup_round_file \"\"");
	ServerCommand("mp_backup_round_file_last \"\"");
	ServerCommand("mp_backup_round_file_pattern \"\"");
	ServerCommand("mp_backup_round_auto 0");
		
	if(CSGO)
	{
		RegAdminCmd("sm_setassists", CommandSetAssists, ADMFLAG_SLAY);
		RegAdminCmd("sm_setpoints", CommandSetPoints, ADMFLAG_SLAY);
		RegAdminCmd("sm_setscore", CommandSetScoreCSGO, ADMFLAG_SLAY);
	}
	else
	{
		RegAdminCmd("sm_setscore", CommandSetScore, ADMFLAG_SLAY);
	}
	
	AutoExecConfig();
	CreateConVar("abner_resetscore_version", PLUGIN_VERSION, "Resetscore Version", FCVAR_NOTIFY|FCVAR_REPLICATED);
	hPluginEnable = CreateConVar("sm_resetscore", "1", "Enable/Disable the Plugin.");
	hPublic = CreateConVar("sm_resetscore_public", "1", "Enable or disable the messages when player reset score.");
	hSaveScores = CreateConVar("sm_resetscore_savescores", "1", "Save scores when players retry.");
	hResetCost = CreateConVar("sm_resetscore_cost", "0", "Money cost to reset score.");
	
	playersList = new ArrayList(64);
	scores = new ArrayList(4);
	
	for(int i = 0;i < GetMaxClients();i++)
	{
		if(!IsValidClient(i))
			continue;
		OnClientPutInServer(i);
	}
}


public void OnMapStart()
{
	playersList = new ArrayList(64);
	scores = new ArrayList(4);
	ServerCommand("mp_backup_round_file \"\"");
	ServerCommand("mp_backup_round_file_last \"\"");
	ServerCommand("mp_backup_round_file_pattern \"\"");
	ServerCommand("mp_backup_round_auto 0");
}  

public void OnClientPutInServer(int client)
{
	if(GetConVarInt(hSaveScores) != 1 || IsFakeClient(client))
		return;
	
	char steamId[64];
	GetClientAuthId(client, AuthId_Steam2, steamId, sizeof(steamId));
	int infoArray[5];
	int index = playersList.FindString(steamId);
	if(index != -1)
	{
		CreateTimer(2.0, MSG, client);
		scores.GetArray(index, infoArray, sizeof(infoArray));
		SetEntProp(client, Prop_Data, "m_iFrags", infoArray[0]);
		SetEntProp(client, Prop_Data, "m_iDeaths", infoArray[1]);
		CS_SetMVPCount(client, infoArray[2]);
		if(CSGO)
		{
			CS_SetClientContributionScore(client, infoArray[3]);
			CS_SetClientAssists(client, infoArray[4]);
		}
	}
	else
	{
		playersList.PushString(steamId);
		scores.PushArray(infoArray);
	}
}

public Action MSG(Handle timer, any client)
{
	if(IsValidClient(client))
		CPrintToChat(client, "{green}[GO] \x01%t", "Restored");
}
public void PlayerDisconnect(Handle event,const char[] name,bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(!IsValidClient(client))
		return;
	if(GetConVarInt(hSaveScores) != 1 || IsFakeClient(client))
		return;
		
	char steamId[64];
	GetClientAuthId(client, AuthId_Steam2, steamId, sizeof(steamId));
	int infoArray[5];
	int index = playersList.FindString(steamId);
	if(index != -1)
	{
		infoArray[0] = GetClientFrags(client);
		infoArray[1] = GetClientDeaths(client);
		infoArray[2] = CS_GetMVPCount(client);
		if(CSGO)
		{
			infoArray[3] = CS_GetClientContributionScore(client);
			infoArray[4] = CS_GetClientAssists(client);
		}
		scores.SetArray(index, infoArray);
	}
}

public Action CommandResetScore(int client, int args)
{                        
	if(GetConVarInt(hPluginEnable) == 0)
	{
		CPrintToChat(client, "{green}[GO] \x01%t", "Plugin Disabled");
		return Plugin_Continue;
	}
	
	if(GetClientDeaths(client) == 0 && GetClientFrags(client) == 0 && CS_GetMVPCount(client) == 0)
	{
		if(!CSGO || CS_GetClientAssists(client) == 0)
		{
			CPrintToChat(client, "{green}[GO] \x01%t", "Score 0");
			return Plugin_Continue;
		}
	}
	
	int cost = GetConVarInt(hResetCost);
	int money = GetEntProp(client, Prop_Send, "m_iAccount");
	if(cost > 0 && money < cost)
	{
		CPrintToChat(client, "{green}[GO] \x01%t", "No Money", cost);
		return Plugin_Continue;
	}
	
	ResetPlayer(client);
	SetEntProp(client, Prop_Send, "m_iAccount", money-cost);
	
	char name[MAX_NAME_LENGTH];
	GetClientName(client, name, sizeof(name));
	if(GetConVarInt(hPublic) == 1)
	{
		if(GetClientTeam(client) == 2)
		{
			CPrintToChatAll("{green}[GO] \x01%t", "Player Reset Red", name);
		}
		else if(GetClientTeam(client) == 3)
		{
			CPrintToChatAll("{green}[GO] \x01%t", "Player Reset Blue", name);
		}
		else
		{
			CPrintToChatAll("{green}[GO] \x01%t", "Player Reset Normal", name);
		}
	}
	else
	{
		CPrintToChat(client, "{green}[GO] \x01%t", "You Reset");
	}
	return Plugin_Continue;
}

void ResetPlayer(int client)
{
	if(IsValidClient(client))
	{
		SetEntProp(client, Prop_Data, "m_iFrags", 0);
		SetEntProp(client, Prop_Data, "m_iDeaths", 0);
		CS_SetMVPCount(client, 0);
		if(CSGO)
		{
			CS_SetClientAssists(client, 0);
			CS_SetClientContributionScore(client, 0);
		}
	}
}
	
public Action CommandResetPlayer(int client, int args)
{                           
	char arg1[32];
	GetCmdArg(1, arg1, sizeof(arg1));

	if (args != 1)
	{
		ReplyToCommand(client, "\x01[GO] sm_resetplayer <name or #userid>");
		return Plugin_Continue;
	}
 	
	char target_name[MAX_TARGET_LENGTH];
	char nameadm[MAX_NAME_LENGTH];
	GetClientName(client, nameadm, sizeof(nameadm));
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;
	
	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

  	for (int i = 0; i < target_count; i++)
	{
		ResetPlayer(target_list[i]);
	}
	ShowActivity2(client, "[GO] ", "%t", "Reset Score of", target_name);
	return Plugin_Continue;
}

public Action CommandSetScore(int client, int args)
{                           
  	char arg1[32], arg2[20], arg3[20],arg4[20];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	GetCmdArg(3, arg3, sizeof(arg3));
	GetCmdArg(4, arg4, sizeof(arg4));
	int kills = StringToInt(arg2);
	int deaths = StringToInt(arg3);
	int stars = StringToInt(arg4);
      
	if (args != 4)
	{
		ReplyToCommand(client, "\x01[GO] sm_setscore <name or #userid> <Kills> <Deaths><Stars>");
		return Plugin_Continue;
	}
 	
	char target_name[MAX_TARGET_LENGTH];
	char nameadm[MAX_NAME_LENGTH];
	GetClientName(client, nameadm, sizeof(nameadm));
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;
	
	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

  	for (int i = 0; i < target_count; i++)
	{
		SetEntProp(target_list[i], Prop_Data, "m_iFrags", kills);
		SetEntProp(target_list[i], Prop_Data, "m_iDeaths", deaths);
		CS_SetMVPCount(target_list[i], stars);
	}
	
	ShowActivity2(client, "[GO] ", "%t", "Set Score", target_name);
	return Plugin_Continue;
}

public Action CommandSetScoreCSGO(int client, int args)
{                           
  	if (args != 6)
	{
		ReplyToCommand(client, "\x01[GO] sm_setscore <name or #userid> <Kills> <Deaths><Assists><Stars><Points>");
		return Plugin_Continue;
	}
	
	char arg1[32], arg2[20], arg3[20], arg4[20], arg5[20], arg6[20];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	GetCmdArg(3, arg3, sizeof(arg3));
	GetCmdArg(4, arg4, sizeof(arg4));
	GetCmdArg(5, arg5, sizeof(arg5));
	GetCmdArg(6, arg6, sizeof(arg6));
	int kills = StringToInt(arg2);
	int deaths = StringToInt(arg3);
	int assists = StringToInt(arg4);
	int stars = StringToInt(arg5);
	int points = StringToInt(arg6);
 	
	char target_name[MAX_TARGET_LENGTH];
	char nameadm[MAX_NAME_LENGTH];
	GetClientName(client, nameadm, sizeof(nameadm));
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;
	
	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

  	for (int i = 0; i < target_count; i++)
	{
		SetEntProp(target_list[i], Prop_Data, "m_iFrags", kills);
		SetEntProp(target_list[i], Prop_Data, "m_iDeaths", deaths);
		CS_SetClientAssists(target_list[i], assists);
		CS_SetMVPCount(target_list[i], stars);
		CS_SetClientContributionScore(target_list[i], points);
	}
	
	ShowActivity2(client, "[GO] ", "%t", "Set Score", target_name);
	return Plugin_Continue;
}

public Action CommandSetPoints(int client, int args)
{                           
	char arg1[32], arg2[20];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	int points = StringToInt(arg2);
		
	if (args != 2)
	{
		ReplyToCommand(client, "\x01[GO] sm_setpoints <name or #userid> <points>");
		return Plugin_Continue;
	}

	char target_name[MAX_TARGET_LENGTH];
	char nameadm[MAX_NAME_LENGTH];
	GetClientName(client, nameadm, sizeof(nameadm));
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;

	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

	for (int i = 0; i < target_count; i++)
	{   
		CS_SetClientContributionScore(target_list[i], points);
	}

	ShowActivity2(client, "[GO] ", "%t", "Set Points of", target_name, points);
	return Plugin_Continue;
}

public Action CommandSetAssists(int client, int args)
{                           
	char arg1[32], arg2[20];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	int assists = StringToInt(arg2);
		
	if (args != 2)
	{
		ReplyToCommand(client, "\x01[GO] sm_setassists <name or #userid> <assists>");
		return Plugin_Continue;
	}

	char target_name[MAX_TARGET_LENGTH];
	char nameadm[MAX_NAME_LENGTH];
	GetClientName(client, nameadm, sizeof(nameadm));
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;

	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

	for (int i = 0; i < target_count; i++)
	{   
		CS_SetClientAssists(target_list[i], assists);
	}

	ShowActivity2(client, "[GO] ", "%t", "Set Assists of", target_name, assists);
	return Plugin_Continue;
}

public Action CommandSetStars(int client, int args)
{                           
	char arg1[32], arg2[20];
	GetCmdArg(1, arg1, sizeof(arg1));
	GetCmdArg(2, arg2, sizeof(arg2));
	int stars = StringToInt(arg2);

	if (args != 2)
	{
		ReplyToCommand(client, "\x01[GO] sm_setstars <name or #userid> <stars>");
		return Plugin_Continue;
	}

	char target_name[MAX_TARGET_LENGTH];
	int target_list[MAXPLAYERS], target_count; bool tn_is_ml;

	if ((target_count = ProcessTargetString(
	arg1,
	client,
	target_list,
	MAXPLAYERS,
	COMMAND_TARGET_NONE,
	target_name,
	sizeof(target_name),
	tn_is_ml)) <= 0)
	{
		ReplyToTargetError(client, target_count);
		return Plugin_Continue;
	}

	for (int i = 0; i < target_count; i++)
	{
		CS_SetMVPCount(target_list[i], stars);
	}

	ShowActivity2(client, "[GO] ", "%t", "Set Stars of", target_name, stars);
	return Plugin_Continue;
}

stock bool IsValidClient(int client)
{
	if(client <= 0 ) return false;
	if(client > MaxClients) return false;
	if(!IsClientConnected(client)) return false;
	return IsClientInGame(client);
}

 

YOUTUBE | TWITCH | STEAM | TIKTOK

chX82JV.png

Link spre comentariu
Distribuie pe alte site-uri

bug-ul este pe server de ceva timp, dar pentru noi, cei cu vechime, nu e ceva special, drept o minoritate... nu e ceva urgent care sa merite schimbat... (my point of view :^) )

Editat de PROXY
Link spre comentariu
Distribuie pe alte site-uri

On 11/6/2018 at 4:28 PM, Wazy said:

Acest bug se afla de mult timp pe server si nu stiu sigur daca se poate rezolva atat de simplu, dar daca vrei sa nu mai se intample de atatea ori acest lucru dai !rs in timp ce esti in viata de 2 ori.

Mda nu  merge treaba ... daca dai rs si reusesti sa faci kill atunci merge daca nu  ...!!! nu... in fine ... inca o intrebare pentru a evita un nou post , am vazut pe un srv care nu ii dau nume  , un plugin de genul boost  , care puteai da boost doar atunci cand un jucator sta in cur , in rest nu se schimba nimic , se poate adauga ???

 

inca odata mersi pentru explicatie

Steam ID : doctorul84

Origin ID : doctorul84

Uplay ID : doctorul84

Link spre comentariu
Distribuie pe alte site-uri

Acum 7 minute, Mr X a spus:

Mda nu  merge treaba ... daca dai rs si reusesti sa faci kill atunci merge daca nu  ...!!! nu... in fine ... inca o intrebare pentru a evita un nou post , am vazut pe un srv care nu ii dau nume  , un plugin de genul boost  , care puteai da boost doar atunci cand un jucator sta in cur , in rest nu se schimba nimic , se poate adauga ???

 

inca odata mersi pentru explicatie

mp_solid_teammates 2 , si ala trebuia adaugat dar tot uita :))

YOUTUBE | TWITCH | STEAM | TIKTOK

chX82JV.png

Link spre comentariu
Distribuie pe alte site-uri

ok mersi fain pt informatie ... apropo  ... daca da-ti admin la cei care nu sunt in stare sa vb limba romana corect si ii supara treaba asta  ... macar spuneti-o pe forum sa stim cu toti!! 

[SourceBans] You are banned from this server.
[SourceBans] Name:        Mr X
[SourceBans] Steam ID:        STEAM_1:1:178790591
[SourceBans] IP address:    86.229.40.97
[SourceBans] Reason:         limbaj
[SourceBans] You can protest your ban at https://evict.eu/go.
===============================================

la domnul admin LIMBAJ inseamna corectie gramaticala plm........

nu seste singurul srv din Romania si cu atat mai mult nu este singurul srv care are nevoi de ajutor plm ... in fine ... bft

Steam ID : doctorul84

Origin ID : doctorul84

Uplay ID : doctorul84

Link spre comentariu
Distribuie pe alte site-uri

La 11.11.2018 la 1:38, Mr X a spus:

ok mersi fain pt informatie ... apropo  ... daca da-ti admin la cei care nu sunt in stare sa vb limba romana corect si ii supara treaba asta  ... macar spuneti-o pe forum sa stim cu toti!! 

[SourceBans] You are banned from this server.
[SourceBans] Name:        Mr X
[SourceBans] Steam ID:        STEAM_1:1:178790591
[SourceBans] IP address:    86.229.40.97
[SourceBans] Reason:         limbaj
[SourceBans] You can protest your ban at https://evict.eu/go.
===============================================

la domnul admin LIMBAJ inseamna corectie gramaticala plm........

nu seste singurul srv din Romania si cu atat mai mult nu este singurul srv care are nevoi de ajutor plm ... in fine ... bft

fa o cerere de unban

Connect:

cs.usp.ro [competitive]

ffa.usp.ro [deathmatch]

retake.usp.ro [retakes]

 

uspromania.png

Steam: https://steamcommunity.com/id/so_und

Discord: snd0001

discord

ts.usp.ro:9987

Link spre comentariu
Distribuie pe alte site-uri

Acum 3 ore, ERQUUS a spus:

rezolva-l repede ca mor baietii daca apare scoru pe minus 

aveam unu pe cs.evict (1.6) am jucat 40 de runde ca e d2 toata noaptea noi aveam 50+ killuri omu 0-1-0-1 dadea rs la fiecare runda omu juca la rank :))) credea ca daca da rs ii creste ranku.. n-ai cu cine

Connect:

cs.usp.ro [competitive]

ffa.usp.ro [deathmatch]

retake.usp.ro [retakes]

 

uspromania.png

Steam: https://steamcommunity.com/id/so_und

Discord: snd0001

discord

ts.usp.ro:9987

Link spre comentariu
Distribuie pe alte site-uri

Alătură-te conversației

Poți posta acum și să te înregistrezi mai târziu. Dacă ai un cont, autentifică-te acum pentru a posta cu contul tău.
Notă: Postarea ta va necesita aprobare moderator înainte de a fi vizibilă.

Vizitator
Răspunde la acest topic...

×   Inserat ca text bogat.   Lipiți ca text simplu

  Doar 75 emoji sunt permise.

×   Linkul tău a fost încorporat automat.   Afișează ca link în schimb

×   Conținutul tău precedent a fost restaurat.   Curăță editor

×   Nu poți lipi imagini direct. Încarcă sau inserează imagini din URL.

×
×
  • Creează nouă...

Informații Importante

Am plasat cookie-uri pe dispozitivul tău pentru a îmbunătății navigarea pe acest site. Poți modifica setările cookie, altfel considerăm că ești de acord să continui. Also by continuing using this website you agree with the Terms of Use and Privacy Policy.