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
 

Wklejka fccein3ngpsg dodana przez Mr. Dziwny, 16.09.2012 00:40
Typ:



1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
#include <amxmodx>
#include <fakemeta_util>
#include <fakemeta>
#include <fun>
#include <codmod>
#include <hamsandwich>
#include <cstrike>
#define fm_get_user_money(%1) get_pdata_int(%1, MONEY_F)
#define THE_VIP ADMIN_USER
 
 
#define SCOREATTRIB_VIP (1 << 2)
#define SCOREATTRIB_DEAD (1 << 0) 
#define MONEY_F 115
new cod_vexp, cod_vmoney, cod_vkillhp, cod_vgranaty, cod_vhsxp, cod_vhshp, cod_vhsmoney, cod_vinfo;
new cod_vwyt, cod_vint, cod_vkon, cod_vhp;
new g_MsgScoreAttrib = 0;
new nick_gracza[32]
 
/* STOKI */
 
stock fm_set_user_money(index, money, flash = 1)
{
	set_pdata_int(index, MONEY_F, money)
	message_begin(MSG_ONE, get_user_msgid("Money"), _, index);
	write_long(money);
	write_byte(flash ? 1 : 0);
	message_end();
}
 
/* END OF STOKI */
 
public plugin_init() 
{
	register_plugin("ProCodVIP", "1.0", "0x?");
	g_MsgScoreAttrib = get_user_msgid("ScoreAttrib");
	register_message(g_MsgScoreAttrib, "messageScoreAttrib");
	RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
 
 
	/*================CVARY======================*/
 
	//Dodatkowa ilosc doswiadczenia za zabicie innego gracza:
	cod_vexp = register_cvar("cod_vexp","6000");
	//Dodatkowa ilosc pieniedzy za zabicie innego gracza:
	cod_vmoney = register_cvar("cod_vmoney","200");
	//Dodatkowa ilosc zycia za zabicie innego gracza:
	cod_vkillhp = register_cvar("cod_vkillhp","30");
	//Dodatkowa kondycja gracza:
	cod_vkon = register_cvar("cod_vkon","50");
	//Dodatkowa inteligecja gracza:
	cod_vint = register_cvar("cod_vint","50");
	//Dodatkowa wytrzymalosc gracza:
	cod_vwyt = register_cvar("cod_vwyt","50");
	//Dodatkowe zycie gracza:
	cod_vhp = register_cvar("cod_vhp","50");
	//VIP ma dostawac wszystkie granaty w ilosci 2 (2he, 2flash, 2smoke) 0nie 1tak
	cod_vgranaty = register_cvar("cod_vgranaty","1");
	//Dodatkowa ilosc doswiadczenia za zabicie innego gracza headshootem:
	cod_vhsxp = register_cvar("cod_vhsxp","6500");
	//Dodatkowa ilosc zycia za zabicie innego gracza headshootem:
	cod_vhshp = register_cvar("cod_vhshp","250");
	//Dodatkowa ilosc kasy za zabicie innego gracza headshootem:
	cod_vhsmoney = register_cvar("cod_vhsmoney","35");
	//Informacja (Na serwer wszedl VIP (nick) ) przy wejsciu gracza, 0nie 1tak
	cod_vinfo = register_cvar("cod_vinfo","1");
 
	/*==============KONIEC CVARÓW===============*/
}
public fwHamPlayerSpawnPost(id){
 
	if (is_user_connected(id) && is_user_alive(id) && get_user_flags(id) & THE_VIP) 
	{
		new granaty = get_pcvar_num(cod_vgranaty)		
		if (granaty == 1)
		{
			cod_give_weapon(id, CSW_HEGRENADE);
			cod_give_weapon(id, CSW_FLASHBANG);
			cod_give_weapon(id, CSW_FLASHBANG);
			cod_give_weapon(id, CSW_SMOKEGRENADE);
			cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2);
			cs_set_user_bpammo(id, CSW_HEGRENADE, 2);
		}
		new hp = get_pcvar_num(cod_vhp);
		new bonus = cod_get_user_health(id, 0, 0, 1);
		if(is_user_alive(id) && bonus < hp)
		{
			cod_set_user_bonus_health(id, cod_get_user_health(id)+ get_pcvar_num(cod_vhp));
			cod_set_user_bonus_trim(id, cod_get_user_trim(id) + get_pcvar_num(cod_vkon));
			cod_set_user_bonus_intelligence(id, cod_get_user_intelligence(id) + get_pcvar_num(cod_vint));
			cod_set_user_bonus_stamina(id, cod_get_user_stamina(id) + get_pcvar_num(cod_vwyt));
		}	
	}
}
public client_death(killer, victim, wpnindex, hitplace, TK)
{ 	
	if (is_user_alive(killer) && (get_user_flags(killer) & THE_VIP))
	{		
		if(hitplace == HIT_HEAD)
		{
			new hs_xp = get_pcvar_num(cod_vhsxp)
			new hs_hp = get_pcvar_num(cod_vhshp)
			new hs_money = get_pcvar_num(cod_vhsmoney)
			cod_set_user_xp(killer, cod_get_user_xp(killer) + hs_xp);
			fm_set_user_money(killer, fm_get_user_money(killer) + hs_money, 1)
			set_user_health(killer, get_user_health(killer) + hs_hp);
			new sync = CreateHudSyncObj();
			set_hudmessage(255, 212, 0, 0.53, 0.33, 1, 6.0, 4.0);
			ShowSyncHudMsg(killer, sync, "VIP: ZA HS DOSTALES +%i XP", hs_xp);
		}	
		else
		{	
			cod_set_user_xp(killer, cod_get_user_xp(killer) + get_pcvar_num(cod_vexp));	
			fm_set_user_money(killer, fm_get_user_money(killer) + get_pcvar_num(cod_vmoney), 1);
			set_user_health(killer, get_user_health(killer) + get_pcvar_num(cod_vkillhp));
 
			new add_exp = get_pcvar_num(cod_vexp);
			new sync = CreateHudSyncObj();
			set_hudmessage(255, 212, 0, 0.50, 0.33, 1, 6.0, 4.0);
			ShowSyncHudMsg(killer, sync, "VIP: ZA KILL DOSTALES +%i XP", add_exp);
		}
	}
 
}
public client_disconnect(id)
{
	new info_vip_con = get_pcvar_num(cod_vinfo)
	if(info_vip_con == 1)
	{
		if (get_user_flags(id) & THE_VIP) 
		{
			get_user_name(id, nick_gracza, 32);
			set_hudmessage(255, 0, 0, 0.04, 0.28, 0, 6.0, 12.0)
			show_hudmessage(0, "Serwer opuscil wlasnie nasz VIP (%s)", nick_gracza)
		}}
}
public client_authorized(id)
{
	new info_vip_con = get_pcvar_num(cod_vinfo)	
	if(info_vip_con == 1)
	{
		if (get_user_flags(id) & THE_VIP) 
		{
			get_user_name(id, nick_gracza, 32);
			set_hudmessage(255, 0, 0, 0.04, 0.28, 0, 6.0, 12.0)
			show_hudmessage(0, "Na serwer wchodzi VIP! (%s)", nick_gracza);}}
		}
public messageScoreAttrib(iMsgID, iDest, iReceiver) 
{   
	new iPlayer = get_msg_arg_int(1);
 
	if(is_user_connected(iPlayer) && (get_user_flags(iPlayer) & THE_VIP))   
	set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
 
}		
 

Dodanych wklejek: 4031
Powered By (Pav32) Pastebin © 2011