Skocz do zawartości

Welcome to Najlepsze serwery cs 1.6 Grajkownia.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Zdjęcie

Pomoc - plugin.

- - - - -

  • Zamknięty temat Ten temat jest zablokowany
2 odpowiedzi na ten temat

#1
Emilos

Emilos

    Nowy

  • Grajek
  • Pip
  • 4 postów
    • Time Online: 1s
Witajcie, jeżeli zły dział, proszę o przeniesienie.

Mam mały problem. Komplikuje plik .sma do pliku .amxx. Wyskakuje mi jakiś błąd, nie wiem co to jest za błąd.

Wyskakuje coś takiego :

/tmp/textRCZ7NS.sma(26) : fatal error 100: cannot read from file: "ColorChat"

Compilation aborted.
1 Error.

A plik .sma mam taki :
/*====================================================================================================
|																									|
| Changelog:																						 |
|																									|
| v1.1 - Dodano 10 poziomow + 10 rang, dodano Skill zycia oraz skoku.								|
| v1.2 - Dodano komendy dodawania XP																 |
| v1.3 - Dodano Skill czapki (1 czapka)															  |
| v1.4 - Dodano kolejne 10 poziomow + 10 rang. Dodano skill niewidzialnosci.						 |
| v1.5 - Dodano skill szybkosci, sklep, menu graczy, dodano informacje o graczu w HUD				|
| v1.6 - Dodano 5 czapek, poprawiono blad z HUD'em												   |
| v1.7 - Dodano poziomy + rangi - jest ich 41, dodano ostatni ze skilli - zlodziejstwo			   |
| v1.8 - Dodano mozliwosc resetu XP lub skilli													   |
| v1.9 - Dodano losowanie slowa za XP																|
| v2.0 - Dodano kolejne 10 poziomów i rang (jest ich teraz 50)									   |
| v2.1 - Dodano kolejne 10 poziomów i rang (jest ich teraz 60)									   |
| v2.2 - Dodano skill Fuksior, oraz "VIP'a"														  |
|																									|
| 4Fun XP Mod by Whisper - www.lajtownicy.xaa.pl														  |
|																									|
=====================================================================================================*/
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <amxmisc>
#include <nvault>
#include <ColorChat>
#include <fakemeta>
#include <fakemeta_util>
#include <Hamsandwich>
#include <engine>

#define MAXLEVEL 60
#define prefix "FunXP"
#define HUD_INFO 672
#define OZYW 704

new const LEVELS[60] = {
	
	100,  
	500,	
	1000,	
	2000,	
	3000,	
	5000,	
	6500,  
	7800,  
	9000,  
	10000,	
	12000,	
	14000,	
	14800,	
	15950,	
	17300,  
	20000,	
	22600,	
	24000,	
	24900,	
	26700,
	27200,
	29000,
	31000,
	31900,
	32600,
	33450,
	34950,
	36000,
	37000,  
	40000,
	42000,
	45000,
	46800,
	48000,
	50000,
	52350,
	54500,
	57000,
	60000,
	63000, //40
	65000, //41
	68000, //42
	73000, //43
	75400, //44
	80000, //45
	86700, //46
	89000, //47
	93000, //48
	96000, //49
	110000, //50
	120000, //51
	140000, //52
	170000, //53
	200000, //54
	220000, //55
	230000, //56
	250000, //57
	280000, //58
	300000, //59
	350000,
};

new const RANGI[60][] = {
	
	"Balas",
	"Synek",
	"Farmaceuta",
	"Kanar",
	"Pan Wladza",
	"Smieciarz",
	"Palacz",
	"Majster",
	"Chory",
	"Bzibziak",
	"Waldek",
	"Chlop z Mazur",
	"Szczymryj",
	"Grabarz",
	"Elektryk",
	"Moher",
	"Fonfel",
	"Kwiatuszek",
	"Baska Kwarc",
	"Kazek",
	"Robol",
	"Frajerzyna",
	"Alfons",
	"Gwiazdka",
	"Moczymorda",
	"Pokemon",
	"Security",
	"Szef",
	"Kusibab",
	"Trajtitel",
	"Czlowiek Guma",
	"Mieciu z Zarzecza",
	"Swinia",
	"Placek",
	"Kwasigroch",
	"[cenzura]eba",
	"Kurczymorda",
	"Minetu",
	"Bubel",
	"PRO Gejmer", //40
	"Wsiurek", //41
	"Sroczmen", //42
	"Bambus", //43
	"Wujek Timon", //44
	"Kurdziel", //45
	"Fan KzB", //46
	"Kapitan Dymano", //47
	"Nietryb", //48
	"Gargamel", //49
	"Brambor", //50
	"Kotlet", //51
	"Homo Nie-Wiadomo", //52
	"Klasyk", //53
	"Kij", //54
	"Rolnik", //55
	"Walikuc", //56
	"Gwintownica", //57
	"Meloman", //58
	"Alpejska Krowa", //59
	"Master of The Game" //60
	
};

new const win_sound[] = "win_sound.wav"
new const draw_sound[] = "draw_sound.wav"

/*--------===== ZMIENNE GLOBALNE =====-------*/
new g_Vault,xp_kill,xp_hs,xp_pv,xp_uv;
new PlayerXP[33],PlayerLevel[33],g_Enable,g_bwEnt[33];
new skill[33],skillhp[33],skillg[33],skilln[33],skillcz[33],whisper[33],skillr[33],skillk[33], skillo[33];
new Odliczanie[33];
new SyncHudObj;

new dir[128],slowo[128]
new ile_xp,ile;
new bool:wpisywac = false;

new pcvar_max_xp,pcvar_min_xp,pcvar_min_time,pcvar_max_time,pcvar_time;

public plugin_init()
{
	/*--------===== REJERSTRACJA PLUGINU =====-------*/
	
	register_plugin("XPFun", "2.2", "Whisper")
	
	
	
	/*--------===== CVARY =====-------*/
	
	register_cvar("fun_kill", "5")
	register_cvar("fun_hs_bonus","5")
	register_cvar("fun_p_vip_bonus","5")
	register_cvar("fun_u_vip_bonus","10")
	
	g_Enable = register_cvar("fun_czapki", "1");
	
	
	/*--------===== ZMIENNE GLOBALNE =====-------*/
	
	xp_kill	 =	 get_cvar_num("fun_kill")
	xp_hs		 =	 get_cvar_num("fun_hs_bonus")
	xp_pv		 =	 get_cvar_num("fun_p_vip_bonus")
	xp_uv		 =	 get_cvar_num("fun_u_vip_bonus")
	g_Vault	 =	 nvault_open("fun_xp_mod");
	pcvar_max_xp = register_cvar("fun_max_xp","300")
	pcvar_min_xp = register_cvar("fun_min_xp","100")
	pcvar_min_time = register_cvar("fun_min_time","60.0")
	pcvar_max_time = register_cvar("fun_max_time","120.0")
	pcvar_time = register_cvar("fun_time_write","7")
	
	/*--------===== FORWARDS =====-------*/

	register_forward(FM_PlayerPreThink, "Prethink");
	
	/*--------===== EVENTS =====-------*/
	
	RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1);
	register_event("DeathMsg", "eDeath", "a");
	register_event("DeathMsg", "Fuks", "a");
	register_logevent("EventRoundStart",2,"1=Round_Start");
	
	/*-------===== KOMENDY =====-------*/
	
	register_clcmd("say /xp", "xp_menu")
	register_clcmd("say /skill", "skill_menu")
	register_clcmd("say /sklep", "ShopMenu")
	
	register_clcmd("say","say_handle")
	register_clcmd("say_team","say_handle")
	
	/*------====== KOMENDY ADMINA ====-----*/
	
	register_concmd("amx_wez_xp", "cmd_take_exp", ADMIN_IMMUNITY, "<target> <amount>");  
	register_concmd("amx_daj_xp", "cmd_give_exp", ADMIN_IMMUNITY, "<target> <amount>");
	register_concmd("amx_daj_whisper", "cmd_give_whisper", ADMIN_IMMUNITY, "<target> <amount>");
	
	/*-----===== TASKI =====-----*/
	
	set_task(135.0, "mod_info", _, _, _, "b")
	set_task(random_float(get_pcvar_float(pcvar_min_time),get_pcvar_float(pcvar_max_time)),"event",666)
	
	/*----===== RESZTA =====----*/
	
	SyncHudObj = CreateHudSyncObj();
	
}
public mod_info()
{
	ColorChat(0, GREEN, "^x01Na serwerze dziala^x03 plugin XP Mod 4FUN (v2.0)^x01 by^x03 Whisper.");
	ColorChat(0, GREEN, "^x01Zapraszamy na^x03 www.lajtownicy.xaa.pl");
}
public eDeath() {
	new attacker = read_data( 1 );
	new ofiara = read_data( 2 );
	new headshot = read_data( 3 );
	
	if(ofiara != attacker && attacker != 0)
	{
		if(get_user_team(attacker) != get_user_team(ofiara))
		{
			PlayerXP[attacker] += xp_kill;
			client_cmd(attacker, "spk misc/whisper/kill")
			client_cmd(ofiara, "spk misc/kzb/dead")
			
			if(headshot)
			{
				PlayerXP[attacker] += xp_hs;
				ColorChat(attacker,GREEN,"[%s]^x01: Dostales ^x04%d^x01 XP za zabicie wroga + ^x04 %d^x01 XP za headshot.",prefix,xp_kill,xp_hs);	
			}
			else if(get_user_flags(attacker) & ADMIN_LEVEL_H)
			{
				PlayerXP[attacker] += xp_pv;
				ColorChat(attacker,GREEN,"[%s]^x01: [VIP Podstawowy]: +%d XP dla VIP'a.", prefix,xp_pv);
			}
			else if(get_user_flags(attacker) & ADMIN_LEVEL_G)
			{
				PlayerXP[attacker] += xp_pv;
				ColorChat(attacker,GREEN,"[%s]^x01: [VIP Ulepszony]: +%d XP dla VIP'a.", prefix,xp_uv);
			}	
			else
			{
				ColorChat(attacker,GREEN,"[%s]^x01: Dostales ^x04%d^x01 XP za zabicie wroga",prefix,xp_kill);
			}
		}
	}
	while(PlayerXP[attacker] >= LEVELS[PlayerLevel[attacker]])
	{
		PlayerLevel[attacker] += 1;
		skill[attacker] += 1;
		whisper[attacker] += 50;
		ColorChat(attacker,GREEN,"[%s]^x01: Gratulacje, wbiles poziom. Poziom:^x03 %d^x01, Masz teraz:^x03 %d^x01 punktow skilli oraz ^x03 %d^x01 whisperow.",prefix,PlayerLevel[attacker],skill[attacker], whisper[attacker]);
	}
}
public Fuks() {
	new id = read_data( 2 );
	
	if(skillo[id] >= 1)
	{
		new szansa
		szansa = random_num(1, 100)
		
		switch(szansa)
		{
			case 1..20:
			{
				set_task(0.2, "Wskrzes", id+OZYW);
				ColorChat(id, GREEN, "[FunXP]^x01 Zostales ozywiony przez twoj^x03 fuksior.")
			}
		}
	}
}	
public Wskrzes(id)
{
	id-=OZYW;
	ExecuteHamB(Ham_CS_RoundRespawn, id);
}	
public client_connect(id)
{
	LoadXp(id);
	
	remove_task(id+HUD_INFO);
	remove_task(id+OZYW);
	set_task(3.0, "PokazInformacje", id+HUD_INFO);
}
public client_disconnect(id)
{
	SaveXp(id);
	
	remove_task(id+HUD_INFO);
	remove_task(id+OZYW);
}
public SaveXp(id)
{
	new name[31];
	get_user_name(id, name, 31);
	
	new vaultkey[64], vaultdata[256];
	format(vaultkey, 63, "%s-Mod", name);
	format(vaultdata, 255, "%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#", PlayerXP[id], PlayerLevel[id],skill[id], skillhp[id], skillg[id], skilln[id], whisper[id], skillcz[id], skillr[id], skillk[id], skillo[id]);
	nvault_set(g_Vault, vaultkey, vaultdata);
	return PLUGIN_CONTINUE;
}
public LoadXp(id) {
	new name[31];
	get_user_name(id,name,31);
	
	new vaultkey[64], vaultdata[256];
	format(vaultkey, 63, "%s-Mod", name);
	format(vaultdata, 255, "%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#%i#", PlayerXP[id], PlayerLevel[id],skill[id], skillhp[id], skillg[id], skilln[id], whisper[id], skillcz[id], skillr[id], skillk[id], skillo[id]);
	nvault_get(g_Vault, vaultkey, vaultdata,255);
	
	replace_all(vaultdata, 255, "#", " ");
	
	new PlayerXP1[32], PlayerLevel1[32], skillx1[32], skillhpx1[32], skillgx1[32], skillnx1[32], whisperx1[32], skillczx1[32], skillrx1[32], skillkx1[32], skillox1[32];
	
	parse(vaultdata, PlayerXP1, 31, PlayerLevel1, 31, skillx1, 31, skillhpx1, 31, skillgx1, 31, skillnx1, 31, whisperx1, 31, skillczx1, 31, skillrx1, 31, skillkx1, 31, skillox1, 31);
	
	PlayerXP[id] = str_to_num(PlayerXP1);
	PlayerLevel[id] = str_to_num(PlayerLevel1);
	skill[id] = str_to_num(skillx1);
	skillhp[id] = str_to_num(skillhpx1);
	skillg[id] = str_to_num(skillgx1);
	skilln[id] = str_to_num(skillnx1);
	whisper[id] = str_to_num(whisperx1);
	skillcz[id] = str_to_num(skillczx1);
	skillr[id] = str_to_num(skillrx1);
	skillk[id] = str_to_num(skillkx1);
	skillo[id] = str_to_num(skillox1);
	return PLUGIN_CONTINUE;
}  
public skill_menu(id)
{
	new zyciem[128],skokm[128], swietlikm[128], skillmenu[128], skillczm[128], skillrm[128], skillkm[128], skillom[128];
	
	format(skillmenu,127,"\w[FunXP] Skille \r[\wPosiadasz \y%d \wskillow\r]", skill[id])
	format(zyciem,127,"\wSila Slonia \r[Wiecej HP] \r(\y%d/10\r)", skillhp[id])
	format(skokm,127,"\wSkok \r[Skaczesz wyzej] \r(\y%d/5\r)", skillg[id])
	format(swietlikm,127,"\wLampard \r[Szybciej biegasz] \r(\y%d/5\r)", skilln[id])
	format(skillczm,127,"\wCzapa \r[Losowa czapka] \r(\y%d/1\r)", skillcz[id])
	format(skillrm,127,"\wKamuflaz \r[Prawie jak rambo...] \r(\y%d/10\r)", skillr[id])
	format(skillkm,127,"\wZbroja \r[Wiecej AP] \r(\y%d/10\r)", skillk[id])
	format(skillom,127,"\wFuksior \r[Szansa na odrodzenie] \r(\y%d/5\r)", skillo[id])
	
	new menu = menu_create(skillmenu, "cbskill_menu")
	
	menu_additem(menu, zyciem, "1", 0)
	menu_additem(menu, skokm, "2", 0)
	menu_additem(menu, swietlikm, "3", 0)
	menu_additem(menu, skillrm, "4", 0)
	menu_additem(menu, skillczm, "5", 0)
	menu_additem(menu, skillkm, "6", 0)
	menu_additem(menu, skillom, "7", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, menu, 0)
}
public cbskill_menu(id, skill_menu  , item)
{
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(skill_menu, item, acces, data,5, iName, 63, callback)
	
	new klawisz = str_to_num(data)
	
	switch(klawisz)
	{
		case 1 :
		{
			if(skill[id] == 0) { // sprawdzamy czy posiada wolny skill
				ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
			}
			else
			{
				if(skillhp[id] >= 10) { // jesli gracz dodal 5 skilli do zycia to juz nie moze
					ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
				}
				else
				{
					skill[id] -= 1; // zabieramy wolny skill
					skillhp[id] += 1; // dodajemy skill zycia
					ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do zycia");
				}
			}
		}
		case 2:
		{
			if(skill[id] == 0) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
			}
			else
			{
				if(skillg[id] >= 5) {
					ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
				}
				else
				{
					skill[id] -= 1;
					skillg[id] += 1
					ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do skoku.");
				}
			}
		}
		case 3:
		{
			if(skill[id] == 0) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
			}
			else
			{
				if(skilln[id] >= 5) {
					ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
				}
				else
				{
					skill[id] -= 1;
					skilln[id] += 1
					ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do kondychy");
				}
			}
		}
		case 4:
		{
			if(skill[id] == 0) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
			}
			else
			{
				if(skillr[id] >= 10) {
					ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
				}
				else
				{
					skill[id] -= 1;
					skillr[id] += 1
					ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do niewidzialnosci");
				}
			}		
		}
		case 5:
		{
			if(skill[id] == 0) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
			}
			else
			{
				if(skillcz[id] >= 1) {
					ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
				}
				else
				{
					skill[id] -= 1;
					skillcz[id] += 1
					ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do czapek.");
				}
			}
		}
		case 6:
		{
			if(PlayerLevel[id] <= 25)
			{
				ColorChat(id, GREEN, "[FunXP]^x01 Skill dostepny od^x03 25^x01 poziomu.");
			}
			else
			{
				if(skill[id] == 0) {
					ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
				}
				else
				{
					if(skillk[id] >= 10) {
						ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
					}
					else
					{
						skill[id] -= 1;
						skillk[id] += 1
						ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do zbroji.");
					}
				}
			}
		}
		case 7:
		{
			if(PlayerLevel[id] <= 5)
			{
				ColorChat(id, GREEN, "[FunXP]^x01 Skill dostepny od^x03 5^x01 poziomu.");
			}
			else
			{
				if(skill[id] == 0) {
					ColorChat(id, GREEN, "[FunXP]^x01 Nie posiadasz wolnego punktu skilla");
				}
				else
				{
					if(skillo[id] >= 5) {
						ColorChat(id, GREEN, "[FunXP]^x01 Ten skill jest juz rozwiniety do maksimum");
					}
					else
					{
						skill[id] -= 1;
						skillo[id] += 1
						ColorChat(id, GREEN, "[FunXP]^x01 Dodales punkt skilla do fuksa.");
					}
				}
			}
		}
		
	}
}
public xp_menu(id)
{	
	new menu = menu_create("\wMenu \r[XP 4 FUN]:", "xp_menu_handle")
	
	menu_additem(menu, "\wOpis \r[Opis moda]", "1", 0)
	menu_additem(menu, "\wSklep \r[Whisper Shop]", "2", 0)
	menu_additem(menu, "\wSkille \r[Menu skillow]", "3", 0)
	menu_additem(menu, "\wReset - \ySkill \r[Resetuje punkty skilla]", "4", 0)
	menu_additem(menu, "\wReset - \yXP \r[Resetuje XP]", "5", 0)
	menu_additem(menu, "\wInformacje o graczach \y[Online]", "6", 0)
	menu_additem(menu, "\d[Autor: Whisper - edit : Emilos.]", "8", ADMIN_IMMUNITY)
	menu_additem(menu, "\d[Kontakt: www.lajtownicy.xaa.pl]", "9", ADMIN_IMMUNITY)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, menu, 0)
}
public xp_menu_handle(id, xp_menu  , item)
{
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(xp_menu, item, acces, data,5, iName, 63, callback)
	
	new klawisz = str_to_num(data)
	
	switch(klawisz)
	{
		case 1 :
		{
			show_motd(id, "/addons/amxmodx/data/index.html","Opis moda");
		}
		case 2:
		{
			ShopMenu(id);
		}
		case 3:
		{
			skill_menu(id);
			
		}
		case 4:
		{
			skill[id] = PlayerLevel[id];
			skillhp[id] = 0;
			skillg[id] = 0;
			skilln[id] = 0
			skillcz[id] = 0;
			skillr[id] = 0;
			skillk[id] = 0;
			
			ColorChat(id, GREEN, "[FunXP]^x01 Wlasnie dokonales resetu^x03 punktow.^x01 Masz teraz:^x03 %d^x01 skillow", skill[id]);
		}
		case 5:
		{
			PlayerLevel[id] = 0;
			PlayerXP[id] = 0;
			skill[id] = 0;
			skillhp[id] = 0;
			skillg[id] = 0;
			skilln[id] = 0
			skillcz[id] = 0;
			skillr[id] = 0;
			skillk[id] = 0;
			ColorChat(id, GREEN, "[FunXP]^x01 Wlasnie zresetowales poziom do zera. Graj od nowa jak z ciebie taki^x03 hardcore.")
		}
		case 6:
		{
			PlayersMenu(id);
		}		
	}
}
public ShopMenu(id)
{
	new shopm[128];
	format(shopm,127,"\wSklep \r[XP 4FUN] \r[\yWhispery: \w%d\r]", whisper[id])
	
	new menu = menu_create(shopm, "ShopHandle")
	
	menu_additem(menu, "\wLoteria XP \r[Los XP - 200 Whisperow]", "1", 0)
	menu_additem(menu, "\wPoweride \r[Padles? Powstan! - 70 Whisperow]", "2", 0)
	menu_additem(menu, "\wPunkt skilla \r[Dodatkowy skill - 300 Whisperow]", "3", 0)
	menu_additem(menu, "\wMotorynka \r[Wieksza predkosc - 40 Whisperow]", "4", 0)
	menu_additem(menu, "\w25 HP \r[20 Whisperow]", "5", 0)
	menu_additem(menu, "\wAK-47 \r[30 Whisperow]", "6", 0)
	menu_additem(menu, "\wM4A1 \r[30 Whisperow]", "7", 0)
	menu_additem(menu, "\wMP5 \r[20 Whisperow]", "8", 0)
	menu_additem(menu, "\wAWP \r[45 Whisperow]", "9", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, menu, 0)
	client_cmd(id, "spk misc/kzb/menu");
}
public ShopHandle(id, ShopMenu , item)
{
	new data[6], iName[64];
	new acces, callback
	menu_item_getinfo(ShopMenu, item, acces, data,5, iName, 63, callback);
	
	new klawisz = str_to_num(data);
	
	switch(klawisz)
	{
		case 1 :
		{
			if(whisper[id] <= 199) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow")
			}
			else
			{
				whisper[id] -= 200;			
				
				new rand
				rand = random_num(0,4);
				
				switch(rand)
				{
					case 0: {
						PlayerXP[id] += 50;
						ColorChat(id, GREEN, "[FunXP]^x01 Wylosowales^x03 50^x01 XP");
					}
					case 1: {
						PlayerXP[id] += 5;
						ColorChat(id, GREEN, "[FunXP]^x01 Wylosowales^x03 5^x01 XP");
					}
					case 2: {
						PlayerXP[id] += 200;
						ColorChat(id, GREEN, "[FunXP]^x01 Wylosowales^x03 200^x01 XP");
					}
					case 3: {
						PlayerXP[id] += 100;
						ColorChat(id, GREEN, "[FunXP]^x01 Wylosowales^x03 100^x01 XP");						
					}
					case 4: {
						PlayerXP[id] += 300;
						ColorChat(id, GREEN, "[FunXP]^x01 Wylosowales^x03 30^x01 XP");
					}
				}
				
			}
		}
		case 2:
		{
			if(whisper[id] <= 69) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow")
			}
			else
			{
				whisper[id] -= 70;
				ExecuteHamB(Ham_CS_RoundRespawn, id)	
				ColorChat(id, GREEN, "[FunXP]^x01 Zostales^x03 ozywiony.")
			}
		}
		case 3:
		{
			if(whisper[id] <= 299) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow")
			}
			else
			{
				whisper[id] -= 300;
				skill[id] += 1;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 1^x01 skill point.")
			}
		}
		case 4:
		{
			if(whisper[id] <= 59) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow")
			}
			else
			{
				whisper[id] -= 60;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 predkosc.")
				
				fm_set_user_maxspeed(id, 350.0);
				
				Odliczanie[id] = 15
				
				if(task_exists(id + 3431))
				{
					remove_task(id + 3431);
				}
				set_task(1.0, "Koniec", id + 3431, _, _, "b");
				
				return PLUGIN_CONTINUE;
			}
		}
		case 5:
		{
			if(whisper[id] <= 19) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow")
			}
			else
			{
				whisper[id] -= 20;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 25 HP")
				
				new zycie
				zycie = get_user_health(id);
				
				set_user_health(id, zycie + 25);
			}
		}
		case 6:
		{
			if(whisper[id] <= 29) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow");
			}
			else
			{
				whisper[id] -= 30;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 AK-47.");
				give_item(id, "weapon_ak47");
			}
		}
		case 7:
		{
			if(whisper[id] <= 29) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow");
			}
			else
			{
				whisper[id] -= 30;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 M4A1.");
				give_item(id, "weapon_m4a1");
			}
		}
		case 8:
		{
			if(whisper[id] <= 19) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow");
			}
			else
			{
				whisper[id] -= 20;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 MP5.");
				give_item(id, "weapon_mp5navy");
			}
		}
		case 9:
		{
			if(whisper[id] <= 44) {
				ColorChat(id, GREEN, "[FunXP]^x01 Nie masz na tyle^x03 whisperow");
			}
			else
			{
				whisper[id] -= 45;
				ColorChat(id, GREEN, "[FunXP]^x01 Kupiles^x03 AWP.");
				give_item(id, "weapon_awp");
			}
		}
	}
}
public Koniec(task_id)
{
	new id = task_id - 3431
	
	set_hudmessage(0, 255, 0, 0.03, 0.76, 2, 0.02, 1.0, 0.01)
	show_hudmessage(id, "Za %d sekund stracisz predkosc", Odliczanie[id])
	
	Odliczanie[id] -= 1
	
	if(Odliczanie[id] <= 0)
	{
		if(task_exists(task_id))
		{
			remove_task(task_id)
		}
		fm_set_user_maxspeed(id, 250.0);
	}
}
public PVipMenu(id)
{	
	new menu = menu_create("\wWybierz bron \r[VIP - XP4Fun]:", "PVipMenuHandle")
	
	menu_additem(menu, "\wGalil \r[+ Deagle]", "1", 0)
	menu_additem(menu, "\wFamas \r[+ Deagle]", "2", 0)
	menu_additem(menu, "\wUzi \r[+ Deagle]", "3", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, menu, 0)
}
public PVipMenuHandle(id, PVipMenu  , item)
{
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(PVipMenu, item, acces, data,5, iName, 63, callback)
	
	new klawisz = str_to_num(data)
	
	switch(klawisz)
	{
		case 1 :
		{
			give_item(id, "weapon_galil")
			give_item(id, "weapon_deagle")
			ColorChat(id, GREEN, "[VIP Podstawowy]^x01 Wybrales^x03 Galil + Deagle.")
		}
		case 2:
		{
			give_item(id, "weapon_famas")
			give_item(id, "weapon_deagle")
			ColorChat(id, GREEN, "[VIP Podstawowy]^x01 Wybrales^x03 Famas + Deagle.")
		}
		case 3:
		{
			give_item(id, "weapon_mac10")
			give_item(id, "weapon_deagle")	
			ColorChat(id, GREEN, "[VIP Podstawowy]^x01 Wybrales^x03 Uzi + Deagle.")
		}
	}
}
public UVipMenu(id)
{	
	new menu = menu_create("\wWybierz bron \r[VIP - XP4Fun]:", "UVipMenuHandle")
	
	menu_additem(menu, "\wM4A1 \r[+ Deagle]", "1", 0)
	menu_additem(menu, "\wAK-47 \r[+ Deagle]", "2", 0)
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, menu, 0)
}
public UVipMenuHandle(id, UVipMenu  , item)
{
	new data[6], iName[64]
	new acces, callback
	menu_item_getinfo(UVipMenu, item, acces, data,5, iName, 63, callback)
	
	new klawisz = str_to_num(data)
	
	switch(klawisz)
	{
		case 1 :
		{
			give_item(id, "weapon_m4a1")
			give_item(id, "weapon_deagle")
			ColorChat(id, GREEN, "[VIP Ulepszony]^x01 Wybrales^x03 M4A1 + Deagle.")
		}
		case 2:
		{
			give_item(id, "weapon_ak47")
			give_item(id, "weapon_deagle")
			ColorChat(id, GREEN, "[VIP Ulepszony]^x01 Wybrales^x03 AK-47 + Deagle.")
		}
	}
}
public cmd_give_exp( id, level,cid ) {
	if( ! cmd_access ( id, level, cid, 3 ) )
		return PLUGIN_HANDLED;
	
	new target[32], amount[21], reason[21];
	
	read_argv( 1, target, 31 );
	read_argv(2, amount, 20 );
	read_argv( 3, reason, 20 );
	
	new player = cmd_target( id, target, 8 );
	
	if( ! player )  
		return PLUGIN_HANDLED;
	
	new admin_name[32], player_name[32];
	get_user_name( id, admin_name, 31 );
	get_user_name( player, player_name, 31 );
	
	new expnum = str_to_num( amount );
	
	PlayerXP[player] += expnum;
	
	switch( get_cvar_num ( "amx_show_activity" ) ) {
		case 1: ColorChat( 0, GREEN, "^x03[FunXP] ^x01 ADMIN:^x03 dal ^x01%i XP ^x03 dla ^x01%s.", expnum, player_name );
			case 2: ColorChat( 0, GREEN, "^x03[FunXP] ^x01 ADMIN %s:^x03 dal ^x01%i XP ^x03 dla ^x01%s.", admin_name, expnum, player_name );
		}
	
	client_print( player, print_chat, "[%s] Otrzymales %i XP. (Total: %d)", prefix, expnum, PlayerXP[player] );
	SaveXp( id );	
	return PLUGIN_CONTINUE;
}
public cmd_take_exp( id, level,cid ) {
	if( ! cmd_access ( id, level, cid, 3 ) )
		return PLUGIN_HANDLED;
	
	new target[32], amount[21], reason[21];
	
	read_argv( 1, target, 31 );
	read_argv( 2, amount, 20 );
	read_argv( 3, reason, 20 );
	
	new player = cmd_target( id, target, 8 );
	
	if( ! player )  
		return PLUGIN_HANDLED;
	
	new admin_name[32], player_name[32];
	get_user_name( id, admin_name, 31 );
	get_user_name( player, player_name, 31 );
	
	new expnum = str_to_num( amount );
	
	PlayerXP[player] -= expnum;
	
	switch(get_cvar_num("amx_show_activity")){
		case 1: client_print( 0, print_chat, "ADMIN: zabral %i XP graczowi %s.", expnum, player_name );
			case 2: client_print( 0, print_chat, "ADMIN %s: zabral %i XP graczowi %s.", admin_name, expnum, player_name );
		}
	
	client_print( player, print_chat, "[%s] Straciles %i XP. (Total: %d)", prefix, expnum, PlayerXP[player] );
	SaveXp( id );
	
	return PLUGIN_CONTINUE;
}  
public cmd_give_whisper( id, level,cid ) {
	if( ! cmd_access ( id, level, cid, 3 ) )
		return PLUGIN_HANDLED;
	
	new target[32], amount[21], reason[21];
	
	read_argv( 1, target, 31 );
	read_argv(2, amount, 20 );
	read_argv( 3, reason, 20 );
	
	new player = cmd_target( id, target, 8 );
	
	if( ! player )  
		return PLUGIN_HANDLED;
	
	new admin_name[32], player_name[32];
	get_user_name( id, admin_name, 31 );
	get_user_name( player, player_name, 31 );
	
	new expnum = str_to_num( amount );
	
	whisper[player] += expnum;
	
	switch( get_cvar_num ( "amx_show_activity" ) ) {
		case 1: ColorChat( 0, GREEN, "^x03[FunXP] ^x01 ADMIN:^x03 dal ^x01%i whisperow ^x03 dla ^x01%s.", expnum, player_name );
			case 2: ColorChat( 0, GREEN, "^x03[FunXP] ^x01 ADMIN %s:^x03 dal ^x01%i whisperow ^x03 dla ^x01%s.", admin_name, expnum, player_name );
		}
	
	client_print( player, print_chat, "[%s] Otrzymales %i whisperow. (Total: %d)", prefix, expnum, PlayerXP[player] );
	SaveXp( id );	
	return PLUGIN_CONTINUE;
}
public EventRoundStart()	
	for (new id=1; id < 32; id++)
{
	if(is_user_alive(id) && is_user_connected(id))
	{
		if(get_user_flags(id) & ADMIN_LEVEL_H)
		{
			PVipMenu(id)
		}
		else if(get_user_flags(id) & ADMIN_LEVEL_G)
		{
			UVipMenu(id)
		}
		else
		{
			new hp = get_user_health(id);
			new ap = get_user_armor(id)
		
			set_user_health( id, hp + skillhp[id] * 3);
			set_user_armor( id, ap + skillk[id] * 10);
		}
		
	}
	
}
public say_handle(id){
	if(!wpisywac){
		return PLUGIN_CONTINUE;
	}
	if(get_user_team(id) != 2 && get_user_team(id) != 1 ){
		return PLUGIN_CONTINUE;
	}
	new stringsay[192]
	read_args(stringsay,192)
	remove_quotes(stringsay)
	if(!equali(slowo,stringsay)){
		return PLUGIN_CONTINUE;
	}
	remove_task(665);
	wpisywac = false;
	new name[64];
	get_user_name(id,name,63);
	client_print(0,print_center,"Gratulacje %s wygral %d XP <img src='http://www.grajkownia.com/public/style_emoticons/<#EMO_DIR#>/smile3.gif' class='bbc_emoticon' alt=':)' /> !",name,ile_xp)
	client_cmd(0, "spk sound/win_sound.wav")
	PlayerXP[id] += ile_xp;
	set_task(7.0,"usun",664)
	return PLUGIN_CONTINUE;
}

public usun(){
	client_print(0,print_center,"")
}
public event(){
	new len;
	read_file(dir,random(file_size(dir,1)),slowo,127,len)
	ile_xp = random_num(get_pcvar_num(pcvar_min_xp),get_pcvar_num(pcvar_max_xp))
	ile = get_pcvar_num(pcvar_time)
	client_print(0,print_center,"Kto pierwszy wpisze [%s] wygra %d XP - %d sekund",slowo,ile_xp,ile)
	wpisywac = true;
	set_task(random_float(get_pcvar_float(pcvar_min_time),get_pcvar_float(pcvar_max_time)),"event",666)
	set_task(1.0,"odswiez",665,_,_,"b")
}

public odswiez(){
	ile--;
	if(ile <= 0 ){
		wpisywac = false;
		client_print(0,print_center,"Niestety nikt nie wygral.")
		client_cmd(0, "spk sound/draw_sound.wav")
		set_task(7.0,"usun",664)
		remove_task(665)
	}
	else
	{
		client_print(0,print_center,"Kto pierwszy wpisze [%s] wygra %d XP - %d sekund",slowo,ile_xp,ile)
	}
}
public plugin_precache()
{
	new cdir[128];
	get_configsdir(cdir,charsmax(cdir));
	format(dir,charsmax(dir),"%s/slowa.ini",cdir)
	
	precache_sound(win_sound);
	precache_sound(draw_sound)
	precache_sound("misc/kzb/newup.wav")
	precache_sound("misc/kzb/dead.wav")
	precache_sound("misc/kzb/menu.wav")
	precache_sound("misc/kzb/start.wav")
	precache_sound("misc/whisper/kill.wav")
	precache_model("models/czapa1.mdl");
	precache_model("models/czapa2.mdl");
	precache_model("models/czapa3.mdl");
	precache_model("models/czapa4.mdl");
	precache_model("models/czapa5.mdl");
}  
public fwHamPlayerSpawnPost( const id )
{
	if(skillcz[id] == 1)
	{
				if ( get_pcvar_num( g_Enable ) && is_user_alive( id ) && !pev_valid ( g_bwEnt[ id ] ) ) {
						g_bwEnt[ id ] = engfunc ( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) );
						set_pev( g_bwEnt[ id ], pev_movetype, MOVETYPE_FOLLOW );
						set_pev( g_bwEnt[ id ], pev_aiment, id );
						switch(random_num(1, 5))
						{
								case 1:
								{
										engfunc( EngFunc_SetModel, g_bwEnt[ id ], "models/czapa1.mdl" );
								}
								case 2:
								{
										engfunc( EngFunc_SetModel, g_bwEnt[ id ], "models/czapa2.mdl" );
								}
								case 3:
								{
										engfunc( EngFunc_SetModel, g_bwEnt[ id ], "models/czapa3.mdl" );
								}
								case 4:
								{
										engfunc( EngFunc_SetModel, g_bwEnt[ id ], "models/czapa4.mdl" );
								}
								case 5:
								{
										engfunc( EngFunc_SetModel, g_bwEnt[ id ], "models/czapa5.mdl" );
								}
						}
				}
	}
}
public Prethink(id)
{
	if(is_user_alive(id) && is_user_connected(id))
	{
		switch(skillg[id])
		{
			case 1: set_user_gravity(id, 0.77)
			case 2: set_user_gravity(id, 0.74)
			case 3: set_user_gravity(id, 0.70)
			case 4: set_user_gravity(id, 0.67)
			case 5: set_user_gravity(id, 0.60)
		}
		switch(skillr[id])
		{
			case 1: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 240);
			case 2: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 230);
			case 3: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 220);
			case 4: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 210);
			case 5: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 200);
			case 6: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 190);
			case 7: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 180);
			case 8: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 170);
			case 9: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 160);
			case 10: set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 150);
		}
		switch(skilln[id])
		{
			case 1: fm_set_user_maxspeed(id, 255.0);
			case 2: fm_set_user_maxspeed(id, 260.0);
			case 3: fm_set_user_maxspeed(id, 265.0);
			case 4: fm_set_user_maxspeed(id, 270.0);
			case 5: fm_set_user_maxspeed(id, 275.0);
		}
	}

}
public PlayersMenu(id)
{
	new menu = menu_create("\r[XP 4FUN] \wWybierz gracza:", "PlayersMenuHandler");
	
	new players[32], pnum, tempid;
	
	new szName[32], szTempid[10];
	
	get_players(players, pnum);
	
	for( new i; i<pnum; i++ )
	{
		tempid = players[i];
		
		get_user_name(tempid, szName, charsmax(szName));
		num_to_str(tempid, szTempid, charsmax(szTempid));
		menu_additem(menu, szName, szTempid, 0);
		
	}
	menu_display(id, menu, 0);
}
public PlayersMenuHandler(id, PlayersMenu , item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(PlayersMenu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(PlayersMenu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

	new tempid = str_to_num(data);
	
	ColorChat(id, GREEN, "[FunXP]^x01 %s:^x03 Poziom: %d^x01 |^x03 XP: %d^x01 |^x03 www.^x01lajtownicy.xaa^x03.pl", szName, PlayerLevel[tempid], PlayerXP[tempid]);
	
	return PLUGIN_CONTINUE;
}
public PokazInformacje(id)
{
	id -= HUD_INFO;
	
	set_task(0.1, "PokazInformacje", id+HUD_INFO);
	
	if(!is_user_alive(id))
	{
		new target = entity_get_int(id, EV_INT_iuser2)
		
		new name[32];
		get_user_name(target, name, 31)
		
		if(target == 0)
			return PLUGIN_CONTINUE;
		
		set_hudmessage(255, 255, 255, -1.0, 0.2, 0, 0.0, 0.3, 0.0, 0.0, 2);
		ShowSyncHudMsg(id, SyncHudObj, "[Nick : %s]^n[Poziom : %d]^n[XP : %d]^n[Ranga : %s]",name, PlayerLevel[target], PlayerXP[target], RANGI[PlayerLevel[target]]);
		
		return PLUGIN_CONTINUE;
	}
	set_hudmessage(255, 170, 0, 0.04, 0.15, 0, 0.0, 0.3, 0.0, 0.0);
	ShowSyncHudMsg(id, SyncHudObj, "[Poziom : %d]^n[XP : %d/%d]^n[Ranga : %s]^n^n[www.lajtownicy.xaa.pl]^n[XP 4Fun by Whisper edit : Emilos.]", PlayerLevel[id], PlayerXP[id], LEVELS[PlayerLevel[id]], RANGI[PlayerLevel[id]]);
	return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/

Liczę na waszą pomoc. Dodany obrazek

#2
Emilos

Emilos

    Nowy

  • Grajek
  • Pip
  • 4 postów
    • Time Online: 1s
Problem wyjaśniony, do zamknięcia.

#3
Blade

Blade

    Bajkopisarz

  • VIP
  • 7168 postów
    • Time Online: 23d 16h 10m 49s
  • Gadu-Gadu:
  • Nick w Grze:Blade
  • SkądStarogard Gdański


Wiadomość wygenerowana automatycznie.


Jeżeli masz jakiekolwiek problemy z podanym pluginem to załóż nowy temat w tym dziale, a na pewno postaramy się Tobie pomóc.

W temacie najlepiej zamieść link do tego pluginu aby łatwiej było nam udzielić Tobie pomocy.

Z pozdrowieniami.
Zespół Grajkownia.com



Awards Bar:

Users Awards





Serwery CS 1.6 Non Steam - posiadamy serwery cs 1.6 diablo mod, serwery cs 1.6 ffa oraz serwery cs 1.6 gun game. Na naszym forum znajdziesz także pluginy do cs 1.6, mody oraz masę dodatków do counter strike 1.6 non steam.