Upgrades Menu -> Health/Armor/Damage

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori

User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

06 Aug 2015, 02:17

Descriere: Cu acest plugin, va puteti upgrada viata/armura/damage-ul, in functie de level-ul vostru. Un level se poate cumpara accesand comanda /upgrade in chat. Se poate cumpara ori cu bani, ori cu ammo packs. Recomand ca nivelul maxim pentru armura/viata/dmg sa fie 10.
Acest plugin nu permite schimbarea numelui pe server.

In link-ul de downnload veti gasi mai multe foldere. Folderele contine pluginul pentru modul respectiv.
Compatibil cu:
- modul biohazard
- modul zombie plague
- versiunea pe bani
- versiunea pe credite Aragon
- versiunea pe credite Askhanar

Descarcare : GirlShare!
Servere care folosesc acest plugin: Click!
Nume: Level Up Items (Upgrades Menu)
Versiune: 1.0
Autor: YONTU
Link oficial: http://www.extreamcs.com/forum/
versiunea pe bani | Afiseaza codul
// Includes
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <nvault>

// Register Plugin
new const PLUGIN_NAME[] = "Level Up Items", 
	 PLUGIN_VERSION[] = "1.0", 
	 PLUGIN_AUTHOR[] = "YONTU";

#define TOTAL_LEVELS	10

#define is_user_valid(%1)	(1 <= %1 <= 32)
#define DMG_HEGRENADE	(1<<24)

new const Tag[] = "[Upgrade]";
new const SoundLevelUp[] = "misc/levelup.wav";

enum e_Item
{
	HEALTH = 0,
	ARMOR,
	DAMAGE
}

enum e_data
{
	AmmoPacks = 0,
	Power,
}

new g_UserLevel[e_Item][33];
new g_HostName[64], cvar_hostname, g_Vault;
new menu, menu_callback, text_menu[128], text_item[e_Item][128];

new const g_PlayerData[TOTAL_LEVELS + 1][e_Item][e_data] =
{
	/* Ammo	Health	Ammo	Armor	Ammo	Dmg */	
	{ { 0,	100 }, { 0,	100 }, { 0,	100 } },	// NU modifica nimic pe linia asta
	{ { 20,	110 }, { 20,	110 }, { 20,	110 } },	// Level 1
	{ { 30,	120 }, { 30,	120 }, { 30,	120 } },	// Level 2
	{ { 40,	130 }, { 40,	130 }, { 40,	130 } },	// Level 3
	{ { 50,	140 }, { 50,	140 }, { 50,	140 } },	// Level 4
	{ { 60,	150 }, { 120,	150 }, { 60,	150 } },	// Level 5
	{ { 70,	160 }, { 130,	160 }, { 70,	160 } },	// Level 6
	{ { 80,	170 }, { 140,	170 }, { 80,	170 } },	// Level 7
	{ { 90,	180 }, { 200,	180 }, { 90,	180 } },	// Level 8
	{ { 100,	190 }, { 500,	190 }, { 100,	190 } },	// Level 9
	{ { 150,	200 }, { 150,	200 }, { 150,	200 } }	// Level 10
	/* Ammo	Health	Ammo	Armor	Ammo	Dmg */
}

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
	register_cvar("upgrade_lvl_", PLUGIN_VERSION, FCVAR_SPONLY|FCVAR_SERVER);
	set_cvar_string("upgrade_lvl_", PLUGIN_VERSION);

	register_message(get_user_msgid("Health"), "msg_Health");
	
	register_forward(FM_ClientUserInfoChanged, "fw_ChangeName");

	RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn", 1);
	RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage");
	
	register_clcmd("say /level", "ClShowLevel");
	register_clcmd("say_team /level", "ClShowLevel");

	register_clcmd("say /reset", "ClResetAll");
	register_clcmd("say_team /reset", "ClResetAll");
	
	register_clcmd("say /upgrade", "OpenUpgradeMenu");
	register_clcmd("say_team /upgrade", "OpenUpgradeMenu");

	cvar_hostname = get_cvar_pointer("hostname");

	g_Vault = nvault_open("UpgradeLevelMod-by-YONTU");
	if(g_Vault == INVALID_HANDLE)
		set_fail_state("Eroare la deschiderea bazei de date din foldeurul data/vault.");
}

public plugin_precache()
	precache_sound(SoundLevelUp);

public plugin_end()
	nvault_close(g_Vault);

public plugin_cfg()
{
	get_pcvar_string(cvar_hostname, g_HostName, charsmax(g_HostName));
}

public client_putinserver(id)
{
	LoadUserExperience(id);
}

public client_disconnect(id)
{
	SaveUserExperience(id);
}

// thx ConnorMcLeod
public fw_ChangeName(id)
{
	static const name[] = "name";
	static szOldName[32], szNewName[32];

	pev(id, pev_netname, szOldName, charsmax(szOldName));
	if(szOldName[0])
	{
		get_user_info(id, name, szNewName, charsmax(szNewName));
		if(!equal(szOldName, szNewName))
		{
			set_user_info(id, name, szOldName);
			return FMRES_HANDLED;
		}
	}

	return FMRES_IGNORED;
}

public fw_PlayerSpawn(id)
{
	if(!is_user_alive(id))
		return HAM_IGNORED;

	if(g_UserLevel[HEALTH][id] == 0)
		CheckUserLevel(id, HEALTH);
	if(g_UserLevel[ARMOR][id] == 0)
		CheckUserLevel(id, ARMOR);
	if(g_UserLevel[DAMAGE][id] == 0)
		CheckUserLevel(id, DAMAGE);
		
	set_task(1.0, "set_user_items", id);

	return HAM_IGNORED;
}

public fw_TakeDamage(victim, inflictor, attacker, Float:fDamage, iDmgType)
{
	if(is_user_valid(attacker) && is_user_alive(attacker) && victim != attacker)
	{
		if(iDmgType & DMG_HEGRENADE)
			return HAM_IGNORED;

		fDamage += g_PlayerData[g_UserLevel[DAMAGE][attacker]][DAMAGE][Power] * 1.0;

		SetHamParamFloat(4, fDamage);
		return HAM_HANDLED;
	}
	return HAM_IGNORED;
}

public msg_Health(msgid, dest, id)
{
	static health; health = get_msg_arg_int(1);
	if(health > 255)
	{
		set_msg_arg_int(1, ARG_BYTE, 255);
	}
	
	return PLUGIN_CONTINUE;
}

public ClShowLevel(id)
{
	if(is_user_connected(id))
	{
		ColorChat(id, "!1%s!4 Health!1 Level: !3%d!1/!3%d!1 |!4 Health!1 Amount:!3 %d!1 | Next Money:!4 %d", Tag, g_UserLevel[HEALTH][id], TOTAL_LEVELS, g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][Power], g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks]);
		ColorChat(id, "!1%s!4 Armor!1 Level: !3%d!1/!3%d!1 |!4 Armor!1 Amount:!3 %d!1 | Next Money:!4 %d", Tag, g_UserLevel[ARMOR][id], TOTAL_LEVELS, g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][Power], g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks]);
		ColorChat(id, "!1%s!4 Damage!1 Level: !3%d!1/!3%d!1 | Incrase!4 Damage!1: +!3%d!1 | Next Money:!4 %d", Tag, g_UserLevel[DAMAGE][id], TOTAL_LEVELS, g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][Power], g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks]);
	}

	return PLUGIN_CONTINUE;
}

public ClResetAll(id)
{
	if(!is_user_connected(id))
		return PLUGIN_HANDLED;

	formatex(text_menu, charsmax(text_menu), "Reset Menu (All levels on 0)^n\y%s", g_HostName);
	menu = menu_create(text_menu, "Menu2Handler");

	menu_additem(menu, "Health", "1", 0);
	menu_additem(menu, "Armor", "2", 0);
	menu_additem(menu, "Damage", "3", 0);

	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);

	return PLUGIN_CONTINUE;
}

public Menu2Handler(id, menu, item)
{
	if(!is_user_connected(id) || item == MENU_EXIT)
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new item_access, callback, name[32], data[6];
	menu_item_getinfo(menu, item, item_access, data, charsmax(data), name, charsmax(name), callback);
	new key = str_to_num(data);

	switch(key)
	{
		case 1:
		{
			g_UserLevel[HEALTH][id] = 1;
			ColorChat(id, "!4%s!1 I reset your!3 health!1 level on 0. Good Luck!", Tag);
		}
		case 2:
		{
			g_UserLevel[ARMOR][id] = 1;
			ColorChat(id, "!4%s!1 I reset your!3 armor!1 level on 0. Good Luck!", Tag);
		}
		case 3:
		{
			g_UserLevel[DAMAGE][id] = 1;
			ColorChat(id, "!4%s!1 I reset your!3 damage!1 level on 0. Good Luck!", Tag);
		}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;
}

public OpenUpgradeMenu(id)
{
	if(!is_user_connected(id))
		return PLUGIN_HANDLED;

	if(g_UserLevel[HEALTH][id] == TOTAL_LEVELS && g_UserLevel[ARMOR][id] == TOTAL_LEVELS && g_UserLevel[DAMAGE][id] == TOTAL_LEVELS)
	{
		ColorChat(id, "!4%s!1 Ai deja!3 level maxim!1 la toate puterile.", Tag);
		return PLUGIN_HANDLED;
	}

	formatex(text_menu, charsmax(text_menu), "Upgrade Menu | Money:\r %d\d$^n\y%s", cs_get_user_money(id), g_HostName);
	
	menu = menu_create(text_menu, "MenuHandler");
	menu_callback = menu_makecallback("CallBackMenu");

	if(g_UserLevel[HEALTH][id] != TOTAL_LEVELS)
	{
		formatex(text_item[HEALTH], charsmax(text_item[]), "%sUpgrade my health [Level\r %d%s] [\r%d%s$]", g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_UserLevel[HEALTH][id], g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks], g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks] > cs_get_user_money(id) ? "\d" : "");
	}
	else
	{
		formatex(text_item[HEALTH], charsmax(text_item[]), "\dUpgrade my health [Max Level]");
	}
	menu_additem(menu, text_item[HEALTH], "1", 0, menu_callback);

	if(g_UserLevel[ARMOR][id] != TOTAL_LEVELS)
	{
		formatex(text_item[ARMOR], charsmax(text_item[]), "%sUpgrade my armor [Level\r %d%s] [\r%d%s$]", g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_UserLevel[ARMOR][id], g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks], g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks] > cs_get_user_money(id) ? "\d" : "");
	}
	else
	{
		formatex(text_item[ARMOR], charsmax(text_item[]), "\dUpgrade my armor [Max Level]");
	}
	menu_additem(menu, text_item[ARMOR], "2", 0, menu_callback);
	
	if(g_UserLevel[DAMAGE][id] != TOTAL_LEVELS)
	{
		formatex(text_item[DAMAGE], charsmax(text_item[]), "%sUpgrade my damages [Level\r %d%s] [\r%d%s$]", g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_UserLevel[DAMAGE][id], g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks] > cs_get_user_money(id) ? "\d" : "", g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks], g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks] > cs_get_user_money(id) ? "\d" : "");
	}
	else
	{
		formatex(text_item[DAMAGE], charsmax(text_item[]), "\dUpgrade my damages [Max Level]");
	}
	menu_additem(menu, text_item[DAMAGE], "3", 0, menu_callback);

	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);

	return PLUGIN_CONTINUE;
}

public MenuHandler(id, menu, item)
{
	if(!is_user_connected(id) || item == MENU_EXIT)
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new item_access, callback, name[32], data[6];
	menu_item_getinfo(menu, item, item_access, data, charsmax(data), name, charsmax(name), callback);
	new key = str_to_num(data);

	switch(key)
	{
		case 1: CheckUserLevel(id, HEALTH);
		case 2: CheckUserLevel(id, ARMOR);
		case 3: CheckUserLevel(id, DAMAGE);
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;
}

public CallBackMenu(id, menu, item)
{
	new data[6], name[64], access, CallBack;
	menu_item_getinfo(menu, item, access, data, charsmax(data), name, charsmax(name), CallBack);
	
	switch(data[0])
	{
		case '1':
		{
			if(cs_get_user_money(id) < 0 || g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][AmmoPacks] > cs_get_user_money(id) || g_UserLevel[HEALTH][id] == TOTAL_LEVELS)
				return ITEM_DISABLED;
		}
		case '2':
		{
			if(cs_get_user_money(id) < 0 || g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][AmmoPacks] > cs_get_user_money(id) || g_UserLevel[ARMOR][id] == TOTAL_LEVELS)
				return ITEM_DISABLED;
		}
		case '3':
		{
			if(cs_get_user_money(id) < 0 || g_PlayerData[g_UserLevel[DAMAGE][id]][DAMAGE][AmmoPacks] > cs_get_user_money(id) || g_UserLevel[DAMAGE][id] == TOTAL_LEVELS)
				return ITEM_DISABLED;
		}
	}
	
	return ITEM_ENABLED;
}

public CheckUserLevel(id, e_Item:item)
{
	if(!is_user_connected(id))
		return PLUGIN_HANDLED;
	
	if(g_UserLevel[item][id] < TOTAL_LEVELS)
	{
		if(cs_get_user_money(id) >= g_PlayerData[g_UserLevel[item][id]][item][AmmoPacks])
		{
			cs_set_user_money(id, max(0, cs_get_user_money(id) - g_PlayerData[g_UserLevel[item][id]][item][AmmoPacks]));

			g_UserLevel[item][id]++;

			if(g_UserLevel[item][id] != 1)
			{
				emit_sound(id, CHAN_AUTO, SoundLevelUp, 1.0, ATTN_NORM, 0, PITCH_NORM);

				new g_Color[3];
				g_Color[0] = get_color_level(id, 0, item); // r
				g_Color[1] = get_color_level(id, 1, item); // g
				g_Color[2] = get_color_level(id, 2, item); // b
				MakeFadeScreen(id, 1.5, g_Color[2], g_Color[1], g_Color[0], random_num(100, 200));
				
				new string[11];
				switch(item)
				{
					case HEALTH: formatex(string, charsmax(string), "on HEALTH");
					case ARMOR: formatex(string, charsmax(string), "on ARMOR");
					case DAMAGE: formatex(string, charsmax(string), "on DAMAGE");
				}
				ColorChat(id, "!3%s!1 Congratulations, you've !4leveled up!3 %s!1. Current level:!3 %d!1 !", Tag, string, g_UserLevel[item][id]);
				if(g_UserLevel[item][id] < TOTAL_LEVELS)
					ColorChat(id, "!3%s!1 Next Money (needed):!4 %d!1 !", Tag, g_PlayerData[g_UserLevel[item][id]][item][AmmoPacks]);
			}
		}
	}

	return PLUGIN_HANDLED;
}

stock MakeFadeScreen(id, const Float:Seconds, const Red, const Green, const Blue, const Alpha)
{
	static g_MsgScreenFade = 0;
	if(!g_MsgScreenFade)
		g_MsgScreenFade = get_user_msgid("ScreenFade");

	message_begin(MSG_ONE, g_MsgScreenFade, _, id);
	write_short(floatround(4096.0 * Seconds, floatround_round));
	write_short(floatround(4096.0 * Seconds, floatround_round));
	write_short(0x0000);
	write_byte(Red);
	write_byte(Green);
	write_byte(Blue);
	write_byte(Alpha);
	message_end();
}

public get_color_level(id, number, e_Item:item)
{
	new g_Color[3];
	switch(g_UserLevel[item][id])
	{
		case 1:	g_Color = { 248, 172, 58 };
		case 2:	g_Color = { 0, 255, 128 };
		case 3:	g_Color = { 170, 255, 127 };
		case 4:	g_Color = { 155, 240, 70 };
		case 5:	g_Color = { 255, 255, 0 };
		case 6:	g_Color = { 255, 127, 85 };
		case 7:	g_Color = { 0, 212, 255 };
		case 8:	g_Color = { 70, 70, 240 };
		case 9:	g_Color = { 170, 0, 255 };
		case 10:	g_Color = { 255, 255, 0 };
		default:	g_Color = { 200, 200, 0 };
	}
	
	return g_Color[number];
}

public SaveUserExperience(id)
{
	new szVaultKey[64], szVaultData[256], szName[32];
	get_user_name(id, szName, charsmax(szName));
	format(szVaultKey, charsmax(szVaultKey), "%s", szName);
	format(szVaultData, charsmax(szVaultData), "%i#%i#%i#", g_UserLevel[HEALTH][id], g_UserLevel[ARMOR][id], g_UserLevel[DAMAGE][id]);

	nvault_set(g_Vault, szVaultKey, szVaultData);
	return PLUGIN_HANDLED;
}

public LoadUserExperience(id)
{
 	new szVaultKey[64], szVaultData[256], szName[32], level[e_Item][33];
	get_user_name(id, szName, charsmax(szName));
	format(szVaultKey, charsmax(szVaultKey), "%s", szName);
	format(szVaultData, charsmax(szVaultData), "%i#%i#%i#", g_UserLevel[HEALTH][id], g_UserLevel[ARMOR][id], g_UserLevel[DAMAGE][id]);

	nvault_get(g_Vault, szVaultKey, szVaultData, charsmax(szVaultData));
	replace_all(szVaultData, charsmax(szVaultData), "#", " ");

	parse(szVaultData, level[HEALTH], charsmax(level[]), level[ARMOR], charsmax(level[]), level[DAMAGE], charsmax(level[]));
	g_UserLevel[HEALTH][id] = str_to_num(level[HEALTH]);
	g_UserLevel[ARMOR][id] = str_to_num(level[ARMOR]);
	g_UserLevel[DAMAGE][id] = str_to_num(level[DAMAGE]);

	return PLUGIN_HANDLED;
}

// STOCK'S
public set_user_items(id)
{
	if(!is_user_alive(id))
		return;
	
	// HEALTH
	set_user_health(id, clamp(g_PlayerData[g_UserLevel[HEALTH][id]][HEALTH][Power], 10, 1000));
	
	// ARMOR
	new CsArmorType:ArmorType = CS_ARMOR_VESTHELM;
	cs_set_user_armor(id, clamp(g_PlayerData[g_UserLevel[ARMOR][id]][ARMOR][Power], 0, 1000), ArmorType);
}

stock ColorChat(id, String[], any:...)
{
	static szMesage[192];
	vformat(szMesage, charsmax(szMesage), String, 3);
	
	replace_all(szMesage, charsmax(szMesage), "!1", "^1");
	replace_all(szMesage, charsmax(szMesage), "!3", "^3");
	replace_all(szMesage, charsmax(szMesage), "!4", "^4");
	
	static g_msg_SayText = 0;
	if(!g_msg_SayText)
		g_msg_SayText = get_user_msgid("SayText");
	
	new Players[32], iNum = 1, i;

 	if(id) Players[0] = id;
	else get_players(Players, iNum, "ch");
	
	for(--iNum; iNum >= 0; iNum--)
	{
		i = Players[iNum];
		
		message_begin(MSG_ONE_UNRELIABLE, g_msg_SayText, _, i);
		write_byte(i);
		write_string(szMesage);
		message_end();
	}
}
Instalare:
1. Fisierul health_dmg_armor_level_mod.sma il puneti in addons/amxmodx/scripting
2. Fisierul health_dmg_armor_level_mod.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

health_dmg_armor_level_mod.amxx
4. Fisierul levelup.wav il puneti in cstrike/sound/misc
5. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
-

Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
  • Nu are
Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • /upgrade - Cumperi un level pentru a-ti upgrada viata sau armura sau damage-ul. Atentie! Acesta costa.
    /level - iti arata in chat informatii despre fiecare level in parte + cantitatea de care benficiezi (armura/viata/dmg) + costul necesar cumpararii unui nou level
    /reset - iti deschide un meniu de unde iti poti reseta level-ul la viata/armura/dmg
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- hamsandwich
- fun
- fakemeta
- cstrike
- nvault

Alte informatii:
De unde modific costul unui level pentru armura, viata, dmg?
Deschidem sursa (health_dmg_armor_level_mod.sma) si cautam linia:

Code: Select all

new const g_PlayerData[TOTAL_LEVELS + 1][e_Item][e_data] =
Linia arata astfel:

Code: Select all

new const g_PlayerData[TOTAL_LEVELS + 1][e_Item][e_data] =
{
	/* Ammo	Health	Ammo	Armor	Ammo	Dmg */	
	{ { 0,	100 }, { 0,	100 }, { 0,	100 } },	// NU modifica nimic pe linia asta
	{ { 20,	110 }, { 20,	110 }, { 20,	110 } },	// Level 1
	{ { 30,	120 }, { 30,	120 }, { 30,	120 } },	// Level 2
	{ { 40,	130 }, { 40,	130 }, { 40,	130 } },	// Level 3
	{ { 50,	140 }, { 50,	140 }, { 50,	140 } },	// Level 4
	{ { 60,	150 }, { 60,	150 }, { 60,	150 } },	// Level 5
	{ { 70,	160 }, { 70,	160 }, { 70,	160 } },	// Level 6
	{ { 80,	170 }, { 80,	170 }, { 80,	170 } },	// Level 7
	{ { 90,	180 }, { 90,	180 }, { 90,	180 } },	// Level 8
	{ { 100,	190 }, { 100,	190 }, { 100,	190 } },	// Level 9
	{ { 150,	200 }, { 150,	200 }, { 150,	200 } }	// Level 10
	/* Ammo	Health	Ammo	Armor	Ammo	Dmg */
}
Aceasta este o matrice. Observam ca are linii si coloane.
- Pe prima coloana (Ammo) gasim costul nivelului vietii.
- Pe a doua coloana (Health) gasim cantitatea de viata pe care o primim in functie de level.
Ex: Am level 8. Eu voi primi 180 viata la fiecare spawn.

- Pe a treia coloana (Ammo) gasim costul nivelului armurii.
- Pe a patra coloana (Armor) gasim cantitatea de armura pe care o primim in functie de level.
Ex: Am level 5. Eu voi primi 150 armura la fiecare spawn.

- Pe a cincea coloana (Ammo) gasim costul nivelului dmg-ului.
- Pe a sasea coloana (Dmg) gasim cantitatea de dmg adaugata in plus in functie de level. (DMG = cat ii iau din viata adversarului)
Ex: Am level 2. Eu voi lua +120 dmg in plus pe langa dmg-ul default al armei respective cu care trag, inamicului.

Puteti modifica matricea (schimband valorile) cum doriti voi.
Imagini | Afiseaza codul
Image
Image
Image
Image
Image
Log | Afiseaza codul
Update (v1.1):
- bug fix la damage
- bug fix la primirea creditelor/banilor cand cumperi un level
- optimizare cod
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
eXtreamSHOP
User avatar
Clic
eXtream Mod
eXtream Mod
Posts: 3657
Joined: 13 Aug 2013, 17:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Location: Piatra Neamt
Been thanked: 18 times
Contact:

06 Aug 2015, 07:19

Daca ai putea sa-l faci si pe credite (furien) ar fi bine.
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

06 Aug 2015, 09:26

Verifiica primul post.
Am facut pluginul compatibil cu mai multe versiuni:

Code: Select all

- modul biohazard
- modul zombie plague
- versiunea pe bani
- versiunea pe credite Aragon
- versiunea pe credite Askhanar
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
User avatar
MzQ*
Membru eXtream
Membru eXtream
Posts: 3724
Joined: 07 Jul 2014, 17:30
Detinator Steam: Da
CS Status: _|_
Fond eXtream: 0
Location: R.Moldova
Has thanked: 3 times
Been thanked: 1 time
Contact:

06 Aug 2015, 13:03

De ce e de 3 ori "Ammo"?
| Afiseaza codul
/* Ammo   Health   Ammo   Armor   Ammo   Dmg */
Nu am inteles
Oricum misto pluginu mai ales pe un zm :)
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

06 Aug 2015, 13:25

MzQ* wrote:De ce e de 3 ori "Ammo"?
| Afiseaza codul
/* Ammo   Health   Ammo   Armor   Ammo   Dmg */
Nu am inteles
Oricum misto pluginu mai ales pe un zm :)
Daca te uiti mai bine, matricea e sectionata in 6 columne.
{{x0 , y0}, {x1, y1}, {x2, y2}}..
X reprezinta costul pentru fiecare Y in fiecare caz (avem 3 cazuri).
Ammo - Health: cele 2 perechi formeaza o noua columna.
Ammo - Armor: alta columna
Ammo - Dmg: alta columna.
Nu prea stiu sa explic, dar la aplicat nu stau prost deloc.
Am explicat in primul topic cum sta treaba si cum poti modifica matricea.
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
User avatar
MzQ*
Membru eXtream
Membru eXtream
Posts: 3724
Joined: 07 Jul 2014, 17:30
Detinator Steam: Da
CS Status: _|_
Fond eXtream: 0
Location: R.Moldova
Has thanked: 3 times
Been thanked: 1 time
Contact:

06 Aug 2015, 14:14

Aaa , eu banuiam ca ultima e ca la zombieplague iti da la spawn (depinde de level ) o anumita suma de ammo packs
ar fi misto sa bagi asa
Edit: Vede cineva imaginile?
Lux0R^
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1225
Joined: 13 Jul 2013, 15:31
Detinator Steam: Da
Reputatie: Scripter eXtreamCS
Moderator ajutator
Has thanked: 15 times
Been thanked: 9 times

07 Aug 2015, 01:48

de ce la nvault folosesti format si in alte parti formatex ?
Pauza pana in iulie... licenta ^^

Fara pm-uri pentru pluginuri de zm/furien + tot ce tine de vip.

Codul Scripterului: scripting/codul-scripterului-t362300.html#p2754224
User avatar
MzQ*
Membru eXtream
Membru eXtream
Posts: 3724
Joined: 07 Jul 2014, 17:30
Detinator Steam: Da
CS Status: _|_
Fond eXtream: 0
Location: R.Moldova
Has thanked: 3 times
Been thanked: 1 time
Contact:

07 Aug 2015, 10:43

APp mai bine bagai cu fvault ala salveaza mai bine decat nvault
cand avea cyby server avea levele si creditele pe nvault si playerii pierdeau level si credite
User avatar
HamletEagle
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 751
Joined: 21 Sep 2013, 14:05
Detinator Steam: Da
CS Status: Inactiv cateva zile.
SteamID: privat
Reputatie: Scripter eXtreamCS.com
Fost Moderator ajutator
Has thanked: 20 times
Been thanked: 85 times

07 Aug 2015, 12:04

MzQ* wrote:APp mai bine bagai cu fvault ala salveaza mai bine decat nvault
cand avea cyby server avea levele si creditele pe nvault si playerii pierdeau level si credite
Sigur, un fisier inc e mai rapid decat un modul. Eu zic sa aruncam logica pe geam, ca si asa nu ne trebuie...
Daca vreti ajutorul meu, nu dati bump la topic, fara intrebari de genu "cat mai dureaza/mai astept mult?".
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

08 Aug 2015, 09:43

HamletEagle wrote:
MzQ* wrote:APp mai bine bagai cu fvault ala salveaza mai bine decat nvault
cand avea cyby server avea levele si creditele pe nvault si playerii pierdeau level si credite
Sigur, un fisier inc e mai rapid decat un modul. Eu zic sa aruncam logica pe geam, ca si asa nu ne trebuie...
Intr-adevar.

Update (primul post)
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
monister
Membru, skill 0
Membru, skill 0
Posts: 69
Joined: 24 Dec 2014, 11:56
Detinator Steam: Da
CS Status: Pro CS 1.6 Player
SteamID: eaglemeister_cs16
Fond eXtream: 0
Location: Iasi
Contact:

08 Aug 2015, 10:29

Code: Select all

health_dmg_armor_level_mod.amx
- puteai sa il faci si mai lung =))
PS: Trebuia sa faci doar pentru echipa CT deoarece daca pui plugin-ul pentru modul zm/biohazard , si echipa T (zombii) vor avea si ei levele si daca un ct are levelele full la dmg, viata si ce mai era, cu un singur glont omoara zm-ul :)
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

08 Aug 2015, 10:51

monister wrote:

Code: Select all

health_dmg_armor_level_mod.amx
- puteai sa il faci si mai lung =))
PS: Trebuia sa faci doar pentru echipa CT deoarece daca pui plugin-ul pentru modul zm/biohazard , si echipa T (zombii) vor avea si ei levele si daca un ct are levelele full la dmg, viata si ce mai era, cu un singur glont omoara zm-ul :)
Mai bine te uiti peste sursa dupa aia sa comentezi.
Am verificat totul.
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests