Base Builder Game Mod: Frags Levels [Updated 0.0.8 BETA]

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

06 Mar 2014, 22:06

Descriere: Este un level mod pe frage si cam atat . O sa ii fac updateuri si o sa fie mult mai mult .. Asta l-am facut la o cerere ;)) .

Descarcare:
Versiune 0.0.8 | Afiseaza codul
/*
	BASE BUILDER GAME MOD: FRAGS LEVEL MOD
			BY GHOST ***
				VERSION 0.0.8 BETA
				
	Credite
	
		Arion - Pentru chestia cu chatu (Am extras chestii pentru mesaju chat (LVL:) din pluginu ala Green admin chat :-@
		Askhanar - Asa salveaza el pe nVault (:-??)
*/

// Includes

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta_util>
#include <nvault>
#include <fun>

// Define

#define MAX_LEVELS	21

// Register Plugin & Tag & pragma

#pragma semicolon 1

new const
	PLUGIN_NAME[] = "Base Builder Game Mod: Frags Level Mod",
	PLUGIN_VERS[] = "0.0.8 BETA",
	PLUGIN_AUTH[] = "GhosT ***";
	
new const szTag[] = "[Base Builder]";

// Variabile

new PlayerFrags[33], PlayerLevel[33];
new PlayerWaitTime[33];
new bool:HasItems[33], bool:HaveDamage[33];
new nVault;

// Cvars

new GiveTime, GameNameOn;

// Levele

new const Levels[MAX_LEVELS + 2] =
{
	0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500,
	550, 600, 650, 700, 750, 800, 850, 900, 950, 1000,
	100000000000000000000000000000 // Nu modificati
};

// Flags

new const GiveFlags[] = "au";
new const TakeFlags[] = "au";

public plugin_init()
{
	register_plugin(PLUGIN_NAME, PLUGIN_VERS, PLUGIN_AUTH);
	
	register_event("DeathMsg", "DeathMsg", "a");
	
	RegisterHam(Ham_Spawn, "player", "PlayerSpawn", true);
	RegisterHam(Ham_TakeDamage, "player", "PlayerTakeDamage");
	
	register_logevent("RoundStart", 2, "1=Round_Start");
	
	register_clcmd("say /level", "LevelClCmd");
	register_clcmd("say /frags", "LevelClCmd");
	register_clcmd("say /lvl", "LevelClCmd");
	
	register_clcmd("say_team /level", "LevelClCmd");
	register_clcmd("say_team /frags", "LevelClCmd");
	register_clcmd("say_team /lvl", "LevelClCmd");
	
	register_concmd("amx_give_frags", "GiveFragsConCmd");
	register_concmd("amx_take_frags", "TakeFragsConCmd");
	
	register_forward(FM_GetGameDescription, "GameNameCmd");
	
	register_clcmd("say", "SayClCmd");
	
	GiveTime	= register_cvar("GiveTime", "30"); // Aici puneti in cate secunde de la spawnu playerulu sa dea itemele .
	GameNameOn	= register_cvar("GameNameOn", "1");			// adica cat timp de constructie este + 5/10 secunde
	nVault		= nvault_open("BaseBuilderFrags");
	
	register_cvar("bb_frags_mod", PLUGIN_VERS, FCVAR_SPONLY | FCVAR_SERVER);
	register_cvar("bb_frags_author", PLUGIN_AUTH, FCVAR_SERVER | FCVAR_SPONLY);
}
public plugin_natives( )
{
	register_native("bb_get_user_frags", "_get_user_frags", true);
	register_native("bb_set_user_frags", "_set_user_frags", true);
}
public _get_user_frags(iParams)
{
	return PlayerFrags[get_param(1)];
}
public _set_user_frags(iParams)
{
	PlayerFrags[get_param(1)] = max(0, get_param(2));
	return PlayerFrags[get_param(1)];
}
public DeathMsg( )
{
	new iAttacker	= read_data(1);
	new iVictim	= read_data(2);
	
	if(iAttacker == iVictim)
	{
		if(PlayerFrags[iAttacker] >= 1)
			PlayerFrags[iAttacker]--;
			
		else return PLUGIN_HANDLED;
	}
		
	else if(iAttacker != iVictim)
		PlayerFrags[iAttacker]++;
		
	if(PlayerLevel[iAttacker] < MAX_LEVELS - 1 && PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
	{
		while(PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
			PlayerLevel[iAttacker]++;
			
		ColorChat(iAttacker, "^x04%s^x01 Ai trecut la^x04 levelul^x03 %d^x01 !", szTag, PlayerLevel[iAttacker]);
		
		ShakeScreen(iAttacker, 2.0);
		FadeScreen(iAttacker, 2.0, 0, 15, 200, 200);
	}
	if(PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim] - 1])
	{
		while(PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim] - 1])
			PlayerLevel[iVictim]--;
			
		ColorChat(iVictim, "^x04%s^x01 Ai pierdut^x04 un level^x03 din lipsa de fraguri^x01 !", szTag);
		
		ShakeScreen(iVictim, 2.0);
		FadeScreen(iVictim, 2.0, 200, 15, 0, 200);
	}
	
	return PLUGIN_CONTINUE;
}
public PlayerSpawn(id)
{
	if(PlayerLevel[id] < MAX_LEVELS - 1)
	{
		if(PlayerFrags[id] >= Levels[PlayerLevel[id]])
		{
			while(PlayerFrags[id] >= Levels[PlayerLevel[id]])
				PlayerLevel[id]++;
		}
	}
	
	return PLUGIN_HANDLED;
}
public PlayerTakeDamage(iAttacker, iVictim, Float:fDamage, iDamageBits)
{
	if(HaveDamage[iAttacker])
	{
		fDamage = (fDamage + 2.0 * Float:PlayerLevel[iAttacker]);
		return HAM_HANDLED;
	}
	
	return HAM_IGNORED;
}
public RoundStart()
{	
	new Jucator[32], iNum;
	get_players(Jucator, iNum);
	
	for(new i = 0; i < iNum; i++)
	{
		HasItems[Jucator] 		= false;
		HaveDamage[Jucator] 		= false;
		
		PlayerWaitTime[Jucator]	= get_pcvar_num(GiveTime);
		
		set_task(1.0, "HudAbility", Jucator, _, _, "b"); // Pentru a arata corect mesajul in hud ..
		set_task(get_pcvar_float(GiveTime) + 2.0, "PlayerAbility", Jucator); // Timpul corect pentru taskul de iteme .
	}
}
public HudAbility(id)
{
	if(PlayerWaitTime[id] > 0)
	{	
		set_hudmessage(0, 255, 100, 0.70, 0.20, 0, 1.0, 2.0);
		show_hudmessage(id, "Iti vei primi abilitatile in %i secunde ...", PlayerWaitTime[id]);
		
		PlayerWaitTime[id] -= 1;
	}
	
	return PLUGIN_CONTINUE;
}
public PlayerAbility(id)
{
	if(HasItems[id] == false)
	{
		if(get_user_team(id) == 2)
		{
			set_user_health(id, get_user_health(id) + 10 * PlayerLevel[id]);
			set_user_armor(id, get_user_armor(id) + 20 * PlayerLevel[id]);
			
			ColorChat(id, "^x04%s^x01 Ai levelul %d !", szTag, PlayerLevel[id]);
			ColorChat(id, "^x04%s^x01 Abilitati:^x03 [^x04+%dHP^x03][^x04+%dAP^x03][^x04+%dDMG^x03]", szTag, 10 * PlayerLevel[id], 20 * PlayerLevel[id], 2* PlayerLevel[id]);
			HaveDamage[id] = true;
			
		}
		else if(get_user_team(id) == 1)
		{
			set_user_health(id, get_user_health(id) + 100 * PlayerLevel[id]);
			set_user_armor(id, get_user_armor(id) + 200 * PlayerLevel[id]);
			
			ColorChat(id, "^x04%s^x01 Ai levelul %d !", szTag, PlayerLevel[id]);
			ColorChat(id, "^x04%s^x01 Abilitati:^x03 [^x04+%dHP^x03][^x04+%dAP^x03][^x04+%dDMG^x03]", szTag, 10 * PlayerLevel[id], 20 * PlayerLevel[id], 2* PlayerLevel[id]);
			HaveDamage[id] = true;
		}
		
		HasItems[id] = true;
	}
	
	set_hudmessage(0, 255, 100, 0.70, 0.20);
	show_hudmessage(id, "Ti-ai primit abilitatile !");
	
	return PLUGIN_CONTINUE;
}
public LevelClCmd(id)
{	
	if(PlayerLevel[id] != MAX_LEVELS - 1)
		ColorChat(id, "^x04%s^x03 %s^x01, ai: |^x04 Level: %d / %d^x01 |^x04 Fraguri: %d / %d^x01 |^x04 %d Frag%s^x01 ramas%s pana la^x04 levelul %d^x01 |", szTag, get_name(id), PlayerLevel[id], MAX_LEVELS - 1, PlayerFrags[id], Levels[PlayerLevel[id]], Levels[PlayerLevel[id]] - PlayerFrags[id], Levels[PlayerLevel[id]] - PlayerFrags[id] == 1 ? "" : "uri", Levels[PlayerLevel[id]] - PlayerFrags[id] == 1 ? "" : "e", PlayerLevel[id] + 1);
	else if(PlayerLevel[id] == MAX_LEVELS - 1)
		ColorChat(id, "^x04%s^x03 %s^x01, ai: |^x04 Level: MAXIM^x01 & ^x04 Fraguri: %d^x01 !", szTag, get_name(id), PlayerFrags[id]);
	
	return PLUGIN_HANDLED;
}
public GiveFragsConCmd(id)
{
	if(get_user_flags(id) & read_flags(GiveFlags))
	{
		new szArg[32], szAmount[32];
		new Amount, iTarget;
		
		read_argv(1, szArg, sizeof(szArg) - 1);
		read_argv(2, szAmount, sizeof(szAmount) - 1);
		
		iTarget = cmd_target(id, szArg, CMDTARGET_NO_BOTS);
		Amount = str_to_num(szAmount);
		
		if(equal(szArg, "") || equal(szAmount, ""))
		{
			console_print(id, "amx_give_frags <NICK> <AMOUNT>");
			return PLUGIN_HANDLED;
		}
		
		if(!iTarget)
		{
			console_print(id, "Jucatorul %s nu exista sau nu este online !", iTarget);
			return PLUGIN_HANDLED;
		}
		
		if(Amount > 99999)
		{
			console_cmd(id, "Nu poti da mai mult de 99999 fraguri !");
			return PLUGIN_HANDLED;
		}
		
		ColorChat(0, "^x03%s^x04 (ADMIN): %s^x01 ii da^x03 %d Frag%s^x01 lui^x04 %s^x01 !", szTag, get_name(id), Amount, Amount == 1 ? "" : "uri", get_name(iTarget));
		log_amx("ADMIN: %s (#%s) gave to %s (#%s) %d Frag%s !", get_name(id), get_authid(id), get_name(iTarget), get_authid(iTarget), Amount, Amount == 1? "" : "s");
		
		PlayerFrags[iTarget] += Amount;
		
		if(PlayerLevel[iTarget] < MAX_LEVELS - 1)
		{
			while(PlayerFrags[iTarget] >= Levels[PlayerLevel[iTarget]])
				PlayerLevel[iTarget]++;
		}
		
		SaveFrags(iTarget);
	}
	else
	{
		console_print(id, "Nu ai acces la aceasta comanda !");
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_HANDLED;
}
public TakeFragsConCmd(id)
{
	if(get_user_flags(id) & read_flags(TakeFlags))
	{
		new szArg[32], szAmount[32];
		new Amount, iTarget;
		
		read_argv(1, szArg, sizeof(szArg) - 1);
		read_argv(2, szAmount, sizeof(szAmount) - 1);
		
		Amount = str_to_num(szAmount);
		iTarget = cmd_target(id, szArg, CMDTARGET_NO_BOTS);
		
		if(equal(szArg, "") || equal(szAmount, ""))
		{
			console_print(id, "amx_take_frags <NICK> <AMOUNT>");
			return PLUGIN_HANDLED;
		}
		
		if(!iTarget)
		{
			console_print(id, "Jucatorul %s nu exista sau nu este online !", iTarget);
			return PLUGIN_HANDLED;
		}
		
		if(Amount > PlayerFrags[id])
		{
			console_print(id, "Jucatorul %s are doar %d fraguri !", get_name(iTarget), PlayerFrags[iTarget]);
			return PLUGIN_HANDLED;
		}
		
		ColorChat(0, "^x03%s^x04 (ADMIN): %s^x01 ii ia^x03 %d Frag%s^x01 lui^x04 %s^x01 !", szTag, get_name(id), Amount, Amount == 1 ? "" : "uri", get_name(iTarget));
		log_amx("ADMIN: %s (#%s) take to %s (#%s) %d Frag%s !", get_name(id), get_authid(id), get_name(iTarget), get_authid(iTarget), Amount, Amount == 1 ? "" : "s");
		
		PlayerFrags[iTarget] -= Amount;
		
		if(PlayerFrags[iTarget] < Levels[PlayerLevel[iTarget] - 1])
		{
			while(PlayerFrags[iTarget] < Levels[PlayerLevel[iTarget] - 1])
				PlayerLevel[iTarget]--;
		}
		
		SaveFrags(iTarget);
	}
	else
	{
		console_print(id, "Nu ai acces la aceasta comanda !");
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_HANDLED;
}
public GameNameCmd()
{
	if(get_pcvar_num(GameNameOn))
		forward_return(FMV_STRING, "Base Builder Frags Mod");
		
	return FMRES_SUPERCEDE;
}
public client_putinserver(id)
{
	ColorChat(0, "^x04%s^x03 [%d]^x04 [Level: %d]^x01 se conecteaza pe server !", szTag, get_name(id), PlayerLevel[id]);
	
	LoadFrags(id);
	
	set_task(1.0, "ShowUserDetails", id, _, _, "b");
}
public client_disconnect(id)
{
	ColorChat(0, "^x04%s^x03 [%d]^x04 [Level: %d]^x01 sa deconectat de pe server !", szTag, get_name(id), PlayerLevel[id]);
	SaveFrags(id);
}
public SayClCmd(id)
{
	new iMessage[192];
	
	read_args(iMessage, sizeof(iMessage) - 1);
	remove_quotes(iMessage);
	
	if(!valid_message(iMessage))
		return PLUGIN_CONTINUE;
	
	if(is_user_alive(id) && PlayerLevel[id] != MAX_LEVELS - 1)
		format(iMessage, sizeof(iMessage) - 1, "^x04[LVL: %d]^x03 %s ^x01: %s", PlayerLevel[id], get_name(id), iMessage);
	
	else if(!is_user_alive(id) && PlayerLevel[id] != MAX_LEVELS - 1)
		format(iMessage, sizeof(iMessage) - 1, "^x03[DEAD]^x04 [LVL: %d]^x03 %s ^x01: %s", PlayerLevel[id], get_name(id), iMessage);
	
	if(is_user_alive(id) && PlayerLevel[id] == MAX_LEVELS - 1)
		format(iMessage, sizeof(iMessage) - 1, "^x04[LVL: %d]^x03 %s ^x01: %s", PlayerLevel[id], get_name(id), iMessage);
	
	else if(!is_user_alive(id) && PlayerLevel[id] == MAX_LEVELS - 1)
		format(iMessage, sizeof(iMessage) - 1, "^x03[DEAD]^x04 [LVL: %d]^x03 %s ^x01: %s", PlayerLevel[id], get_name(id), iMessage);
	
	for(new i = 1; i <= get_maxplayers(); i++)
	{
		if(!is_user_connected(i))
			continue;
		
		if((is_user_alive(id) && is_user_alive(i)) || !(is_user_alive(id) && is_user_alive(i)))
		{
			message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i);
			write_byte(id);
			write_string(iMessage);
			message_end( );
		}
	}
	
	return PLUGIN_HANDLED;
}
public ShowUserDetails(id)
{
	set_hudmessage(0, 255, 255, -1.0, 0.75);
	
	if(is_user_alive(id) && PlayerLevel[id] < MAX_LEVELS - 1)
		show_hudmessage(id, "[Frags: %d / %d | Level: %d / %d]", PlayerFrags[id], Levels[PlayerLevel[id]], PlayerLevel[id], MAX_LEVELS - 1);
	
	if(is_user_alive(id) && PlayerLevel[id] >= MAX_LEVELS - 1)
		show_hudmessage(id, "[Frags: %d | Level: MAXIM]", PlayerFrags[id]);
}
public LoadFrags(id)
{
	new szData[256], iTimestamp;
	
	formatex(szData, sizeof(szData) - 1, "%i ", PlayerFrags[id]);
	
	if(nvault_lookup(nVault, get_name(id), szData, sizeof(szData), iTimestamp))
	{
		static iFrags[15];
		parse(szData, iFrags, sizeof(iFrags) - 1);
		PlayerFrags[id] = str_to_num(iFrags);
		return PLUGIN_CONTINUE;
	}
	
	return PLUGIN_CONTINUE;
}
public SaveFrags(id)
{
	new szData[256];
	formatex(szData, sizeof(szData) - 1, "%i ", PlayerFrags[id]);
	
	nvault_set(nVault, get_name(id), szData);
}
stock get_name(id, len=31)
{
	new Name[32];
	get_user_name(id, Name, len);
	
	return Name;
}
stock get_authid(id, len=31)
{
	new AuthID[32];
	get_user_authid(id, AuthID, len);
	
	return AuthID;
}
stock ColorChat(const id, const input[], any:...)
{
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4"); // Green Color
	replace_all(msg, 190, "^x01", "^1"); // Default Color
	replace_all(msg, 190, "^x03", "^3"); // Team Color
	replace_all(msg, 190, "^0", "^0"); // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch");
	{
		for(new i = 0; i < count; i++)
		{
			if(is_user_connected(players))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
stock ShakeScreen(id, const Float:seconds)
{
	message_begin(MSG_ONE, get_user_msgid("ScreenShake"), {0, 0, 0}, id);
	write_short(floatround(4096.0 * seconds, floatround_round));
	write_short(floatround(4096.0 * seconds, floatround_round));
	write_short(1<<13);
	message_end( );
}

stock FadeScreen(id, const Float:seconds, const red, const green, const blue, const alpha)
{      
	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, 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( );
}
stock valid_message(const iMessage[])
{
	if(iMessage[0] == '/' || iMessage[0] == '@' || iMessage[0] == '@' && iMessage[1] == '@' || iMessage[0] == '@' && iMessage[1] == '@' && iMessage[2] == '@' || !strlen(iMessage))
	{
		return false;
	}
	
	return true;
}


Nume: Base Builder Game Mod: Frags Level
Versiune: 0.0.8
Link oficial:

Instalare:
1. Fisierul nume_plugin.sma il puneti in addons/amxmodx/scripting
2. Fisierul nume_plugin.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

nume_plugin.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
  • GiveTime - In cat timp de la inceperea rundei sa dea itemele .. (default: 30)
    GameNameOn - Schimba Game Name-ul (default: 1) [1 ON / 0 OFF]
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator): -

Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • /lvl - afiseaza levelul
    say - afiseaza textul cu prefix in fata ([LVL: %d] - unde %d reprezinta levelul)
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- HamSandWich
- nVault
- Fun

Imagini:
| Afiseaza codul
Image
----------------------------------------------------------------------------
Image
----------------------------------------------------------------------------
Image
----------------------------------------------------------------------------
Image
----------------------------------------------------------------------------
Image
Change Log

Code: Select all

0.0.1 -> Lansarea [Versiune Publica]
0.0.2 -> Adaugarea de iteme in plugin (abilitati) [Versiune Publica]
0.0.3 -> Schimbarea CoolDownului itemelor din PlayerSpawn in log eventul New Round [Versiune Publica]
0.0.4 -> Adaugarea de native [Versiune Privata]
0.0.5 -> Adaugarea comenzilor amx_give_frags / amx_take_frags ... Adaugarea schimbarii numelui game modului (prin cvar 1 On / 0 OFF) [Versiune Publica]
0.0.6 -> Fixare buguri [Versiunea Publica]
0.0.7 -> Optimizare Cod ... [Versiune Publica]
0.0.8 -> Fixare bug nVault save ... Optimizare cod ... Fixare buguri minore & majore (si cel care dadea index out of bounds la level maxim) ... [Versiune publica]
Last edited by GhosT *** on 11 May 2014, 09:50, edited 24 times in total.
Reason: Updated 0.0.8
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2808
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 230 times
Been thanked: 128 times
Contact:

07 Mar 2014, 08:08

PLUGIN_NAME[] = "Base Builder Game Mod: Frags Level Mod",
PLUGIN_VERS[] = "0.0.1",
PLUGIN_AUTH[] = "GhosT ***";
Sti ca mananca din memoria serverului, nu?
Foloseste #define.
In rest, GJ pentru plugin. ;)
Contact: Activitate scazuta.
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

07 Mar 2014, 12:16

DaNNe. wrote:
PLUGIN_NAME[] = "Base Builder Game Mod: Frags Level Mod",
PLUGIN_VERS[] = "0.0.1",
PLUGIN_AUTH[] = "GhosT ***";
Sti ca mananca din memoria serverului, nu?
Foloseste #define.
In rest, GJ pentru plugin. ;)
DaNNe nu mai vorbi aiurea, ai vazut si tu reply asta pe la Kronos #GG si deacuma faci observatie, macar stii cita memorie maninca, 30 bits, nici 1kb macar, lasa sa foloseasca cum vrea, dar cand faci varibile alea nu maninca din memorie? [-(
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

07 Mar 2014, 12:49

DaNNe. wrote:
PLUGIN_NAME[] = "Base Builder Game Mod: Frags Level Mod",
PLUGIN_VERS[] = "0.0.1",
PLUGIN_AUTH[] = "GhosT ***";
Sti ca mananca din memoria serverului, nu?
Foloseste #define.
In rest, GJ pentru plugin. ;)
Cum a zis si adventx :))

Nu imi place cum arata cu #define
User avatar
Chris Duskblade
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 2785
Joined: 18 Jun 2013, 15:46
Detinator Steam: Da
Reputatie: Fost super moderator
Nume anterior: Cristinel.
Utilizator neserios (tepar)
Location: Timișoara
Has thanked: 62 times
Been thanked: 15 times
Contact:

07 Mar 2014, 13:38

Foarte bun acest lvl mod , daca poti face asta sa il optimizezi si pentru furien dar sa aiba si puteri la furien / anti-furien + sa aiba si furienii si anti furienii clase ! ar fi foarte bun !
Last edited by GhosT *** on 07 Mar 2014, 15:02, edited 1 time in total.
Reason: O sa vin si cu un Game Mod pentu furien cand o sa am timp .
User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

07 Mar 2014, 14:57

Crisstinell wrote:Foarte bun acest lvl mod , daca poti face asta sa il optimizezi si pentru furien dar sa aiba si puteri la furien / anti-furien + sa aiba si furienii si anti furienii clase ! ar fi foarte bun !
Nu inteleg asa oameni, daca scrie negru pe alb ca este pentru BB de ce dq ceri sa ti-l faca pentru furien?
Last edited by GhosT *** on 07 Mar 2014, 15:02, edited 1 time in total.
Reason: Lasa-i sa faca +1 ;))
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

07 Mar 2014, 16:59

Updated 0.0.2

Change Log

Code: Select all

0.0.1 -> Lansarea
0.0.2 -> Adaugarea de iteme in plugin (abilitati)
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2447
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: 255 times
Been thanked: 281 times
Contact:

07 Mar 2014, 17:02

Compara versiunea ta cu cea a lui cryuff( HNS - Cred ca stii la ce ma refer ) !
„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ș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

07 Mar 2014, 17:12

The YONTU wrote:Compara versiunea ta cu cea a lui cryuff( HNS - Cred ca stii la ce ma refer ) !
Ce anume sa compar ? Stii ce seamana ? Modu in care se da level up .. Si cum ai vrea sa dau level up in alt mod fara a bugui useru cand face peste limita de levele ? =D>

EDIT: Updated 0.0.3
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2447
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: 255 times
Been thanked: 281 times
Contact:

07 Mar 2014, 19:46

Ma refer ca tu ai copiat liniile din pluginul lui cryuff...
Si pune taskul asta la event_DeatMsg( )

Code: Select all

set_task(get_pcvar_float(GiveTime) + 2.0, "PlayerItems", Jucator[i]); // Timpul corect pentru taskul de  
Adica
| Afiseaza codul
public DeathMsg()
{
	new iAttacker	= read_data(1);
	new iVictim	= read_data(2);
	
	if(iAttacker == iVictim)
	{
		if(PlayerFrags[iAttacker] >= 1)
			PlayerFrags[iAttacker] -= 1;
	}
		
	else if(iAttacker != iVictim)
		PlayerFrags[iAttacker]++;
		
	if(PlayerLevel[iAttacker] < MAX_LEVELS && PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
	{
		while(PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
			PlayerLevel[iAttacker]++;
			
			set_task(get_pcvar_float(GiveTime) + 2.0, "PlayerItems", Jucator); // Timpul corect pentru taskul de

		ColorChat(iAttacker, "^x04%s^x01 Ai trecut la^x04 levelul^x03 %d^x01 !", szTag, PlayerLevel[iAttacker]);
		
		ShakeScreen(iAttacker, 2.0);
		FadeScreen(iAttacker, 2.0, 0, 15, 200, 200);
	}
	if((PlayerLevel[iVictim] <= MAX_LEVELS && PlayerLevel[iVictim] > 1) && PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim]] - 1)
	{
		while(PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim]] - 1)
			PlayerLevel[iVictim]--;
			
		ColorChat(iVictim, "^x04%s^x01 Ai pierdut^x04 un level^x03 din lipsa de fraguri^x01 !", szTag);
		
		ShakeScreen(iVictim, 2.0);
		FadeScreen(iVictim, 2.0, 200, 15, 0, 200);
	}
	
	return PLUGIN_CONTINUE;
}
Last edited by GhosT *** on 08 Mar 2014, 08:23, edited 1 time in total.
Reason: Sa mor daca stiu de acest task .. Credeam ca te referi la modu' cum da pluginul level up .. Si ce e asa greu sa faci un task :|
„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ș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
User avatar
Alyn^H3k3r
Membru, skill 0
Membru, skill 0
Posts: 94
Joined: 26 Nov 2013, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Location: Galati
Has thanked: 14 times
Been thanked: 2 times
Contact:

07 Mar 2014, 20:47

Se "mananca" cu ghostchat?
Adica merg amundoua sau va trebui dezactivat daca bag acest plugin?
Last edited by GhosT *** on 08 Mar 2014, 08:24, edited 1 time in total.
Reason: Da .. Din pacate acest plugin se cam bate cu ghost chat, rang admin chat sau green admin chat (sau alte pluginuri care schimba scrisul in chat) .
Ajut la modificarea/creearea de addons-uri/pluginuri CS1.6 de orice mod, ajutorul meu nu consta in nimic, o fac din pura placere!

ContacT:
Skype: novuslink.h3k3r
Messenger: novuslink.h3k3r
E-mail: novuslink.h3k3r@yahoo.com

User avatar
Adventx
Membru, skill +4
Membru, skill +4
Posts: 1785
Joined: 17 Sep 2013, 20:44
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 125 times
Been thanked: 142 times
Contact:

07 Mar 2014, 22:07

The YONTU wrote:Ma refer ca tu ai copiat liniile din pluginul lui cryuff...
Si pune taskul asta la event_DeatMsg( )

Code: Select all

set_task(get_pcvar_float(GiveTime) + 2.0, "PlayerItems", Jucator[i]); // Timpul corect pentru taskul de  
Adica
| Afiseaza codul
public DeathMsg()
{
	new iAttacker	= read_data(1);
	new iVictim	= read_data(2);
	
	if(iAttacker == iVictim)
	{
		if(PlayerFrags[iAttacker] >= 1)
			PlayerFrags[iAttacker] -= 1;
	}
		
	else if(iAttacker != iVictim)
		PlayerFrags[iAttacker]++;
		
	if(PlayerLevel[iAttacker] < MAX_LEVELS && PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
	{
		while(PlayerFrags[iAttacker] >= Levels[PlayerLevel[iAttacker]])
			PlayerLevel[iAttacker]++;
			
			set_task(get_pcvar_float(GiveTime) + 2.0, "PlayerItems", Jucator); // Timpul corect pentru taskul de

		ColorChat(iAttacker, "^x04%s^x01 Ai trecut la^x04 levelul^x03 %d^x01 !", szTag, PlayerLevel[iAttacker]);
		
		ShakeScreen(iAttacker, 2.0);
		FadeScreen(iAttacker, 2.0, 0, 15, 200, 200);
	}
	if((PlayerLevel[iVictim] <= MAX_LEVELS && PlayerLevel[iVictim] > 1) && PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim]] - 1)
	{
		while(PlayerFrags[iVictim] < Levels[PlayerLevel[iVictim]] - 1)
			PlayerLevel[iVictim]--;
			
		ColorChat(iVictim, "^x04%s^x01 Ai pierdut^x04 un level^x03 din lipsa de fraguri^x01 !", szTag);
		
		ShakeScreen(iVictim, 2.0);
		FadeScreen(iVictim, 2.0, 200, 15, 0, 200);
	}
	
	return PLUGIN_CONTINUE;
}

YONTU nu mai fa observatii ca a copiat, zi tu alta metoda daca stii! :|
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests