Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

Przeróbka VIPa na PB Moda

Modyfikacja

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
2 odpowiedzi w tym temacie

#1 cajmert

    Zaawansowany

  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:87
  • Imię:Dawid
  • Lokalizacja:Katowice
Offline

Napisano 08.12.2011 17:07

Witam
Z nudów przerabiałem vipa Miśka, który napisał kiedyś to, i wszystko ładnie zrobiłem co chciałem ale mam problem, a mianowicie nie daje mi super markera i deffa dla vipa
Miałbym prośbę, czj ktoś może przerobić to tak by dawało Super Marker (p90) deffa i HE co runde, i jak wrzucilem na serwa to postacie co maja vipa to kurde sa przeźroczyści troszku ;d usunac to jak mozna
O to .sma
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>



new const gPluginName[] = "V.i.P PB";
new const gPluginVersion[] = "1.0";
new const gPluginAuthor[] = "MisieQ";

/*
	Podziękowania:
	Sn!ff3r(Seba) - za plugin Advanced Bullet Damage
	Ludzią z AlliedMods - za status VIP w scoreboard oraz za kilka stockow <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/wink.png' class='bbc_emoticon' alt=';)' />
	AMXX.pl - za dokumentacje <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/tongue.png' class='bbc_emoticon' alt=':P' />
	Skromny - za pomysł na V.i.P <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/smile.png' class='bbc_emoticon' alt=':)' />
	cajmert - za pomysł z dodaniem listy V.i.P jak rowniez motd z informacjami o nim <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/wink.png' class='bbc_emoticon' alt=';)' />
	Edycja na potrzeby FragsHunters.Pl przez cajmerta
*/

/* -=[ Dodatkowa Konfiguracja ]=- */

/* -=[ Flaga V.i.P ] =- */
#define VIP ADMIN_LEVEL_H

/* -=[ Informacje na Temat Wlacz / wyłącz ]=-
*
* Aby wylaczyc dana opcje dodaje przed
* #define znak //
* aby wygladalo to tak
* //#define
* aby ja ponownie wlaczyc po prostu usun te znaczki
*/

/* -=[ Podwojny Skok - Wlacz / wyłącz ]=- */
//#define PODWOJNY_SKOK
/* -=[ Advanced Bullet Damage - Wlacz / wyłącz ]=- */
#define ADVENCED_BULLET_DAMAGE
/* -=[ Status V.i.P  w ScoreBoard - Wlacz / wyłącz ]=- */
#define STATUS_VIP
/* -=[ Dodatkowe HP za zabicie - Wlacz / wyłącz ]=- */
//#define DODATKOWE_HP
/* -=[ Ciche chodzenie - Wlacz / wyłącz ]=- */
//#define CICHE CHODZENIE
/* -=[ Modele V.i.P - Wlacz / wyłącz ]=- */
//#define MODELE_VIP
/* -=[ Powitanie V.i.P - Wlacz / wyłącz ]=- */
#define POWITANIE_VIP
/* -=[ Dodatki V.i.P - Wlacz / wyłącz ]=- */
#define DODATKI_VIP
/* -=[ MOTD z informacja o V.i.P - Wlacz / wyłącz ]=- */
#define INFO_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P - Wlacz / wyłącz ]=- */
#define LISTA_VIP

/* -=[ Dodatkowa Konfiguracja ]=- */

/* -=[ Skoki ] =- */
#if defined PODWOJNY_SKOK
new bool:moze_skoczyc[33];
#endif

#if defined ADVENCED_BULLET_DAMAGE
/* -=[ BulletDamage V.i.P ]=- */
new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2
#endif

#if defined DODATKOWE_HP
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
new health_add, health_hs_add, health_max, nKiller, nKiller_hp, nHp_add, nHp_max
#endif

#if defined CICHE CHODZENIE
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
#define STANDARDTIMESTEPSOUND 400
new bool:g_silent[33]
#endif

#if defined LISTA_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P */
new gMaxPlayers, gMSGSayText;
static const COLOR[] = "^x04" // ^x01 - Info wyswietlane jest na zolto | ^x03 - Info wyswietlane jest na zielono | ^x04 - Info wyswietlane jest na kolor teamu (czerwono - TT / niebiesko - CT)
#endif

public plugin_init()
{
	register_plugin(gPluginName, gPluginVersion, gPluginAuthor)
  
	#if defined STATUS_VIP
	/* -=[ Status V.i.P w Tabeli ]=- */
	register_message(get_user_msgid("ScoreAttrib"), "msgScoreAttrib");
	#endif
  
	#if defined PODWOJNY_SKOK
	/* -=[ Podwojny Skok V.i.P ]=- */
	register_forward(FM_CmdStart, "CmdStart");
	#endif
  
	#if defined DODATKI_VIP
	/* -=[ Dodatki V.i.P ]=- */
	RegisterHam(Ham_Spawn, "player", "fwSpawn", 1);  
	#endif
  
	#if defined ADVENCED_BULLET_DAMAGE
	/* -=[ BulletDamage V.i.P ]=- */
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")  
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	g_hudmsg1 = CreateHudSyncObj()  
	g_hudmsg2 = CreateHudSyncObj()
	g_type = register_cvar("vip_bulletdamage","1")
	g_recieved = register_cvar("vip_bulletdamage_recieved","1")  
	#endif
  
	#if defined DODATKOWE_HP
	/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
	register_event("DeathMsg", "hook_death", "a", "1>0")
	health_add = register_cvar("vip_hp", "20")
	health_hs_add = register_cvar("vip_hp_hs", "30")
	health_max = register_cvar("vip_max_hp", "100")
	#endif
  
	#if defined CICHE CHODZENIE
	/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
	register_forward(FM_PlayerPreThink, "forward_player_prethink")
	#endif
  
	#if defined INFO_VIP
	/* -=[ MOTD z informacja o V.i.P ]=- */
	register_clcmd("say /vip","ViPInfo")
	register_clcmd("say_team /vip","ViPInfo")
	#endif
  
	#if defined INFO_VIP
	/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
	register_clcmd("say /vips","ViPLista")
	register_clcmd("say_team /vips","ViPLista")
	gMaxPlayers = get_maxplayers();
	gMSGSayText = get_user_msgid("SayText")
	#endif
}

#if defined STATUS_VIP
/* -=[ Status V.i.P w Tabeli ]=- */
public msgScoreAttrib( const MsgId, const MsgType, const MsgDest )
{
	static id;
	id = get_msg_arg_int( 1 );
  
	if( ( get_user_flags( id ) & VIP ) && !get_msg_arg_int( 2 ))
	{
		set_msg_arg_int( 2, ARG_BYTE, ( 1 << 2 ) );
	}
}  
/* -=[ Status V.i.P w Tabeli ]=- */
#endif

#if defined MODELE_VIP
/* -=[ Dodatkowe Modele V.i.P ]=- */
public plugin_precache()
{
	precache_model("models/player/ViP_ct/ViP_ct.mdl")
	precache_model("models/player/ViP_tt/ViP_tt.mdl")
  
	return PLUGIN_CONTINUE
}
/* -=[ Dodatkowe Modele V.i.P ]=- */
#endif

#if defined POWITANIE_VIP
/* -=[ Info o wchodzeniu gracza V.i.P ]=- */
public client_putinserver(id)
{
	new name[32];
	get_user_name(id, name, 31)
	if(get_user_flags(id) & VIP)
	{
		set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)
		show_hudmessage(0, "VIP  %s wszedl na serwer", name)
	}
	return PLUGIN_CONTINUE
}

public client_connect(id)
{
	new name[32];
	get_user_name(id, name, 31)
	if(get_user_flags(id) & VIP)
	{
		set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)
		show_hudmessage(0, "VIP  %s wszedl na serwer", name)
	}
	return PLUGIN_CONTINUE
}
/* -=[ Info o wchodzeniu gracza V.i.P ]=- */
#endif

#if defined PODWOJNY_SKOK
/* -=[ Podwojny Skok V.i.P ]=- */
public CmdStart(id, uc_handle)
{
	if ( !is_user_alive(id) ) return HAM_IGNORED;
  
	new flags = pev(id, pev_flags);
  
	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && moze_skoczyc[id] && (get_user_flags(id) & VIP))
	{
		moze_skoczyc[id] = false;
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id, pev_velocity,velocity);
	}
	else if(flags & FL_ONGROUND)
	{
		moze_skoczyc[id] = true;
	}
  
	return HAM_IGNORED;
}
/* -=[ Podwojny Skok V.i.P ]=- */
#endif

#if defined ADVENCED_BULLET_DAMAGE
/* -=[ BulletDamage V.i.P ]=- */
public on_new_round(id)
{
	g_enabled = get_pcvar_num(g_type)
	if(get_pcvar_num(g_recieved) && get_user_flags(id) & VIP)
	{
		g_showrecieved = true  
	}
}

public on_damage(id)
{
	if(g_enabled)
	{	  
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)	  
		if(g_showrecieved)
		{		  
			set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
			ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)	  
		}
		if(is_user_connected(attacker) && get_user_flags(attacker) & VIP)
		{
			switch(g_enabled)
			{
				case 1:
				{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)  
				}
				case 2:
				{
					if(fm_is_ent_visible(attacker,id))// && get_user_flags(attacker) & VIP)
					{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)			  
					}
				}
			}
		}
	}
	return PLUGIN_CONTINUE
}
/* -=[ BulletDamage V.i.P ]=- */
#endif

#if defined DODATKOWE_HP
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
public hook_death()
{
	nKiller = read_data(1)
  
	if ( (read_data(3) == 1) && (read_data(5) == 0) )
	{
		nHp_add = get_pcvar_num (health_hs_add)
	}
	else
	{
		nHp_add = get_pcvar_num (health_add)
	}
	nHp_max = get_pcvar_num (health_max)
	if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
		return;
  
	nKiller_hp = get_user_health(nKiller)
	nKiller_hp += nHp_add
	if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
	fm_set_user_health(nKiller, nKiller_hp)
	set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
	show_hudmessage(nKiller, "Dostales +%d hp", nHp_add)
	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
	write_short(1<<10)
	write_short(1<<10)
	write_short(0x0000)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	write_byte(75)
	message_end()
}
/* -=[ Dodatkowe HP za Zabicie & HS V.i.P ]=- */
#endif

#if defined DODATKI_VIP
/* -=[ Dodatki V.i.P ]=- */
public fwSpawn(id)
{
	if ( !is_user_alive(id) ) return HAM_IGNORED;
  
	#if defined MODELE_VIP
	new CsTeams:userTeam = cs_get_user_team(id)
	#endif
  
	if(get_user_flags(id) & VIP)
	{
		fm_give_item(id, "weapon_p90");
		fm_give_item(id, "weapon_defuser");
		client_print(id, print_chat, "Modyfikacja VIP'a dla FragsHunters.Pl przez Cajmerta!");
		fm_set_user_health(id, 100)
		fm_set_user_gravity(id, 0.55);
		moze_skoczyc[id] = true;
		#if defined CICHE CHODZENIE
		fm_set_user_footsteps(id, 1);
		#endif
		fm_set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, 160);
		#if defined MODELE_VIP
		if (userTeam == CS_TEAM_T)
		{
			cs_set_user_model(id, "ViP_tt")
		}
		else if(userTeam == CS_TEAM_CT)
		{
			cs_set_user_model(id, "ViP_ct")
		}
		else
		{
			cs_reset_user_model(id)
		}
		#endif
	}
	return HAM_IGNORED;
}
/* -=[ Dodatki V.i.P ]=- */
#endif

#if defined CICHE CHODZENIE
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
public forward_player_prethink(index)
{
	if (g_silent[index])
	{
		set_pev(index, pev_flTimeStepSound, 999)
	}
}

public client_disconnect(index)
{
	g_silent[index] = false
}

stock fm_set_user_footsteps(index, set = 1)
{
	if (set)
	{			  
		set_pev(index, pev_flTimeStepSound, 999)
		g_silent[index] = true
	}
	else
	{
		set_pev(index, pev_flTimeStepSound, STANDARDTIMESTEPSOUND)
		g_silent[index] = false
	}
	return 1
}

stock fm_get_user_footsteps(index)
{
	return g_silent[index]
}
/* -=[ Ciche Chodzenie V.i.P #2 ]=- */
#endif

#if defined INFO_VIP
/* -=[ MOTD z informacja o V.i.P ]=- */
public ViPInfo(id)
{
	show_motd(id, "ViP.txt")
}
/* -=[ MOTD z informacja o V.i.P ]=- */
#endif

#if defined LISTA_VIP
/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
public ViPLista(id)
{
	new nazwy_vip[33][32]
	new message[256]
	new count, x, len
  
	for(new i = 1 ; i <= gMaxPlayers ; i++)
	{
		if(is_user_connected(i))
		{
			if(get_user_flags(i) & VIP)
			{
				get_user_name(i, nazwy_vip[count++], 31)  
			}
		}
	}
  
	len = format(message, 255, "%s ViP'y ONLINE: ",COLOR)
	if(count > 0)
	{
		for(x = 0 ; x < count ; x++)
		{
			len += format(message[len], 255-len, "%s%s%s ", COLOR, nazwy_vip[x], x < (count-1) ? "^x01, ":"")
			if(len > 96 )
			{
				print_message(id, message)
				len = format(message, 255, "%s ",COLOR)
			}
		}
		print_message(id, message)
	}
	else
	{
		len += format(message[len], 255-len, "Brak ViP'ow Online")
		print_message(id, message)
	}
	return PLUGIN_HANDLED;
}

print_message(id, msg[])
{
	message_begin(MSG_ONE, gMSGSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
/* -=[ Lista graczy ktorzy posiadaja status V.i.P ]=- */
#endif

Użytkownik cajmert edytował ten post 08.12.2011 17:11

  • +
  • -
  • 1

#2 Lelek

    Zaawansowany

  • Użytkownik

Reputacja: 22
Życzliwy

  • Postów:105
  • GG:
  • Imię:Adam
  • Lokalizacja:*
Offline

Napisano 08.12.2011 19:45

Pozbycie się przezroczystości poprzez usunięcie:
			    fm_set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransTexture, 160);


Tutaj natomiast podaję kod jak dać komuś na start to co prosiłeś:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Lelek"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_Spawn, "player", "spawn", 1);
}

public spawn(id)
{
fm_give_item(id, "item_thighpack");
fm_give_item(id, "weapon_p90");
fm_give_item(id, "ammo_57mm");
fm_give_item(id, "ammo_57mm");
fm_give_item(id, "weapon_hegranade");
}

  • +
  • -
  • 0

#3 cajmert

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:87
  • Imię:Dawid
  • Lokalizacja:Katowice
Offline

Napisano 09.12.2011 13:57

jakbys mogl dodac do tamtego pluginu to? :) bo nie chcę nic psuć ;d
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych