[MOD] CSGO REMAKE StatTrack ~~ MySQL + nVault ~~ Source Code Available

Aici vom publica si discuta despre diverse moduri necesare serverelor dedicate.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

02 Jan 2021, 20:10

Rainq wrote:
02 Jan 2021, 20:04
Shadows Adi wrote:
02 Jan 2021, 19:49
Rainq wrote:
02 Jan 2021, 19:40
in acest addons ,e .sma la inspect weapons ?
Functia pentru inspect se gaseste in interiorul plugin-ului de baza.

Edit: Acesta este script-ul pentru inspect folosit, doar putin modificat: https://gamebanana.com/gamefiles/5976
l-am folosit pe ala insa nu merge daca nu te pricepi putin in scripting, ma gandeam ca il ai tu direct modificat,oricum ,multumesc!
Ce nu functioneaza mai exact in script?
RoyalServer 2
User avatar
Rainq
Membru, skill +2
Membru, skill +2
Posts: 681
Joined: 21 Jul 2015, 19:50
Detinator Steam: Da
CS Status: Retras
Detinator server CS: zm.extreamcs.com
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucharest
Discord: manuraiders
Has thanked: 29 times
Been thanked: 51 times
Contact:

02 Jan 2021, 20:56

inspectul
Image
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

02 Jan 2021, 22:43

Rainq wrote:
02 Jan 2021, 20:56
inspectul
Poate modelele pe care le folosesti nu au animatia pentru inspect.
User avatar
Rainq
Membru, skill +2
Membru, skill +2
Posts: 681
Joined: 21 Jul 2015, 19:50
Detinator Steam: Da
CS Status: Retras
Detinator server CS: zm.extreamcs.com
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucharest
Discord: manuraiders
Has thanked: 29 times
Been thanked: 51 times
Contact:

03 Jan 2021, 03:03

Shadows Adi wrote:
02 Jan 2021, 22:43
Rainq wrote:
02 Jan 2021, 20:56
inspectul
Poate modelele pe care le folosesti nu au animatia pentru inspect.
ba da,te pot asigura ca pluginul ala nu e bun :))
Image
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

03 Jan 2021, 09:09

Rainq wrote:
03 Jan 2021, 03:03
Shadows Adi wrote:
02 Jan 2021, 22:43
Rainq wrote:
02 Jan 2021, 20:56
inspectul
Poate modelele pe care le folosesti nu au animatia pentru inspect.
ba da,te pot asigura ca pluginul ala nu e bun :))
Atunci, incearca plugin-ul asta:
https://pastebin.com/rQTpnj82
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

03 Jan 2021, 17:03

Rainq wrote:
03 Jan 2021, 16:25
am incercat,tot nu merge..
Am testat plugin-ul de mai sus, mie imi merge bine.
User avatar
Rainq
Membru, skill +2
Membru, skill +2
Posts: 681
Joined: 21 Jul 2015, 19:50
Detinator Steam: Da
CS Status: Retras
Detinator server CS: zm.extreamcs.com
SteamID: mrainq
Reputatie: Fost super moderator
Fost detinator ZM.eXtreamCS.COM
Fost Membru Club eXtreamCS (trei luni)
Fond eXtream: 0
Location: Bucharest
Discord: manuraiders
Has thanked: 29 times
Been thanked: 51 times
Contact:

03 Jan 2021, 17:09

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <csgomod>
 
#define PLUGIN	"CS:GO Inspect"
#define AUTHOR	"O'Zone"
#define VALID_PDATA 2 
 
new const weaponsWithoutInspect = (1<<CSW_C4) | (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (1<<CSW_SMOKEGRENADE);
 
new bool:deagleDisable[MAX_PLAYERS + 1];
 
new inspectAnimation[] =
{
	0,	//null
	7,	//p228
	0,	//shield
	5,	//scout
	0,	//hegrenade
	7,	//xm1014
	0,	//c4
	6,	//mac10
	6,	//aug
	0,	//smoke grenade
	16,	//elites
	6,	//fiveseven
	6,	//ump45
	5,	//sg550
	6,	//galil
	6,	//famas
	16,	//usp
	13,	//glock
	6,	//awp
	6,	//mp5
	5,	//m249
	7,	//m3
	14,	//m4a1
	6,	//tmp
	5,	//g3sg1
	0,	//flashbang
	6,	//deagle
	6,	//sg552
	6,	//ak47
	8,	//knife
	6	//p90
};
 
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
 
	RegisterHam(Ham_Weapon_Reload, "weapon_deagle", "deagle_reload");
	RegisterHam(Ham_Item_Deploy, "weapon_deagle", "deagle_override");
	RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_deagle", "deagle_override");
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "knife_override");
 
	register_impulse(100, "inspect_weapon");
}
 
public deagle_reload(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	new id = get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX);
 
	remove_task(id);
 
	if (!pev_valid(id) || !is_user_alive(id)) return HAM_IGNORED;
 
	deagleDisable[id] = true;
 
	set_task(2.5, "deagle_enable", id);
 
	return HAM_IGNORED;
}
 
public deagle_override(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	new id = get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX);
 
	remove_task(id);
 
	if (!pev_valid(id) || !is_user_alive(id)) return HAM_IGNORED;
 
	deagleDisable[id] = true;
 
	set_task(0.8, "deagle_enable", id);
 
	return HAM_IGNORED;
}
 
public knife_override(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	set_pdata_float(weapon, OFFSET_WEAPON_IDLE, 0.8, OFFSET_ITEM_LINUX);
 
	return HAM_IGNORED;
}
 
public deagle_enable(id)
	deagleDisable[id] = false;
 
public inspect_weapon(id)
{
	if (pev_valid(id) != VALID_PDATA || !is_user_alive(id) || cs_get_user_shield(id) || cs_get_user_zoom(id) > 1)
	{
		return PLUGIN_HANDLED;
	} 
 
	new weaponId = get_user_weapon(id),
		weapon = get_pdata_cbase(id, OFFSET_ACTIVE_ITEM, OFFSET_PLAYER_LINUX);
 
	if (weaponsWithoutInspect & (1<<weaponId) || !pev_valid(weapon)) return PLUGIN_HANDLED;
 
	new animation = inspectAnimation[weaponId], currentAnimation = pev(get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX), pev_weaponanim);
 
	switch (weaponId) {
		case CSW_M4A1: {
			if (!cs_get_weapon_silen(weapon)) animation = 15;
 
			if (!currentAnimation || currentAnimation == 7 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} case CSW_USP: {
			if (!cs_get_weapon_silen(weapon)) animation = 17;
 
			if (!currentAnimation || currentAnimation == 8 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} case CSW_DEAGLE: {
			if (!deagleDisable[id]) play_inspect(id, weapon, animation);
		} case CSW_GLOCK18: {
			if (!currentAnimation || currentAnimation == 1 || currentAnimation == 2 || currentAnimation == 9 || currentAnimation == 10 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} default: {
			if (!currentAnimation || currentAnimation == animation) play_inspect(id, weapon, animation);
		}
	}
 
	return PLUGIN_HANDLED;
}
 
stock play_inspect(id, weapon, animation)
{
	set_pdata_float(weapon, OFFSET_WEAPON_IDLE, 7.0, OFFSET_ITEM_LINUX);
	set_pev(id, pev_weaponanim, animation);
 
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, id);
	write_byte(animation);
	write_byte(pev(id, pev_body));
	message_end();
}
e obligatoriu pentru csgo mod ?
Image
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

03 Jan 2021, 17:54

Rainq wrote:
03 Jan 2021, 17:09

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <csgomod>
 
#define PLUGIN	"CS:GO Inspect"
#define AUTHOR	"O'Zone"
#define VALID_PDATA 2 
 
new const weaponsWithoutInspect = (1<<CSW_C4) | (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (1<<CSW_SMOKEGRENADE);
 
new bool:deagleDisable[MAX_PLAYERS + 1];
 
new inspectAnimation[] =
{
	0,	//null
	7,	//p228
	0,	//shield
	5,	//scout
	0,	//hegrenade
	7,	//xm1014
	0,	//c4
	6,	//mac10
	6,	//aug
	0,	//smoke grenade
	16,	//elites
	6,	//fiveseven
	6,	//ump45
	5,	//sg550
	6,	//galil
	6,	//famas
	16,	//usp
	13,	//glock
	6,	//awp
	6,	//mp5
	5,	//m249
	7,	//m3
	14,	//m4a1
	6,	//tmp
	5,	//g3sg1
	0,	//flashbang
	6,	//deagle
	6,	//sg552
	6,	//ak47
	8,	//knife
	6	//p90
};
 
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
 
	RegisterHam(Ham_Weapon_Reload, "weapon_deagle", "deagle_reload");
	RegisterHam(Ham_Item_Deploy, "weapon_deagle", "deagle_override");
	RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_deagle", "deagle_override");
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "knife_override");
 
	register_impulse(100, "inspect_weapon");
}
 
public deagle_reload(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	new id = get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX);
 
	remove_task(id);
 
	if (!pev_valid(id) || !is_user_alive(id)) return HAM_IGNORED;
 
	deagleDisable[id] = true;
 
	set_task(2.5, "deagle_enable", id);
 
	return HAM_IGNORED;
}
 
public deagle_override(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	new id = get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX);
 
	remove_task(id);
 
	if (!pev_valid(id) || !is_user_alive(id)) return HAM_IGNORED;
 
	deagleDisable[id] = true;
 
	set_task(0.8, "deagle_enable", id);
 
	return HAM_IGNORED;
}
 
public knife_override(weapon)
{
	if (pev_valid(weapon) != VALID_PDATA) return HAM_IGNORED;
 
	set_pdata_float(weapon, OFFSET_WEAPON_IDLE, 0.8, OFFSET_ITEM_LINUX);
 
	return HAM_IGNORED;
}
 
public deagle_enable(id)
	deagleDisable[id] = false;
 
public inspect_weapon(id)
{
	if (pev_valid(id) != VALID_PDATA || !is_user_alive(id) || cs_get_user_shield(id) || cs_get_user_zoom(id) > 1)
	{
		return PLUGIN_HANDLED;
	} 
 
	new weaponId = get_user_weapon(id),
		weapon = get_pdata_cbase(id, OFFSET_ACTIVE_ITEM, OFFSET_PLAYER_LINUX);
 
	if (weaponsWithoutInspect & (1<<weaponId) || !pev_valid(weapon)) return PLUGIN_HANDLED;
 
	new animation = inspectAnimation[weaponId], currentAnimation = pev(get_pdata_cbase(weapon, OFFSET_PLAYER, OFFSET_ITEM_LINUX), pev_weaponanim);
 
	switch (weaponId) {
		case CSW_M4A1: {
			if (!cs_get_weapon_silen(weapon)) animation = 15;
 
			if (!currentAnimation || currentAnimation == 7 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} case CSW_USP: {
			if (!cs_get_weapon_silen(weapon)) animation = 17;
 
			if (!currentAnimation || currentAnimation == 8 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} case CSW_DEAGLE: {
			if (!deagleDisable[id]) play_inspect(id, weapon, animation);
		} case CSW_GLOCK18: {
			if (!currentAnimation || currentAnimation == 1 || currentAnimation == 2 || currentAnimation == 9 || currentAnimation == 10 || currentAnimation == animation) play_inspect(id, weapon, animation);
		} default: {
			if (!currentAnimation || currentAnimation == animation) play_inspect(id, weapon, animation);
		}
	}
 
	return PLUGIN_HANDLED;
}
 
stock play_inspect(id, weapon, animation)
{
	set_pdata_float(weapon, OFFSET_WEAPON_IDLE, 7.0, OFFSET_ITEM_LINUX);
	set_pev(id, pev_weaponanim, animation);
 
	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, id);
	write_byte(animation);
	write_byte(pev(id, pev_body));
	message_end();
}
e obligatoriu pentru csgo mod ?
Nu, trebuie ca skin-urile sa aiba animatia pentru inspect.
Btw, trebuie sa stergi #include <csgomod> din header. Am uitat eu.
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

06 Jan 2021, 01:21

Update!
Am creat un poll informativ in legatura cu metoda prelucrarii datelor.
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

06 Jan 2021, 19:45

Update!
Versiunea 2.0

- Am implementat suport pentru MySQL si nVault ( controlabil prin cvar ).
- Am adaugat o noua comanda: amx_skin_index - gaseste skin id-ul unui item in multime.
- Am adaugat o noua nativa: csgor_get_skin_index - returneaza numele complet si id-ul skin-ului aflat in multime.
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

22 Jan 2021, 01:13

Update!

- Am imbunatatit validarea entitatilor.
- Am fixat o problema in care conexiunea catre baza de date era nula la repornirea serverului.
- Am mai optimizat header-ul plugin-ului adaugand enumeratii in locul definitilor.
Shadows Adi
Membru, skill +1
Membru, skill +1
Posts: 349
Joined: 26 Jan 2020, 18:52
Detinator Steam: Da
CS Status: 0x416469
SteamID: shadowsadi120
Fond eXtream: 0
Has thanked: 14 times
Been thanked: 50 times

17 Feb 2021, 19:50

Update!
Versiunea 2.1


- Am relucrat apelativul csgor_user_levelup()
- Am adaugat o nativa noua: csgor_ranks_num()
- Am mai optimizat parti din cod.
- Am fixat un bug minor in detectarea metode de salvare / incarcare a datelor.
- Am adaugat un subplugin nou: [CS:GO Remake] Rank Up Bonus

De facut:
  • Implementarea sistemului de Weapon Stattrack
  • Depistarea eventualelor probleme ale plugin-ulu
Daca mai aveti si alte idei, puteti lasa un raspuns aici.
Post Reply

Return to “Moduri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests