· 4 years ago · Feb 27, 2021, 05:56 PM
1#include <amxmodx>
2#include <cstrike>
3#include <hamsandwich>
4#include <engine>
5#include <RegtoMod>
6#include <fun>
7#include <sqlx>
8#include <fakemeta>
9
10#pragma tabsize 0
11#pragma semicolon 1
12
13new const PLUGIN[] = "AWP";
14new const VERSION[] = "4.35";
15new const AUTHOR[] = "Unknown";
16
17new const Website[] = "facebook.com/groups/bigbrotherzujra/";
18
19#define TULAJ ADMIN_IMMUNITY
20#define FOADMIN ADMIN_LEVEL_E
21#define ADMIN ADMIN_LEVEL_F
22#define UGYNOK ADMIN_LEVEL_G
23#define PVIP ADMIN_LEVEL_G
24#define VIP ADMIN_LEVEL_H
25
26#define DLMIN 1
27#define DLMAX 6
28
29#define MAXPLAYERS 33
30
31enum _:eWeaponData {
32 eWeaponName[64],
33 eWeaponFile[64]
34}
35
36#define AWP 105
37#define KNIFE 51
38new g_iAllWp[AWP][MAXPLAYERS], g_iAllKnife[KNIFE][MAXPLAYERS], Skin[2][MAXPLAYERS];
39
40new const cAwpSkin[][eWeaponData] = {
41 {"AWP | ALAP", "models/v_awp.mdl"},//0
42 {"AWP | GreenWave", "models/bigbrotherz_awp/awp1.mdl"},//1
43 {"AWP | Hyper Beast", "models/bigbrotherz_awp/awp2.mdl"},//2
44 {"AWP | Vaporwave", "models/bigbrotherz_awp/awp3.mdl" }, //3
45 {"AWP | Assimov", "models/bigbrotherz_awp/awp4.mdl" }, //4
46 {"AWP | Banshee", "models/bigbrotherz_awp/awp5.mdl" }, //5
47 {"AWP | Black_Dragon", "models/bigbrotherz_awp/awp6.mdl" }, //6
48 {"AWP | Lightning Strike", "models/bigbrotherz_awp/awp7.mdl" }, //7
49 {"AWP | Phobos", "models/bigbrotherz_awp/awp8.mdl" }, //8
50 {"AWP | Dragon_Lore", "models/bigbrotherz_awp/awp9.mdl" }, //9
51 {"AWP | Fever_Dream", "models/bigbrotherz_awp/awp10.mdl" }, //10
52 {"AWP | Elite Build", "models/bigbrotherz_awp/awp11.mdl" }, //11
53 {"AWP | Golden", "models/bigbrotherz_awp/awp12.mdl" }, //12
54 {"AWP | White Tiger", "models/bigbrotherz_awp/awp13.mdl" }, //13
55 {"AWP | Oni Taiji", "models/bigbrotherz_awp/awp14.mdl" }, //14
56 {"AWP | Stress Free", "models/bigbrotherz_awp/awp15.mdl" }, //15
57 {"AWP | Longun", "models/bigbrotherz_awp/awp16.mdl" }, //16
58 {"AWP | Jacket", "models/bigbrotherz_awp/awp17.mdl" }, //17
59 {"AWP | Elf Ranger", "models/bigbrotherz_awp/awp18.mdl" }, //18
60 {"AWP | MLG", "models/bigbrotherz_awp/awp19.mdl" }, //19
61 {"AWP | Zebra", "models/bigbrotherz_awp/awp20.mdl" }, //20
62 {"AWP | Rave", "models/bigbrotherz_awp/awp21.mdl" }, //21
63 {"AWP | Cyrex", "models/bigbrotherz_awp/awp22.mdl" }, //22
64 {"AWP | TheProjecT", "models/bigbrotherz_awp/awp23.mdl" }, //23
65 {"AWP | Iron Man", "models/bigbrotherz_awp/awp24.mdl" }, //24
66 {"AWP | Southeast Tiger", "models/bigbrotherz_awp/awp25.mdl" }, //25
67 {"AWP | Abstract", "models/bigbrotherz_awp/awp26.mdl" }, //26
68 {"AWP | Mosin Nagant", "models/bigbrotherz_awp/awp27.mdl" }, //27
69 {"AWP | Stinger", "models/bigbrotherz_awp/awp28.mdl" }, //28
70 {"AWP | Celestial", "models/bigbrotherz_awp/awp29.mdl" }, //29
71 {"AWP | Blue Bubbles", "models/bigbrotherz_awp/awp30.mdl" }, //30
72 {"AWP | Eternal Dragon", "models/bigbrotherz_awp/awp31.mdl" }, //31
73 {"AWP | Xmas", "models/bigbrotherz_awp/awp32.mdl" }, //32
74 {"AWP | SprayTime", "models/bigbrotherz_awp/awp33.mdl" }, //33
75 {"AWP | Fire Blaze", "models/bigbrotherz_awp/awp34.mdl" }, //34
76 {"AWP | Green Energy", "models/bigbrotherz_awp/awp35.mdl" }, //35
77 {"AWP | Graffiti", "models/bigbrotherz_awp/awp36.mdl" }, //36
78 {"AWP | Kar98k", "models/bigbrotherz_awp/awp37.mdl" }, //37
79 {"AWP | Engraving", "models/bigbrotherz_awp/awp38.mdl" }, //38
80 {"AWP | Tiger Domination", "models/bigbrotherz_awp/awp39.mdl" }, //39
81 {"AWP | Blue Tiger", "models/bigbrotherz_awp/awp40.mdl" }, //40
82 {"AWP | Reptile Lightning", "models/bigbrotherz_awp/awp41.mdl" }, //41
83 {"AWP | Pulse", "models/bigbrotherz_awp/awp42.mdl" }, //42
84 {"AWP | Fire", "models/bigbrotherz_awp/awp43.mdl" }, //43
85 {"AWP | Color Z", "models/bigbrotherz_awp/awp44.mdl" }, //44
86 {"AWP | Inferno", "models/bigbrotherz_awp/awp45.mdl" }, //45
87 {"AWP | Silver Red Camo", "models/bigbrotherz_awp/awp46.mdl" }, //46
88 {"AWP | Razer", "models/bigbrotherz_awp/awp47.mdl" }, //47
89 {"AWP | Snow Tiger", "models/bigbrotherz_awp/awp48.mdl" }, //48
90 {"AWP | BOOM", "models/bigbrotherz_awp/awp49.mdl" }, //49
91 {"AWP | Bomb Snow", "models/bigbrotherz_awp/awp50.mdl" }, //50
92 {"AWP | Saints Row", "models/bigbrotherz_awp/awp51.mdl" }, //51
93 {"AWP | Laser", "models/bigbrotherz_awp/awp52.mdl" }, //52
94 {"AWP | White", "models/bigbrotherz_awp/awp53.mdl" }, //53
95 {"AWP | Green Camo", "models/bigbrotherz_awp/awp54.mdl" }, //54
96 {"AWP | Fast", "models/bigbrotherz_awp/awp55.mdl" }, //55
97 {"AWP | Rust", "models/bigbrotherz_awp/awp56.mdl" }, //56
98 {"AWP | Airsoft", "models/bigbrotherz_awp/awp57.mdl" }, //57
99 {"AWP | L96A1", "models/bigbrotherz_awp/awp58.mdl" }, //58
100 {"AWP | SG3000", "models/bigbrotherz_awp/awp59.mdl" }, //59
101 {"AWP | Azure Fantasy", "models/bigbrotherz_awp/awp60.mdl" }, //60
102 {"AWP | Shadow", "models/bigbrotherz_awp/awp61.mdl" }, //61
103 {"AWP | Emerald", "models/bigbrotherz_awp/awp62.mdl" }, //62
104 {"AWP | Tiger Tooth", "models/bigbrotherz_awp/awp63.mdl" }, //63
105 {"AWP | Blue Hive", "models/bigbrotherz_awp/awp64.mdl" }, //64
106 {"AWP | Taan", "models/bigbrotherz_awp/awp65.mdl" }, //65
107 {"AWP | Warface AS50", "models/bigbrotherz_awp/awp66.mdl" }, //66
108 {"AWP | Zombie", "models/bigbrotherz_awp/awp67.mdl" }, //67
109 {"AWP | Race Stripes", "models/bigbrotherz_awp/awp68.mdl" }, //68
110 {"AWP | European", "models/bigbrotherz_awp/awp69.mdl" }, //69
111 {"AWP | Lee-Enfield" , "models/bigbrotherz_awp/awp70.mdl"}, //70
112 {"AWP | Remington XM2010", "models/bigbrotherz_awp/awp71.mdl" }, //71
113 {"AWP | Magma", "models/bigbrotherz_awp/awp72.mdl" }, //72
114 {"AWP | Death Valley", "models/bigbrotherz_awp/awp73.mdl" }, //73
115 {"AWP | Hawking" , "models/bigbrotherz_awp/awp74.mdl"}, //74
116 {"AWP | Medusa", "models/bigbrotherz_awp/awp75.mdl" }, //75
117 {"AWP | Atheris", "models/bigbrotherz_awp/awp76.mdl" } ,//76
118 {"AWP | Arctic Warfare", "models/uj_wp_skins/Arctic_Warfare.mdl" }, //77
119 {"AWP | Asiimov", "models/uj_wp_skins/Asiimov.mdl" }, //78
120 {"AWP | ElecticHive", "models/uj_wp_skins/awp_electrichive.mdl" }, //79
121 {"AWP | FeverDream", "models/uj_wp_skins/awp_feverdream.mdl" }, //80
122 {"AWP | Graphite", "models/uj_wp_skins/awp_graphite.mdl" } ,//81
123 {"AWP | LightingStrike", "models/uj_wp_skins/awp_lightningstrike.mdl" }, //82
124 {"AWP | Man o' WAR", "models/uj_wp_skins/awp_manowar.mdl" }, //83
125 {"AWP | Pitviper", "models/uj_wp_skins/awp_pitviper.mdl" } ,//,84
126 {"AWP | SafariMesh", "models/uj_wp_skins/awp_safarimesh.mdl" }, //85
127 {"AWP | SunLeo", "models/uj_wp_skins/awp_suninleo.mdl" }, //86
128 {"AWP | Banshee", "models/uj_wp_skins/Banshee.mdl" }, //87
129 {"AWP | Cryex", "models/uj_wp_skins/Cyrex.mdl" }, //88
130 {"AWP | Dragon Lore", "models/uj_wp_skins/Dragon_Lore.mdl" }, //89
131 {"AWP | Elite Build", "models/uj_wp_skins/Elite_Build.mdl" }, //90
132 {"AWP | GoldenRoll", "models/uj_wp_skins/GoldenRoll.mdl" }, //91
133 {"AWP | Graffiti", "models/uj_wp_skins/Graffiti.mdl" }, //92
134 {"AWP | Hawking", "models/uj_wp_skins/Hawking.mdl" } ,//93
135 {"AWP | Hyper Beast", "models/uj_wp_skins/Hyper_Beast.mdl" }, //94
136 {"AWP | TimeInvasion", "models/uj_wp_skins/IdoinvazioI.mdl" } ,//95
137 {"AWP | IronMan", "models/uj_wp_skins/Iron_Man.mdl" },//96
138 {"AWP | Phobos", "models/uj_wp_skins/Phobos.mdl" }, //97
139 {"AWP | Raptor", "models/uj_wp_skins/Raptor.mdl" } ,//98
140 {"AWP | Southeast Tiger", "models/uj_wp_skins/Southeast_Tiger.mdl" }, //99
141 {"AWP | TherlanWP2", "models/uj_wp_skins/TherlanWP2.mdl" }, //100
142 {"AWP | Tiger Domination", "models/uj_wp_skins/Tiger_Domination.mdl" }, //101
143 {"AWP | Tiger Tooth", "models/uj_wp_skins/Tiger_Tooth.mdl" }, //102
144 {"AWP | MagicStick", "models/uj_wp_skins/v_awp_magicstick.mdl" }, //103
145 {"AWP | WormGOD", "models/uj_wp_skins/Worm_God.mdl" }, //104
146};
147new const cKnifeSkin[][eWeaponData] ={
148 {"KÉS | ALAP","models/v_knife.mdl" }, //0
149 {"KÉS | Asiimov Butterfly", "models/bigbrotherz_awp/knife1.mdl" }, //1
150 {"KÉS | Lore Butterfly", "models/bigbrotherz_awp/knife2.mdl" }, //2
151 {"KÉS | Slaughter Huntsman", "models/bigbrotherz_awp/knife3.mdl" }, //3
152 {"KÉS | Doppler Bayonet", "models/bigbrotherz_awp/knife4.mdl" }, //4
153 {"KÉS | Fade Karambit", "models/bigbrotherz_awp/knife5.mdl" }, //5
154 {"KÉS | Gamma Doppler Karambit" , "models/bigbrotherz_awp/knife6.mdl" }, //6
155 {"KÉS | Autotronic Gut", "models/bigbrotherz_awp/knife7.mdl" }, //7
156 {"KÉS | Crimson Web M9 Bayonet", "models/bigbrotherz_awp/knife8.mdl" }, //8
157 {"KÉS | Case Hardened Karambit ", "models/bigbrotherz_awp/knife9.mdl" }, //9
158 {"KÉS | Hyper Beast Karambit", "models/bigbrotherz_awp/knife10.mdl" }, //10
159 {"KÉS | Superfurry Butterfly", "models/bigbrotherz_awp/knife11.mdl" }, //11
160 {"KÉS | Script Booster Karambit" , "models/bigbrotherz_awp/knife12.mdl" }, //12
161 {"KÉS | Tempered Flip", "models/bigbrotherz_awp/knife13.mdl" }, //13
162 {"KÉS | Lore Bayonet", "models/bigbrotherz_awp/knife14.mdl" }, //14
163 {"KÉS | Toxic Waste Huntsman", "models/bigbrotherz_awp/knife15.mdl" }, //15
164 {"KÉS | Combine Shadow Daggers", "models/bigbrotherz_awp/knife16.mdl" }, //16
165 {"KÉS | Redux Falchion", "models/bigbrotherz_awp/knife17.mdl" }, //17
166 {"KÉS | Lionfish M9 Bayonet", "models/bigbrotherz_awp/knife18.mdl" }, //18
167 {"KÉS | Space Gut", "models/bigbrotherz_awp/knife19.mdl" }, //19
168 {"KÉS | Nathlose Gut", "models/bigbrotherz_awp/knife20.mdl" }, //20
169 {"KÉS | Psychedelic Karambit", "models/bigbrotherz_awp/knife21.mdl" }, //21
170 {"KÉS | Aber Shark Karambit", "models/bigbrotherz_awp/knife22.mdl" }, //22
171 {"KÉS | Ultraviolet Falchion", "models/bigbrotherz_awp/knife23.mdl" }, //23
172 {"KÉS | Astro Bayonet", "models/bigbrotherz_awp/knife24.mdl" }, //24
173 {"KÉS | Paladin Shadow Daggers", "models/bigbrotherz_awp/knife25.mdl" }, //25
174 {"KÉS | Ultraviolet Stiletto", "models/bigbrotherz_awp/knife26.mdl" }, //26
175 {"KÉS | Reactor M9 Bayone", "models/bigbrotherz_awp/knife27.mdl" }, //27
176 {"KÉS | Fine Gold Stiletto", "models/bigbrotherz_awp/knife28.mdl" }, //28
177 {"KÉS | Marble Fade Ursus", "models/bigbrotherz_awp/knife29.mdl" }, //29
178 {"KÉS | Fade Navaja", "models/bigbrotherz_awp/knife30.mdl" }, //30
179 {"KÉS | Polymer M9 Bayonet", "models/bigbrotherz_awp/knife31.mdl" }, //31
180 {"KÉS | Boom Bayonet", "models/bigbrotherz_awp/knife32.mdl" }, //32
181 {"KÉS | Aqua" , "models/uj_kes_skins/Aqua.mdl" }, //33
182 {"KÉS | Asiimov" , "models/uj_kes_skins/Asiimov.mdl" }, //34
183 {"KÉS | Autotronic" , "models/uj_kes_skins/Autotronic_K.mdl" }, //35
184 {"KÉS | BAK fade" , "models/uj_kes_skins/BAK_Knife_Fade.mdl" }, //36
185 {"KÉS | Bayonet Slaughter" , "models/uj_kes_skins/Bayonet_Slaughter.mdl" }, //37
186 {"KÉS | Biohazard" , "models/uj_kes_skins/Biohazard.mdl" },//38
187 {"KÉS | Doppler" , "models/uj_kes_skins/Doppler_HM.mdl" }, //39
188 {"KÉS | Flip Fade" , "models/uj_kes_skins/Flip_Fade.mdl" }, //40
189 {"KÉS | Golden Nautlius" , "models/uj_kes_skins/Golden_Nautilus.mdl" }, //41
190 {"KÉS | Gut Autotronic" , "models/uj_kes_skins/Gut_Autotronic.mdl" } ,//42
191 {"KÉS | M9 Bayonet" , "models/uj_kes_skins/M9_Bayonet.mdl" }, //43
192 {"KÉS | Bayonet Sapphire" , "models/uj_kes_skins/Sapphire_B.mdl" }, //44
193 {"KÉS | Sea" , "models/uj_kes_skins/Sea_BF.mdl" }, //45
194 {"KÉS | Slaughter Hm" , "models/uj_kes_skins/Slaughter_HM.mdl" } ,//46
195 {"KÉS | Tiger" , "models/uj_kes_skins/Tiger_K.mdl" }, //47
196 {"KÉS | Bayonet Fade" , "models/uj_kes_skins/v_knife_bayonet_fade.mdl" }, //48
197 {"KÉS | Bayonet Gamma" , "models/uj_kes_skins/v_knife_bayonet_gamma.mdl" }, //49
198 {"KÉS | Wolf" , "models/uj_kes_skins/Wolf.mdl" } //50
199};
200
201enum _:eRanks{
202 eName[64],
203 eKill,
204}
205new const cRanks[][eRanks] ={
206 { "Újonc", 50 },
207 { "Zöldfülü", 200 },
208 { "Szerencsétlen", 450 },
209 { "Makker", 1000 },
210 { "TriggerBot", 1400 },
211 { "Kezdő", 1850 },
212 { "Amatőr", 2000 },
213 { "Kicsinál", 8000 },
214 { "Megesz", 14000 },
215 { "IZI PRO", 14800 },
216 { "AIM ON", 16500 },
217 { "NO LUCK JUST SKILL", 19999 },
218 { "Veszélyes", 20500 },
219 { "Sokat tud", 24000 },
220 { "Megállíthatatlan", 28000 },
221 { "Pokolfajzat", 32000 },
222 { "Isten", 36000 },
223 { "BigBortherZ Veterán", 40000 },
224 { "--------------", 0 }
225};
226
227#define CHEST 2
228#define KEYS 2
229new g_iChest[CHEST][MAXPLAYERS], g_iKey[KEYS][MAXPLAYERS];
230enum _:Opening{
231 eChest[64],
232 eKeys[64]
233}
234enum _:ePlayer{
235 eHungarianForint,
236 eRank,
237 eKills,
238 eSec,
239 ePP,
240 eVIP,
241 eCounter,
242 eLvl,
243 eXp,
244 eHs,
245};
246new g_ePlayer[ePlayer][MAXPLAYERS];
247
248new bool:g_bHudOFFON[MAXPLAYERS], bool: g_bSkinOFFON[MAXPLAYERS], g_iHudChange[MAXPLAYERS] = 0;
249new g_sName[32][MAXPLAYERS], g_sSteamID[64][MAXPLAYERS], g_sIP[64][MAXPLAYERS], g_iGift[MAXPLAYERS];
250new TetErteke[MAXPLAYERS];
251new cvarPrefix, cvarMenuPrefix;
252new g_iLastKiller[MAXPLAYERS];
253new g_iOneVIP[MAXPLAYERS];
254
255enum _:eQuest{
256 QuestKill,
257 QuestHs,
258 QuestDeath,
259 QuestReward,
260 QuestNs,
261
262 QuestEndKill,
263 QuestEndHs,
264 QuestEndDeath,
265 QuestEasyDone,
266 QuestHardDone,
267}
268new g_eQuest[eQuest][MAXPLAYERS];
269new bool:g_bQuestActive[MAXPLAYERS], bool:g_bQuestDeathOff[MAXPLAYERS];
270
271enum _:eMarketAll{
272 eSenderID,
273 eReceiverID,
274 eNumberofsendItem,
275 eMarketNum,
276 eKnifeorAWP,
277}
278new g_eMarketAll[eMarketAll];
279
280new gSkinSold[2][MAXPLAYERS], gSkinPrize[2][MAXPLAYERS], gSkinSell[2][MAXPLAYERS];
281
282new gSyncHud[2];
283new Handle:g_SqlTuple;
284new SQLCONNECTION = 1;
285new g_iLoadAccount[MAXPLAYERS];
286
287new g_iUserFPS[MAXPLAYERS];
288new g_cDelayTimer;
289new g_iRollingPattern[MAXPLAYERS], g_iRolling[MAXPLAYERS], g_iNextItems[MAXPLAYERS][7];
290new g_iRollingPatternKnife[MAXPLAYERS], g_iRollingKnife[MAXPLAYERS], g_iNextItemsKnife[MAXPLAYERS][7];
291new m_Awp, g_iChestopen[MAXPLAYERS];
292public plugin_init()
293{
294 register_plugin(PLUGIN, VERSION, AUTHOR);
295
296 m_Awp = register_menuid("CloseItemRollWp");
297 register_menucmd(m_Awp, 1023, "CloseItemRollWp");
298
299 cvarPrefix = register_cvar("asd", "[-BiG BrotherZ-] ^3»^1");
300 cvarMenuPrefix = register_cvar("asd2", "\w[-BiG BrotherZ-]\d AWP v5.0");
301
302 g_cDelayTimer = register_cvar("Timer", "1.0");//| ezt ne ird at, csak ha tudod mi | mpben
303
304 RegisterHam(Ham_Spawn, "player", "VipEllenorzes", 1);
305 RegisterHam(Ham_Item_Deploy, "weapon_knife", "Fegyvervaltas", 1);
306 RegisterHam(Ham_Item_Deploy, "weapon_awp", "Fegyvervaltas", 1);
307
308 register_logevent("logevent_round_start", 2, "1=Round_Start");
309 register_event("DeathMsg", "Halal", "a");
310 //register_forward(FM_ClientKill,"HookKill");
311 register_forward(FM_Touch,"ForwardTouch");
312 register_forward(FM_PlayerPreThink, "fwdPlayerPreThink");
313
314 register_impulse(201, "checklogged");
315 register_clcmd("say /menu", "checklogged");
316 register_clcmd("say /rs", "reset_score");
317 register_clcmd("TETED", "DollarSzerencsekerek");
318
319 register_clcmd("type_pp", "type_pp_p");
320 register_clcmd("type_awpskin_prize", "market_sell_awp_prize");
321 register_clcmd("type_knifeskin_prize", "market_sell_knife_prize");
322 register_clcmd("type_Hunf", "type_Hunf_p");
323
324 register_clcmd("say", "sayhook");
325 register_clcmd("say_team", "sayteamhook");
326
327 gSyncHud[0] = CreateHudSyncObj();
328 gSyncHud[1] = CreateHudSyncObj();
329
330 set_task(1.0, "AutoCheck",_,_,_,"b");
331}
332public fwdPlayerPreThink(id)
333{
334 static Float:fGameTime, Float:fCountNext[MAX_PLAYERS], iCountFrames[MAX_PLAYERS], Float:fDelayTimer;
335
336 fDelayTimer = get_pcvar_float(g_cDelayTimer);
337
338 if(fCountNext[id] >= (fGameTime = get_gametime()))
339 {
340 iCountFrames[id]++;
341 return FMRES_IGNORED;
342 }
343
344 g_iUserFPS[id] = iCountFrames[id];
345 iCountFrames[id] = 0;
346 fCountNext[id] = fGameTime + fDelayTimer;
347
348 return FMRES_IGNORED;
349}
350public reset_score(id)
351{
352 cs_set_user_deaths(id, 0);set_user_frags(id, 0);cs_set_user_deaths(id, 0);set_user_frags(id, 0);
353 client_print_color(id, print_team_default, "%s^1 Nulláztad a statod.",get_cprefix());
354}
355public logevent_round_start()
356{
357 new hkt = FM_NULLENT;
358 while((hkt = find_ent_by_class(hkt, "ladadrop")))
359 engfunc(EngFunc_RemoveEntity, hkt);
360}
361public dropdobas()
362{
363 new victim = read_data(2);
364
365 static Float:origin[3];
366 pev(victim, pev_origin, origin);
367
368 new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
369 origin[2] -= 36;
370 engfunc(EngFunc_SetOrigin, ent, origin);
371
372 if(!pev_valid(ent))
373 return PLUGIN_HANDLED;
374
375 set_pev(ent, pev_classname, "ladadrop");
376 entity_set_model(ent, "models/lada/ladadrop.mdl");
377 dllfunc(DLLFunc_Spawn, ent);
378 set_pev(ent, pev_solid, SOLID_BBOX);
379 set_pev(ent, pev_movetype, MOVETYPE_NONE);
380 engfunc(EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000});
381 engfunc(EngFunc_DropToFloor, ent);
382
383 return PLUGIN_HANDLED;
384}
385public client_PreThink(id)
386 LvlCheck(id);
387public ForwardTouch(ent, id)
388{
389 if(pev_valid(ent))
390 {
391 new classname[32];
392 pev(ent, pev_classname, classname, charsmax(classname));
393
394 if(!equal(classname, "ladadrop"))
395 return FMRES_IGNORED;
396
397 if(!g_iLastKiller[id])
398 {
399 client_print_color(id, print_team_default, "%s^1 Ezt a ládát nem veheted fel, mivel nem te ölted meg a játékost érte!",get_cprefix());
400 return FMRES_SUPERCEDE;
401 }
402
403 TalalLada(id);
404
405 engfunc(EngFunc_RemoveEntity, ent);
406 }
407 return FMRES_IGNORED;
408}
409public TalalLada(id)
410{
411 new iRandom, iRnd;
412 iRandom = random_num(40, 150);
413 iRnd = random_num(1, 34);
414
415 switch(random_num(0, 100))
416 {
417 case 0..50:
418 {
419 g_ePlayer[eHungarianForint][id]+=iRandom;
420 client_print_color(id, print_team_default, "^4%s ^1Találtál a földön lévő dobozból %d Forintot.",get_cprefix(),iRandom);
421 }
422 case 51..55:
423 {
424 g_ePlayer[ePP][id] ++;
425 client_print_color(id, print_team_default, "^4%s ^1Találtál a földön lévő dobozból +1 PPt.",get_cprefix());
426 }
427 case 56..57:
428 {
429 g_ePlayer[eHungarianForint][id]+=iRandom;
430 client_print_color(id, print_team_default, "^4%s ^1Találtál a földön lévő dobozból %d Forintot.",get_cprefix(),iRandom);
431 }
432 case 58..99:
433 {
434 g_ePlayer[eXp][id]+=iRnd;
435 client_print_color(0, print_team_default, "^4%s^3 %s ^1Talált a földön lévő dobozból +%d Xpt", get_cprefix(), g_sName[id], iRnd);
436 LvlCheck(id);
437 }
438 case 100:
439 {
440 g_iAllKnife[iRnd][id]++;
441 client_print_color(id, print_team_default, "^4%s^3 %s ^1Talált a földön lévő dobozból %s kés skint.",get_cprefix(),cKnifeSkin[iRnd][eWeaponName]);
442 }
443 }
444}
445public checklogged(id)
446{
447 if(get_player_loggedIn(id))
448 m_mainmenu(id);
449 else
450 client_cmd(id, "say /regfomenu");
451}
452get_cprefix(){
453 new sPrefix[32];
454 get_pcvar_string(cvarPrefix, sPrefix, charsmax(sPrefix));
455 return sPrefix;
456}
457get_mprefix(){
458 new sPrefix1[32];
459 get_pcvar_string(cvarMenuPrefix, sPrefix1, charsmax(sPrefix1));
460 return sPrefix1;
461}
462public sayhook(id)
463{
464 new Message[512];
465 read_args(Message, charsmax(Message));
466 remove_quotes(Message);
467
468 if(strlen(Message) == 0 || Message[0] == '/')
469 return PLUGIN_HANDLED;
470
471 new Death[16], sName[64];
472 get_user_name(id, sName, charsmax(sName));
473
474 new sRank[64], sColor[16];
475
476 if(get_player_regID(id) == 1)
477 {sRank = "^4[^3Fejlesztő^4]"; sColor = "^4";}
478 else if(get_user_flags(id) & TULAJ)
479 {sRank = "^4[^3Tulajdonos^4]"; sColor = "^4";}
480 else if(get_user_flags(id) & FOADMIN)
481 {sRank = "^4[^3FőAdmin^4]"; sColor = "^4";}
482 else if(get_user_flags(id) & ADMIN)
483 {sRank = "^4[^3Admin^4]"; sColor = "^4";}
484 else if(get_user_flags(id) & PVIP)
485 {sRank = "^4[^3Prémium V.I.P^4]"; sColor = "^4";}
486 else if(g_ePlayer[eVIP][id] >= get_systime())
487 {sRank = "^4[^1V.I.P^4]"; sColor = "^1";}
488 else
489 {sRank = "^4[^1Játékos^4]"; sColor = "^1";}
490
491 for(new i = 1; i <= get_maxplayers(); i++){
492 if(is_user_connected(i) && !is_user_bot(i)){
493 if(!get_player_loggedIn(i)){
494 formatex(Death, charsmax(Death), is_user_alive(id) ? "":"*Halott*");
495 client_print_color(i, print_team_default, "%s^4[^3Nincs belépve^4] ^3%s: ^1%s", Death, sName, Message);
496 }
497 else{
498 formatex(Death, charsmax(Death), is_user_alive(id) ? "":"*Halott*");
499 client_print_color(i, print_team_default, "%s%s-^4[^3Szint:^1 %d^4] ^3%s: %s%s", Death, sRank, g_ePlayer[eLvl][id], sName, sColor, Message);
500 }
501 }
502 }
503 return PLUGIN_HANDLED;
504}
505public sayteamhook(id)
506{
507 new Message[192];
508 read_args(Message, charsmax(Message));
509 remove_quotes(Message);
510
511 if(strlen(Message) == 0 || Message[0] == '/')
512 return PLUGIN_HANDLED;
513
514 new Death[16], sName[MAX_NAME_LENGTH];
515 get_user_name(id, sName, charsmax(sName));
516
517 new iTeam, sTeam[32];
518 iTeam = get_user_team(id, sTeam, charsmax(sTeam));
519
520 switch(iTeam)
521 {
522 case CS_TEAM_CT: sTeam = "Terrorelhárító";
523 case CS_TEAM_T: sTeam = "Terrorista";
524 case CS_TEAM_SPECTATOR: sTeam = "Nézelődő";
525 }
526 for(new i = 1; i <= get_maxplayers(); i++)
527 {
528 if(is_user_connected(i) && !is_user_bot(i))
529 {
530 formatex(Death, charsmax(Death), is_user_alive(id) ? "":"*Halott*");
531 client_print_color(i, print_team_default, "%s^3[%s] ^1%s: ^3%s", Death, sTeam, sName, Message);
532 }
533 }
534 return PLUGIN_HANDLED;
535}
536public HookKill(id)
537{
538 client_print_color(id, print_team_default, "^4%s ^1Nem ölheted meg magad!", get_cprefix());
539 return FMRES_SUPERCEDE;
540}
541public AutoCheck()
542{
543 new p[32],n;
544 get_players(p,n,"ch");
545 for(new i=0;i<n;i++)
546 {
547 new id = p[i];
548 InfoHud(id);
549 }
550}
551public VIPvagy(id)
552{
553 if(g_ePlayer[eVIP][id] >= get_systime())
554 {
555 set_task(20.0, "VIPvagy");
556 set_user_flags(id, get_user_flags(id) | VIP);
557 g_ePlayer[eXp][id]+= 20;
558 client_print_color(id, print_team_default, "^4%s^1 Kaptál 20 xpt, mert VIP vagy!", get_cprefix());
559 }
560
561}
562public VipEllenorzes(id)
563{
564 if(is_user_connected(id))
565 {
566 strip_user_weapons(id);
567 give_item(id, "weapon_knife");
568 give_item(id, "weapon_awp");
569 cs_set_user_bpammo(id, CSW_AWP, 90);
570 }
571
572 mentes(id);
573 if(g_iOneVIP[id] == 0)
574 {
575 g_iOneVIP[id] = 1;
576 g_ePlayer[eVIP][id] += get_systime() + 86400*3;
577 client_print_color(id, print_team_default, "^4%s^1 Kaptál 3 nap VIPet, élj a bónuszokkal!", get_cprefix());
578 }
579}
580public mentes(id)
581{
582 if(get_player_loggedIn(id))
583 AwpUpdate(id);
584}
585public InfoHud(id)
586{
587 if(g_bHudOFFON[id] == true)
588 return;
589
590 new idT, ido[64], datum[64], sRank[64],iTimes[4];
591 new CurrentPlayers = get_playersnum();
592 new MaxPlayers = get_maxplayers();
593 new Target = pev(id, pev_iuser1) == 4 ? pev(id, pev_iuser2) : id;
594
595 if(!get_player_loggedIn(id))
596 {
597 set_hudmessage(0, 255, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
598 ShowSyncHudMsg(id, gSyncHud[0], "Jelentkezz be, hogy használhasd a hudot!");
599 return;
600 }
601 get_time("%H:%M:%S", ido, charsmax(ido));
602 get_time("%Y.%m.%d", datum, charsmax(datum));
603
604 idT = is_user_alive(id) ? id:Target;
605
606 iTimes[0] = g_ePlayer[eSec][idT] + get_user_time(idT);
607 iTimes[1] = iTimes[0] / 60;
608 iTimes[2] = iTimes[1] / 60;
609 iTimes[3] = iTimes[2] / 24;
610 iTimes[0] = iTimes[0] - iTimes[1] * 60;
611 iTimes[1] = iTimes[1] - iTimes[2] * 60;
612 iTimes[2] = iTimes[2] - iTimes[3] * 24;
613
614 if(get_player_regID(id) == 1)
615 sRank = "Fejlesztő";
616 else if(get_user_flags(id) & TULAJ)
617 sRank = "Tulajdonos";
618 else if(get_user_flags(id) & FOADMIN)
619 sRank = "FőAdminisztrátor";
620 else if(get_user_flags(id) & ADMIN)
621 sRank = "Adminisztrátor";
622 else if(get_user_flags(id) & PVIP)
623 sRank = "Prémium V.I.P";
624 else if(get_user_flags(id) & VIP)
625 sRank = "V.I.P";
626 else
627 sRank = "Játékos";
628
629 new Xp, Xp2;
630 Xp = 100+g_ePlayer[eLvl][id];
631 Xp2 = 60*100+g_ePlayer[eLvl][id]*Xp;
632
633 if(g_iHudChange[id] == 0)
634 {
635 if(g_ePlayer[eCounter][id] < 100)
636 {
637 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
638 ShowSyncHudMsg(id, gSyncHud[0], "Üdv:^nForint:^nPP pontok:^nJátékidő:^nSzint/XP:^nStátusz:");
639 set_hudmessage(0, 255, 0, 0.01, 0.151, 0, 6.0, 1.1, 0.0, 0.0, -1);
640 ShowSyncHudMsg(id, gSyncHud[1], " %s(#%d)^n %d^n %d^n %d nap %d óra %d perc %d mp^n %d|%d/%d^n %s", g_sName[idT],get_player_regID(idT), g_ePlayer[eHungarianForint][idT], g_ePlayer[ePP][idT], iTimes[3], iTimes[2], iTimes[1], iTimes[0], g_ePlayer[eLvl][idT],g_ePlayer[eXp][idT], Xp2, sRank);
641 g_ePlayer[eCounter][id]++;
642 }
643 else if(g_ePlayer[eCounter][id] < 200 && g_ePlayer[eCounter][id] >= 100)
644 {
645 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
646 ShowSyncHudMsg(id, gSyncHud[0], "Jelenlegi idő:^nDátum:^nJátékosok:");
647 set_hudmessage(0, 255, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
648 ShowSyncHudMsg(id, gSyncHud[1], " %s^n %s^n %d/%d", ido, datum, CurrentPlayers, MaxPlayers);
649 g_ePlayer[eCounter][id]++;
650 }
651 else if(g_ePlayer[eCounter][id] < 300 && g_ePlayer[eCounter][id] >= 200)
652 {
653 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
654 ShowSyncHudMsg(id, gSyncHud[0], "Aktív AWP:^nAktív KÉS:^nRangod:");
655 set_hudmessage(255, 0, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
656 ShowSyncHudMsg(id, gSyncHud[1], " %s^n %s^n %s", cAwpSkin[Skin[0][idT]][eWeaponName], cKnifeSkin[Skin[1][idT]][eWeaponName], cRanks[g_ePlayer[eRank][idT]][eName]);
657 g_ePlayer[eCounter][id]++;
658 }
659 if(g_ePlayer[eCounter][id] == 300)
660 g_ePlayer[eCounter][id] = 0;
661
662 return;
663 }
664 else if(g_iHudChange[id] == 1)
665 {
666 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
667 ShowSyncHudMsg(id, gSyncHud[0], "Üdv:^nForint:^nPP pontok:^nJátékidő:^nSzint/XP:^nStátusz:^n^nAktív AWP:^nAktív KÉS:");
668 set_hudmessage(0, 255, 0, 0.01, 0.151, 0, 6.0, 1.1, 0.0, 0.0, -1);
669 ShowSyncHudMsg(id, gSyncHud[1], " %s(#%d)^n %d^n %d^n %d nap %d óra %d perc %d mp^n %d|%d/%d^n %s^n^n %s^n %s", g_sName[idT],get_player_regID(idT), g_ePlayer[eHungarianForint][idT], g_ePlayer[ePP][idT], iTimes[3], iTimes[2], iTimes[1], iTimes[0], g_ePlayer[eLvl][idT], g_ePlayer[eXp][idT], Xp2,sRank, cAwpSkin[Skin[0][idT]][eWeaponName], cKnifeSkin[Skin[1][idT]][eWeaponName]);
670
671 return;
672 }
673 else if(g_iHudChange[id] == 2)
674 {
675 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
676 ShowSyncHudMsg(id, gSyncHud[0], "Jelenlegi idő:^nDátum:^nJátékosok:");
677 set_hudmessage(0, 255, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
678 ShowSyncHudMsg(id, gSyncHud[1], " %s^n %s^n %d/%d", ido, datum, CurrentPlayers, MaxPlayers);
679 }
680 else if(g_iHudChange[id] == 3)
681 {
682 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
683 ShowSyncHudMsg(id, gSyncHud[0], "Aktív AWP:^nAktív KÉS:^nRangod:^nFPS:");
684 set_hudmessage(255, 0, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
685 ShowSyncHudMsg(id, gSyncHud[1], " %s^n %s^n %s^n %d", cAwpSkin[Skin[0][idT]][eWeaponName], cKnifeSkin[Skin[1][idT]][eWeaponName], cRanks[g_ePlayer[eRank][idT]][eName], g_iUserFPS[idT]);
686 }
687}
688public plugin_precache()
689{
690 for(new i = 0; i < sizeof(cAwpSkin); i++)
691 precache_model(cAwpSkin[i][eWeaponFile]);
692
693 for(new i = 0; i < sizeof(cKnifeSkin); i++)
694 precache_model(cKnifeSkin[i][eWeaponFile]);
695
696 precache_model("models/knife/knife.mdl");
697 precache_model("models/lada/ladadrop.mdl");
698 precache_sound("misc/hangok/szint.wav");
699}
700public Fegyvervaltas(iEnt)
701{
702 new id = get_pdata_cbase(iEnt, 41, 4);
703
704 if(!is_user_alive(id) || !is_user_connected(id))
705 return HAM_IGNORED;
706
707 if(g_bSkinOFFON[id] == true)
708 return HAM_IGNORED;
709
710 new Weapon = cs_get_weapon_id(iEnt);
711
712 switch(Weapon)
713 {
714 case CSW_AWP:
715 {
716 if(Skin[0][id] == -1)
717 return HAM_IGNORED;
718 else
719 entity_set_string(id, EV_SZ_viewmodel, cAwpSkin[Skin[0][id]][eWeaponFile]);
720 }
721 case CSW_KNIFE:
722 {
723 if(Skin[1][id] == -1)
724 return HAM_IGNORED;
725 else
726 entity_set_string(id, EV_SZ_viewmodel, cKnifeSkin[Skin[1][id]][eWeaponFile]);
727 }
728 }
729 return HAM_IGNORED;
730}
731public LvlCheck(id)
732{
733 new Xp, Xp2;
734 Xp = 100+g_ePlayer[eLvl][id];
735 Xp2 = 60*100+g_ePlayer[eLvl][id]*Xp;
736
737 new lastxp;
738
739 if(g_ePlayer[eXp][id] >= Xp2)
740 {
741 if(g_ePlayer[eXp][id] > Xp2)
742 {
743 lastxp = g_ePlayer[eXp][id] -= Xp2;
744 g_ePlayer[eXp][id] = g_ePlayer[eXp][id] + lastxp;
745 }
746 g_ePlayer[eLvl][id]++;
747 g_ePlayer[eXp][id] = 0;
748 client_print_color(0, print_team_default, "^4%s^3 %s^1 szintett lépett, szintje: %d.", get_cprefix(), g_sName[id], g_ePlayer[eLvl][id]);
749 client_cmd(0, "spk misc/hangok/szint.wav");
750 }
751}
752public Halal()
753{
754 new iKiller = read_data(1);
755 new iVictim = read_data(2);
756 new iHs = read_data(3);
757 new iRnd[4];
758
759 if(iKiller == iVictim || !iVictim || !iKiller)
760 return PLUGIN_HANDLED;
761
762 if(g_ePlayer[eLvl][iKiller] != 400)
763 LvlCheck(iKiller);
764
765 if(g_ePlayer[eVIP][iKiller] >= get_systime())
766 g_ePlayer[eKills][iKiller]+=2;
767 else
768 g_ePlayer[eKills][iKiller]++;
769
770 if(g_ePlayer[eKills][iKiller] >= cRanks[g_ePlayer[eRank][iKiller]][eKill])
771 {
772 g_ePlayer[eRank][iKiller]++;
773 client_print_color(iKiller, print_team_default, "^4%s ^1Gratulálunk! ^3 %s ^4Rangba ^1léptél", get_cprefix(), cRanks[g_ePlayer[eRank][iKiller]][eName]);
774 }
775
776 if(iHs)
777 {
778 if(g_ePlayer[eVIP][iKiller] >= get_systime())
779 {
780 iRnd[3] = random(40);iRnd[2] = random(800);
781 g_ePlayer[eHungarianForint][iKiller] += iRnd[2];g_ePlayer[eHs][iKiller]++;g_ePlayer[eXp][iKiller]+= iRnd[3];LadaDropp(iKiller, 0);
782 }
783 else
784 {
785 iRnd[3] = random(20);iRnd[2] = random(400);
786 g_ePlayer[eHungarianForint][iKiller] += iRnd[2];g_ePlayer[eHs][iKiller]++;g_ePlayer[eXp][iKiller]+= iRnd[3];LadaDropp(iKiller, 0);
787 }
788
789 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
790 show_dhudmessage(iKiller, "-|+ %d XP|-", iRnd[3]);
791
792 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
793 show_dhudmessage(iKiller, "-|______|-");
794
795 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
796 show_dhudmessage(iKiller, "^n|-Szép Fejes-|");
797
798 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
799 show_dhudmessage(iKiller, "^n^n-|+ %d Pont|-", iRnd[2]);
800
801 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
802 show_dhudmessage(iKiller, "^n^n-|________|-");
803
804 g_iLastKiller[iKiller] = iKiller;
805 dropdobas();
806 g_ePlayer[eHs][iKiller]++;
807 }
808 else
809 {
810 if(g_ePlayer[eVIP][iKiller] >= get_systime())
811 {
812 iRnd[1] = random(20);iRnd[0] = random(400);
813 g_ePlayer[eHungarianForint][iKiller] += iRnd[0];g_ePlayer[eXp][iKiller]+= iRnd[1];LadaDropp(iKiller, 1);
814 }
815 else
816 {
817 iRnd[1] = random(10);iRnd[0] = random(200);
818 g_ePlayer[eHungarianForint][iKiller] += iRnd[0];g_ePlayer[eXp][iKiller]+= iRnd[1];LadaDropp(iKiller, 1);
819 }
820 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
821 show_dhudmessage(iKiller, "+ %d Forint | + %d XP", iRnd[0], iRnd[1]);
822 }
823
824 if(g_bQuestActive[iVictim] == true || g_bQuestActive[iKiller] == true || g_bQuestDeathOff[iVictim] == true)
825 g_eQuest[QuestEndDeath][iVictim]++;
826
827 if(g_eQuest[QuestDeath][iVictim] == g_eQuest[QuestEndDeath][iVictim] && g_bQuestActive[iVictim] == true)
828 questend(iVictim);
829
830 if(g_bQuestActive[iKiller] == true)
831 {
832 if(g_eQuest[QuestKill][iKiller] == g_eQuest[QuestEndKill][iKiller] && g_eQuest[QuestHs][iKiller] == g_eQuest[QuestEndHs][iKiller])
833 {
834 QuestCalculator(iKiller);
835 return PLUGIN_HANDLED;
836 }
837
838 if(g_eQuest[QuestKill][iKiller] == g_eQuest[QuestEndKill][iKiller] && g_eQuest[QuestHs][iKiller] != g_eQuest[QuestEndHs][iKiller])
839 {
840 if(iHs)
841 g_eQuest[QuestEndHs][iKiller]++;
842 }
843 else
844 {
845 if(iHs)
846 {
847 g_eQuest[QuestEndHs][iKiller]++;
848 g_eQuest[QuestEndKill][iKiller]++;
849 }
850 else
851 g_eQuest[QuestEndKill][iKiller]++;
852 }
853 }
854
855 return PLUGIN_HANDLED;
856}
857public QuestCalculator(id)
858{
859 if(g_bQuestActive[id] == false)
860 {
861 if(g_bQuestDeathOff[id] == false)
862 {
863 new iRnd[2];
864 iRnd[0] = random_num(25, 100);
865 iRnd[1] = random_num(25, 45);
866
867 g_eQuest[QuestKill][id] += iRnd[0];
868 g_eQuest[QuestHs][id] += iRnd[1];
869 g_bQuestActive[id] = true;
870
871 }
872 else if(g_bQuestDeathOff[id] == true)
873 {
874 new iRnd[3];
875 iRnd[0] = random_num(150, 1000);iRnd[1] = random_num(100, 800);iRnd[2] = random_num(200, 250);
876
877 g_eQuest[QuestKill][id] += iRnd[0];g_eQuest[QuestHs][id] += iRnd[1];g_eQuest[QuestDeath][id] += iRnd[2];g_bQuestActive[id] = true;
878 client_print_color(id, print_team_default, "^4%s ^1Aktiváltad a nehéz fokozatú küldetést, a küldetésed a menüben látod!", get_cprefix());
879 }
880
881 }
882 else if(g_bQuestActive[id] == true)
883 {
884 new iRnd[2];
885 if(g_bQuestDeathOff[id] == false)
886 {
887 if(g_eQuest[QuestKill][id] == g_eQuest[QuestEndKill][id] && g_eQuest[QuestHs][id] == g_eQuest[QuestEndHs][id])
888 {
889 iRnd[0] = random_num(10, 1000);g_ePlayer[eHungarianForint][id] += iRnd[0];
890 client_print_color(id, print_team_default, "^4%s ^1Teljesítetted a küldetést, meg is kaptad az érte járó jutalmat, %d Forint", get_cprefix(), iRnd[0]);
891
892 g_eQuest[QuestEasyDone][id]+=1;
893 client_print_color(0, print_team_default, "^4%s^3 %s ^1Teljesített egy künnyű küldetést, teljesített künnyű küldetései: %d", get_cprefix(), g_sName[id], g_eQuest[QuestEasyDone][id]);
894
895 g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;
896 g_bQuestActive[id] = false;
897 }
898 }
899 else
900 {
901 if(g_eQuest[QuestKill][id] == g_eQuest[QuestEndKill][id] && g_eQuest[QuestHs][id] == g_eQuest[QuestEndHs][id] || g_eQuest[QuestDeath][id] != g_eQuest[QuestEndDeath][id])
902 {
903 iRnd[0] = random_num(200, 10000);iRnd[1] = random_num(5, 150);
904 g_ePlayer[eHungarianForint][id] += iRnd[0];g_ePlayer[ePP][id] += iRnd[1];
905 client_print_color(id, print_team_default, "^4%s ^1Teljesítetted a küldetést, meg is kaptad az érte járó jutalmat, %d Forint %d PP pont", get_cprefix(), iRnd[0], iRnd[1]);
906
907 g_eQuest[QuestHardDone][id]+=1;
908 client_print_color(0, print_team_default, "^4%s^3 %s ^1Teljesített egy nehéz küldetést, teljesített nehéz küldetései: %d", get_cprefix(), g_sName[id], g_eQuest[QuestHardDone][id]);
909
910 g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestDeath][id] = 0;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;g_eQuest[QuestEndDeath][id] = 0;
911 g_bQuestActive[id] = false;
912 }
913 }
914 }
915}
916public questend(id)
917{
918 client_print_color(id, print_team_default, "^4%s ^1Elbuktad a nehéz küldetésed, még gyakorolj a könnyűn! Jutalom ezért nem jár!", get_cprefix());
919 client_print_color(0, print_team_default, "^4%s^3 %s ^1Elbukott egy nehéz küldetést, nem kapott jutalmat! :(", get_cprefix(), g_sName[id]);
920
921 g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestDeath][id] = 0;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;g_eQuest[QuestEndDeath][id] = 0;
922 g_bQuestActive[id] = false;
923}
924public LadaDropp(id, iNum)
925{
926 new iRnd[2];
927 switch(iNum)
928 {
929 case 0:
930 {
931 iRnd[0] = random_num(1,10);
932 switch(iRnd[0])
933 {
934 case 0..2:
935 {
936 g_ePlayer[ePP][id]++;
937 client_print_color(id, print_team_default, "^4%s ^1Kaptál egy PP Pontot.", get_cprefix());
938 }
939 case 3..4: client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());
940 case 5..6:
941 {
942 g_iChest[1][id]++;
943 client_print_color(id, print_team_default, "^4%s ^1Találtál egy KÉS ládát.", get_cprefix());
944 }
945 case 7..8: {client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());}
946 case 9..10:
947 {
948 g_iKey[1][id]++;
949 client_print_color(id, print_team_default, "^4%s ^1Találtál egy KÉS láda kulcsot.", get_cprefix());
950 }
951 }
952 }
953 case 1:
954 {
955 iRnd[1] = random_num(1,10);
956 switch(iRnd[1])
957 {
958 case 0..2:
959 {
960 g_ePlayer[eHungarianForint][id] += 10;
961 client_print_color(id, print_team_default, "^4%s ^1Kaptál 10 Forintot.", get_cprefix());
962 }
963 case 3..4: client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());
964 case 5..6:
965 {
966 g_iChest[0][id]++;
967 client_print_color(id, print_team_default, "^4%s ^1Találtál egy AWP ládát.", get_cprefix());
968 }
969 case 7..8: {client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());}
970 case 9..10:
971 {
972 g_iKey[0][id]++;
973 client_print_color(id, print_team_default, "^4%s ^1Találtál egy AWP láda kulcsot.", get_cprefix());
974 }
975 }
976 }
977 }
978}
979public m_mainmenu(id)
980{
981 new sText[256];
982 format(sText, charsmax(sText), "%s^n\dForint: \r%d \d| PP Pont: \r%d", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
983 new iMenu = menu_create(sText, "m_mainmenu_h");
984
985 menu_additem(iMenu, "\y»\wRaktár elosztó", "1", 0);
986 menu_additem(iMenu, "\y»\wLádaNyitás^n", "2", 0);
987 menu_additem(iMenu, "\y»\wÁruház", "3", 0);
988 menu_additem(iMenu, "\y»\wKüldetések^n", "4", 0);
989 menu_additem(iMenu, "\y»\wSzerencse Kerék", "5", 0);
990 menu_additem(iMenu, "\y»\wProfil\d/\wBeállítások^n^n", "6", 0);
991
992 formatex(sText, charsmax(sText), "\dSzinted: \r%s^n\d%s", cRanks[g_ePlayer[eRank][id]][eName], Website);
993 menu_addtext2(iMenu, sText);
994 formatex(sText, charsmax(sText), "\wHa bármi bugot/játékmenet hibát találsz keressed fel Raint.");
995 menu_addtext2(iMenu, sText);
996
997 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
998 menu_setprop(iMenu, MPROP_PERPAGE, 0);
999 menu_display(id, iMenu, 0);
1000}
1001public m_mainmenu_h(id, iMenu, iItem)
1002{
1003 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1004
1005 new sData[10], sName[64];
1006 new iAccess, iCallback;
1007 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1008 new iKey = str_to_num(sData);
1009
1010 switch(iKey)
1011 {
1012 case 1: RaktarEloszto(id);
1013 case 2: LadaNyitas(id);
1014 case 3: Piac(id);
1015 case 4: m_kuldetesek(id);
1016 case 5: Szerencsekerek(id, 0);
1017 case 6: Beallitasok(id);
1018 case 9: {menu_destroy(iMenu);return;}
1019
1020 }
1021}
1022public Piac(id)
1023{
1024 new sText[256];
1025 format(sText, charsmax(sText), "%s^nÁruház", get_mprefix());
1026 new iMenu = menu_create(sText, "Piac_h");
1027
1028 menu_additem(iMenu, "Skincsere \d-\r Hamarosan", "1", 0);
1029 menu_additem(iMenu, "Szerverbolt", "2", 0);
1030 menu_additem(iMenu, "Küldés", "3", 0);
1031 menu_additem(iMenu, "Piac", "4", 0);
1032
1033 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1034 menu_display(id, iMenu, 0);
1035}
1036public Piac_h(id, iMenu, iItem)
1037{
1038 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1039
1040 new sData[10], sName[64];
1041 new iAccess, iCallback;
1042 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1043 new iKey = str_to_num(sData);
1044
1045 switch(iKey)
1046 {
1047 case 1: Piac(id);
1048 case 2: Szerverbolt(id);
1049 case 3: Kuldesm(id);
1050 case 4: modsys_marketsellorbuy(id);
1051 }
1052}
1053public modsys_marketsellorbuy(id)
1054{
1055 new Menustring[256];
1056 formatex(Menustring, charsmax(Menustring), "%s^n\dKereskedés", get_mprefix());
1057 new menu = menu_create(Menustring, "modsys_marketsellorbuy_h");
1058
1059 formatex(Menustring, charsmax(Menustring), "Eladás");
1060 menu_additem(menu, Menustring, "0", 0);
1061 formatex(Menustring, charsmax(Menustring), "Vásárlás");
1062 menu_additem(menu, Menustring, "1", 0);
1063
1064 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1065 menu_display(id, menu, 0);
1066}
1067public modsys_marketsellorbuy_h(id, menu, item)
1068{
1069 if(item == MENU_EXIT)
1070 {
1071 menu_destroy(menu);
1072 return PLUGIN_HANDLED;
1073 }
1074 new Data[6], Name[64], Access, Key;
1075 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1076 Key = str_to_num(Data);
1077
1078 switch(Key)
1079 {
1080 case 0: market_sell(id);
1081 case 1: market_buy(id);
1082 }
1083 menu_destroy(menu);
1084 return PLUGIN_HANDLED;
1085
1086}
1087public market_buy(id)
1088{
1089 new Menustring[256];
1090 formatex(Menustring, charsmax(Menustring), "%s^n\dVásárlás", get_mprefix());
1091 new menu = menu_create(Menustring, "market_buy_h");
1092
1093 formatex(Menustring, charsmax(Menustring), "AWP vásárlás");
1094 menu_additem(menu, Menustring, "0", 0);
1095 formatex(Menustring, charsmax(Menustring), "KÉS vásárlás");
1096 menu_additem(menu, Menustring, "1", 0);
1097
1098 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1099 menu_display(id, menu, 0);
1100}
1101public market_buy_h(id, menu, item)
1102{
1103 if(item == MENU_EXIT)
1104 {
1105 menu_destroy(menu);
1106 return PLUGIN_HANDLED;
1107 }
1108 new Data[6], Name[64], Access, Key;
1109 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1110 Key = str_to_num(Data);
1111
1112 switch(Key)
1113 {
1114 case 0: market_buy_awp(id);
1115 case 1: market_buy_knife(id);
1116 }
1117 menu_destroy(menu);
1118 return PLUGIN_HANDLED;
1119
1120}
1121public market_sell(id)
1122{
1123 new Menustring[256];
1124 formatex(Menustring, charsmax(Menustring), "%s^n\dEladás", get_mprefix());
1125 new menu = menu_create(Menustring, "market_sell_h");
1126
1127 if(gSkinSell[0][id] == 0)
1128 {
1129 formatex(Menustring, charsmax(Menustring), "AWP kiválasztása");
1130 menu_additem(menu, Menustring, "0", 0);
1131 }
1132 if(gSkinSell[0][id] != 0 && gSkinPrize[0][id] != 0 && gSkinSold[0][id] == 0)
1133 {
1134 formatex(Menustring, charsmax(Menustring), "AWP Kirakása a piacra, %s | %d(nyomd meg az egyes gombot.)", cAwpSkin[gSkinSell[0][id]][eWeaponName], gSkinPrize[0][id]);
1135 menu_additem(menu, Menustring, "0", 0);
1136 }
1137 if(gSkinSold[0][id] == 1)
1138 {
1139 formatex(Menustring, charsmax(Menustring), "Leveszem a piacról ezt: %s | %d", cAwpSkin[gSkinSell[0][id]][eWeaponName], gSkinPrize[0][id]);
1140 menu_additem(menu, Menustring, "0", 0);
1141 }
1142
1143 if(gSkinSell[1][id] == 0)
1144 {
1145 formatex(Menustring, charsmax(Menustring), "KÉS Kiválasztása");
1146 menu_additem(menu, Menustring, "1", 0);
1147 }
1148 if(gSkinSell[1][id] != 0 && gSkinPrize[1][id] != 0 && gSkinSold[1][id] == 0)
1149 {
1150 formatex(Menustring, charsmax(Menustring), "Kés Kirakása a piacra, %s | %d(nyomdmeg a kettes gombot.)", cKnifeSkin[gSkinSell[1][id]][eWeaponName], gSkinPrize[1][id]);
1151 menu_additem(menu, Menustring, "1", 0);
1152 }
1153 if(gSkinSold[1][id] == 1)
1154 {
1155 formatex(Menustring, charsmax(Menustring), "Leveszem a piacról ezt: %s | %d", cKnifeSkin[gSkinSell[1][id]][eWeaponName], gSkinPrize[1][id]);
1156 menu_additem(menu, Menustring, "1", 0);
1157 }
1158
1159 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1160 menu_display(id, menu, 0);
1161}
1162public market_sell_h(id, menu, item)
1163{
1164 if(item == MENU_EXIT)
1165 {
1166 menu_destroy(menu);
1167 return PLUGIN_HANDLED;
1168 }
1169 new Data[6], Name[64], Access, Key;
1170 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1171 Key = str_to_num(Data);
1172 new sName[MAX_NAME_LENGTH];
1173
1174 get_user_name(id, sName, charsmax(sName));
1175 switch(Key)
1176 {
1177 case 0:
1178 {
1179 if(gSkinSell[0][id] != 0 && gSkinPrize[0][id] != 0 && gSkinSold[0][id] == 1)
1180 {
1181 gSkinPrize[0][id] = 0;
1182 gSkinSell[0][id] = 0;
1183 gSkinSold[0][id] = 0;
1184 client_print_color(0, print_team_default, "^4%s^3 %s^1 levette az awp skinjét a piacról!", get_cprefix(), sName);
1185 market_sell(id);
1186 return PLUGIN_HANDLED;
1187 }
1188 if(gSkinSell[0][id] != 0 && gSkinPrize[0][id] != 0)
1189 {
1190 if(gSkinSell[0][id] != 0)
1191 {
1192 gSkinSold[0][id] = 1;
1193 client_print_color(0, print_team_default, "^4%s^3 %s^1 kirakott a piacra egy^3 %s^1 skint,^3 %d^1 Forintért!", get_cprefix(), sName, cAwpSkin[gSkinSell[0][id]][eWeaponName], gSkinPrize[0][id]);
1194 }
1195 return PLUGIN_HANDLED;
1196 }
1197 market_sell_awp(id);
1198 return PLUGIN_HANDLED;
1199 }
1200 case 1:
1201 {
1202 if(gSkinSell[1][id] != 0 && gSkinPrize[1][id] != 0 && gSkinSold[1][id] == 1)
1203 {
1204 gSkinPrize[1][id] = 0;
1205 gSkinSell[1][id] = 0;
1206 gSkinSold[1][id] = 0;
1207 client_print_color(0, print_team_default, "^4%s^3 %s^1 levette a kés skinjet a piacról!", get_cprefix(), sName);
1208 market_sell(id);
1209 return PLUGIN_HANDLED;
1210 }
1211 if(gSkinSell[1][id] != 0 && gSkinPrize[1][id] != 0)
1212 {
1213 if(gSkinSell[1][id] != 0)
1214 {
1215 gSkinSold[1][id] = 1;
1216 client_print_color(0, print_team_default, "^4%s^3 %s^1 kirakott a piacra egy^3 %s^1 skint,^3 %d^1 Forintért!", get_cprefix(), sName, cKnifeSkin[gSkinSell[1][id]][eWeaponName], gSkinPrize[1][id]);
1217 }
1218 return PLUGIN_HANDLED;
1219 }
1220 market_sell_knife(id);
1221 return PLUGIN_HANDLED;
1222 }
1223 }
1224 menu_destroy(menu);
1225 return PLUGIN_HANDLED;
1226}
1227////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1228public market_sell_awp(id)
1229{
1230 new Menustring[256], Row[7];
1231 formatex(Menustring, charsmax(Menustring), "%s^n\dEladás AWP", get_mprefix());
1232 new menu = menu_create(Menustring, "market_sell_awp_h");
1233
1234 if(gSkinSell[0][id] != 0)
1235 {
1236 formatex(Menustring, charsmax(Menustring), "\ySkin beárazása");
1237 menu_additem(menu, Menustring, "0", 0);
1238
1239 }
1240 if(gSkinSell[0][id] == 0)
1241 {
1242 for(new i = 1; i < sizeof(cAwpSkin); i++)
1243 {
1244 if(g_iAllWp[i][id] > 0)
1245 {
1246 num_to_str(i, Row, 7);
1247 formatex(Menustring, charsmax(Menustring), "\y%s \y[\r%dDB\y]", cAwpSkin[i][eWeaponName], g_iAllWp[i][id]);
1248 menu_additem(menu, Menustring, Row);
1249 }
1250 }
1251 }
1252 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1253 menu_display(id, menu, 0);
1254}
1255public market_sell_awp_h(id, menu, item)
1256{
1257 if(item == MENU_EXIT)
1258 {
1259 menu_destroy(menu);
1260 return PLUGIN_HANDLED;
1261 }
1262 new Data[6], Name[64], Access, Key;
1263 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1264 Key = str_to_num(Data);
1265
1266 if(Key == 0 && gSkinSell[0][id] != 0)
1267 {
1268 client_cmd(id, "messagemode type_awpskin_prize");
1269 }
1270 if(gSkinSell[0][id] == 0)
1271 {
1272 gSkinSell[0][id] = Key;
1273 market_sell_awp(id);
1274 }
1275 menu_destroy(menu);
1276 return PLUGIN_HANDLED;
1277
1278}
1279public market_sell_awp_prize(id)
1280{
1281 new sellprize[128];
1282 read_args(sellprize, charsmax(sellprize));
1283 remove_quotes(sellprize);
1284
1285 new iPrize;
1286
1287 iPrize = str_to_num(sellprize);
1288
1289 if(iPrize == 0)
1290 {
1291 client_print_color(id, print_team_default, "^4%s^1 Nem írtál semmilyen összeget!", get_cprefix());
1292 market_sell_awp(id);
1293 return PLUGIN_HANDLED;
1294 }
1295 if(iPrize < 1500)
1296 {
1297 client_print_color(id, print_team_default, "^4%s^1 A skin árának minumum 1500 Forintnak kell lennie!", get_cprefix());
1298 market_sell_awp(id);
1299 return PLUGIN_HANDLED;
1300 }
1301 else
1302 {
1303 gSkinPrize[0][id] = iPrize;
1304 market_sell(id);
1305 }
1306 return PLUGIN_CONTINUE;
1307}
1308public market_buy_awp(id)
1309{
1310 new Menustring[256], Row[7];
1311 static players[32], pnum;
1312 get_players(players, pnum, "c");
1313 formatex(Menustring, charsmax(Menustring), "%s^n\dVasarlas AWP", get_mprefix());
1314 new menu = menu_create(Menustring, "market_buy_awp_h");
1315 new SellerName[MAX_NAME_LENGTH];
1316
1317 for(new i; i < pnum; i++)
1318 {
1319 if(gSkinSold[0][players[i]] == 1 && gSkinPrize[0][players[i]] != 0)
1320 {
1321 if(gSkinSell[0][players[i]] != 0)
1322 {
1323 get_user_name(players[i], SellerName, charsmax(SellerName));
1324 formatex(Menustring, charsmax(Menustring),"\d%s Ára: %d | Eladó neve: %s", cAwpSkin[gSkinSell[0][players[i]]][eWeaponName], gSkinPrize[0][players[i]], SellerName);
1325 }
1326 num_to_str(players[i], Row, charsmax(Row));
1327 menu_additem(menu, Menustring, Row);
1328 }
1329 }
1330 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1331 menu_display(id, menu, 0);
1332}
1333public market_buy_awp_h(id, menu, item)
1334{
1335 if(item == MENU_EXIT)
1336 {
1337 menu_destroy(menu);
1338 return PLUGIN_HANDLED;
1339 }
1340 new Data[6], Name[64], Access, Key;
1341 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1342 Key = str_to_num(Data);
1343 new sName[MAX_NAME_LENGTH], KeysName[MAX_NAME_LENGTH];
1344 get_user_name(id, sName, charsmax(sName));
1345 get_user_name(Key, KeysName, charsmax(KeysName));
1346
1347 if(g_ePlayer[eHungarianForint][id] < gSkinPrize[0][Key])
1348 {
1349 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő pénzed!", get_cprefix());
1350 return PLUGIN_HANDLED;
1351 }
1352
1353 if(gSkinSold[0][Key] == 1)
1354 {
1355 gSkinSold[0][Key] = 0;
1356 client_print_color(0, print_team_default, "^4%s^3 %s^1 vett egy^3 %s^1 AWP skint,^3 %s^1tól/től,^3 %d^1 Forintért!", get_cprefix(), sName, cAwpSkin[gSkinSell[0][Key]][eWeaponName], KeysName, gSkinPrize[0][Key]);
1357 g_ePlayer[eHungarianForint][Key] += gSkinPrize[0][Key];g_ePlayer[eHungarianForint][id] -= gSkinPrize[0][Key];
1358 g_iAllWp[gSkinSell[0][Key]][id]++;g_iAllWp[gSkinSell[0][Key]][Key]--;
1359 gSkinSell[0][Key] = 0;
1360 gSkinPrize[0][Key] = 0;
1361 return PLUGIN_HANDLED;
1362 }
1363 menu_destroy(menu);
1364 return PLUGIN_HANDLED;
1365}
1366////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1367public market_sell_knife(id)
1368{
1369 new Menustring[256], Row[7];
1370 formatex(Menustring, charsmax(Menustring), "%s^n\dEladas Kés", get_mprefix());
1371 new menu = menu_create(Menustring, "market_sell_knife_h");
1372
1373 if(gSkinSell[1][id] != 0)
1374 {
1375 formatex(Menustring, charsmax(Menustring), "\ySkin beárazása");
1376 menu_additem(menu, Menustring, "0", 0);
1377
1378 }
1379 if(gSkinSell[1][id] == 0)
1380 {
1381 for(new i = 1; i < sizeof(cKnifeSkin); i++)
1382 {
1383 if(g_iAllKnife[i][id] > 0)
1384 {
1385 num_to_str(i, Row, 7);
1386 formatex(Menustring, charsmax(Menustring), "\y%s \y[\r%dDB\y]", cKnifeSkin[i][eWeaponName], g_iAllKnife[i][id]);
1387 menu_additem(menu, Menustring, Row);
1388 }
1389 }
1390 }
1391 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1392 menu_display(id, menu, 0);
1393}
1394public market_sell_knife_h(id, menu, item)
1395{
1396 if(item == MENU_EXIT)
1397 {
1398 menu_destroy(menu);
1399 return PLUGIN_HANDLED;
1400 }
1401 new Data[6], Name[64], Access, Key;
1402 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1403 Key = str_to_num(Data);
1404
1405 if(Key == 0 && gSkinSell[1][id] != 0)
1406 {
1407 client_cmd(id, "messagemode type_knifeskin_prize");
1408 }
1409 if(gSkinSell[1][id] == 0)
1410 {
1411 gSkinSell[1][id] = Key;
1412 market_sell_knife(id);
1413 }
1414 menu_destroy(menu);
1415 return PLUGIN_HANDLED;
1416
1417}
1418public market_sell_knife_prize(id)
1419{
1420 new sellprize[128];
1421 read_args(sellprize, charsmax(sellprize));
1422 remove_quotes(sellprize);
1423
1424 new iPrize;
1425
1426 iPrize = str_to_num(sellprize);
1427
1428 if(iPrize == 0)
1429 {
1430 client_print_color(id, print_team_default, "^4%s^1 Nem írtál semmilyen összeget!", get_cprefix());
1431 market_sell_knife(id);
1432 return PLUGIN_HANDLED;
1433 }
1434 if(iPrize < 2000)
1435 {
1436 client_print_color(id, print_team_default, "^4%s ^1 A skin árának minumum 2000 Forintnak kell lennie!", get_cprefix());
1437 market_sell_knife(id);
1438 return PLUGIN_HANDLED;
1439 }
1440 else
1441 {
1442 gSkinPrize[1][id] = iPrize;
1443 market_sell(id);
1444 }
1445 return PLUGIN_CONTINUE;
1446}
1447public market_buy_knife(id)
1448{
1449 new Menustring[256], Row[7];
1450 static players[32], pnum;
1451 get_players(players, pnum, "c");
1452 formatex(Menustring, charsmax(Menustring), "%s^n\dVásárlás Kés", get_mprefix());
1453 new menu = menu_create(Menustring, "market_buy_knife_h");
1454 new SellerName[MAX_NAME_LENGTH];
1455
1456 for(new i; i < pnum; i++)
1457 {
1458 if(gSkinSold[1][players[i]] == 1 && gSkinPrize[1][players[i]] != 0)
1459 {
1460 if(gSkinSell[1][players[i]] != 0)
1461 {
1462 get_user_name(players[i], SellerName, charsmax(SellerName));
1463 formatex(Menustring, charsmax(Menustring),"\d%s Ára: %d | Eladó neve: %s", cKnifeSkin[gSkinSell[1][players[i]]][eWeaponName], gSkinPrize[1][players[i]], SellerName);
1464 }
1465 num_to_str(players[i], Row, charsmax(Row));
1466 menu_additem(menu, Menustring, Row);
1467 }
1468 }
1469 menu_setprop(menu, MPROP_EXITNAME, "\wKilépés");
1470 menu_display(id, menu, 0);
1471}
1472public market_buy_knife_h(id, menu, item)
1473{
1474 if(item == MENU_EXIT)
1475 {
1476 menu_destroy(menu);
1477 return PLUGIN_HANDLED;
1478 }
1479 new Data[6], Name[64], Access, Key;
1480 menu_item_getinfo(menu, item, Access, Data, charsmax(Data), Name, charsmax(Name));
1481 Key = str_to_num(Data);
1482 new sName[MAX_NAME_LENGTH], KeysName[MAX_NAME_LENGTH];
1483 get_user_name(id, sName, charsmax(sName));
1484 get_user_name(Key, KeysName, charsmax(KeysName));
1485
1486 if(g_ePlayer[eHungarianForint][id] < gSkinPrize[1][Key])
1487 {
1488 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő pénzed!", get_cprefix());
1489 return PLUGIN_HANDLED;
1490 }
1491
1492 if(gSkinSold[1][Key] == 1)
1493 {
1494 gSkinSold[1][Key] = 0;
1495 client_print_color(0, print_team_default, "^4%s^3 %s^1 vett egy^3 %s^1 Kés skint,^3 %s^1tól/től,^3 %d ^1Forintért!", get_cprefix(), sName, cKnifeSkin[gSkinSell[1][Key]][eWeaponName], KeysName, gSkinPrize[1][Key]);
1496 g_ePlayer[eHungarianForint][Key] += gSkinPrize[1][Key];g_ePlayer[eHungarianForint][id] -= gSkinPrize[1][Key];
1497 g_iAllKnife[gSkinSell[1][Key]][id]++;g_iAllKnife[gSkinSell[1][Key]][Key]--;
1498 gSkinSell[1][Key] = 0;
1499 gSkinPrize[1][Key] = 0;
1500 return PLUGIN_HANDLED;
1501 }
1502 menu_destroy(menu);
1503 return PLUGIN_HANDLED;
1504
1505}
1506public Kuldesm(id)
1507{
1508 new sText[256];
1509 format(sText, charsmax(sText), "%s^nKüldés", get_mprefix());
1510 new iMenu = menu_create(sText, "Kuldesm_h");
1511
1512 menu_additem(iMenu, "PP küldés", "1", 0);
1513 menu_additem(iMenu, "Forint küldés", "2", 0);
1514 menu_additem(iMenu, "Skin küldés", "3", 0);
1515 menu_additem(iMenu, "Láda/Kulcs küldés", "4", 0);
1516
1517 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1518 menu_display(id, iMenu, 0);
1519}
1520public Kuldesm_h(id, iMenu, iItem)
1521{
1522 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1523
1524 new sData[10], sName[64];
1525 new iAccess, iCallback;
1526 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1527 new iKey = str_to_num(sData);
1528
1529 switch(iKey)
1530 {
1531 case 1: {client_cmd(id, "messagemode type_pp"); g_eMarketAll[eMarketNum] = 0;}
1532 case 2: {client_cmd(id, "messagemode type_Hunf"); g_eMarketAll[eMarketNum] = 1;}
1533 case 3: Melyikskin(id);
1534 //case 4: Piac(id);
1535 }
1536}
1537public Melyikskin(id)
1538{
1539 new sText[256];
1540 format(sText, charsmax(sText), "%s^nVálassz típust", get_mprefix());
1541 new iMenu = menu_create(sText, "Melyikskin_h");
1542
1543 menu_additem(iMenu, "AWP skin", "1", 0);
1544 menu_additem(iMenu, "Kés skin", "2", 0);
1545
1546 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1547 menu_display(id, iMenu, 0);
1548}
1549public Melyikskin_h(id, iMenu, iItem)
1550{
1551 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1552
1553 new sData[10], sName[64];
1554 new iAccess, iCallback;
1555 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1556 new iKey = str_to_num(sData);
1557
1558 switch(iKey)
1559 {
1560 case 1:
1561 {
1562 awpraktar(id);
1563 g_eMarketAll[eMarketNum] = 3;
1564 }
1565 case 2:
1566 {
1567 kesraktar(id);
1568 g_eMarketAll[eMarketNum] = 4;
1569 }
1570 }
1571}
1572public type_pp_p(id)
1573{
1574 new sPP[32], iPP;
1575 read_args(sPP, charsmax(sPP));
1576 remove_quotes(sPP);
1577
1578 iPP = str_to_num(sPP);
1579
1580 if(iPP > g_ePlayer[ePP][id])
1581 {
1582 client_print_color(id, print_team_default, "^4%s ^1Nincs ennyi PPd.", get_cprefix());
1583 return PLUGIN_HANDLED;
1584 }
1585
1586 g_eMarketAll[eNumberofsendItem] = iPP;
1587 valasszjatekost(id);
1588 return PLUGIN_HANDLED;
1589}
1590public type_Hunf_p(id)
1591{
1592 new sHunf[32], iHunf;
1593 read_args(sHunf, charsmax(sHunf));
1594 remove_quotes(sHunf);
1595
1596 iHunf = str_to_num(sHunf);
1597
1598 if(iHunf > g_ePlayer[eHungarianForint][id])
1599 {
1600 client_print_color(id, print_team_default, "^4%s ^1Nincs ennyi Forintod.", get_cprefix());
1601 return PLUGIN_HANDLED;
1602 }
1603
1604 g_eMarketAll[eNumberofsendItem] = iHunf;
1605 valasszjatekost(id);
1606 return PLUGIN_HANDLED;
1607}
1608public valasszjatekost(id)
1609{
1610 new sText[256], iRow[7];
1611 static iPlayers[32], iNum, sName[64];
1612 format(sText, charsmax(sText), "%s^nKüldés", get_mprefix());
1613 new iMenu = menu_create(sText, "valasszjatekost_h");
1614
1615 get_players(iPlayers, iNum, "c");
1616
1617 for(new i; i < iNum; i++)
1618 {
1619 get_user_name(iPlayers[i], sName, charsmax(sName));
1620 formatex(sText, charsmax(sText), "\d%s", sName);
1621
1622 num_to_str(iPlayers[i], iRow, charsmax(iRow));
1623 menu_additem(iMenu, sText, iRow);
1624 }
1625 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1626 menu_display(id, iMenu, 0);
1627}
1628public valasszjatekost_h(id, iMenu, iItem)
1629{
1630 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1631
1632 new sData[10], sName[64], sReceiverName[64], sSender[64];
1633 new iAccess, iCallback;
1634 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1635 new iKey = str_to_num(sData);
1636
1637 get_user_name(iKey, sReceiverName, charsmax(sReceiverName));
1638 get_user_name(id, sSender, charsmax(sSender));
1639
1640 if(g_eMarketAll[eMarketNum] == 0)
1641 {
1642 g_ePlayer[ePP][iKey]+=g_eMarketAll[eNumberofsendItem];
1643 g_ePlayer[ePP][id]-=g_eMarketAll[eNumberofsendItem];
1644 client_print_color(0, print_team_default, "^4%s^1 %s küldött %s-nak/nek %d PPt!", get_cprefix(), sSender, sReceiverName, g_eMarketAll[eNumberofsendItem]);
1645 g_eMarketAll[eMarketNum] = -1;
1646 }
1647 else if(g_eMarketAll[eMarketNum] == 1)
1648 {
1649 g_ePlayer[eHungarianForint][iKey]+=g_eMarketAll[eNumberofsendItem];
1650 g_ePlayer[eHungarianForint][id]-=g_eMarketAll[eNumberofsendItem];
1651 client_print_color(0, print_team_default, "^4%s^1 %s küldött %s-nak/nek %d Forintot!", get_cprefix(), sSender, sReceiverName, g_eMarketAll[eNumberofsendItem]);
1652 g_eMarketAll[eMarketNum] = -1;
1653 }
1654 else if(g_eMarketAll[eMarketNum] == 3)
1655 {
1656 g_iAllWp[g_eMarketAll[eNumberofsendItem]][iKey]++;
1657 g_iAllWp[g_eMarketAll[eNumberofsendItem]][id]--;
1658 client_print_color(0, print_team_default, "^4%s^1 %s küldött %s-nak/nek %s skint!", get_cprefix(), sSender, sReceiverName, cAwpSkin[g_eMarketAll[eNumberofsendItem]][eWeaponName]);
1659 g_eMarketAll[eMarketNum] = -1;
1660 }
1661 else if(g_eMarketAll[eMarketNum] == 4)
1662 {
1663 g_iAllKnife[g_eMarketAll[eNumberofsendItem]][iKey]++;
1664 g_iAllKnife[g_eMarketAll[eNumberofsendItem]][id]--;
1665 client_print_color(0, print_team_default, "^4%s^1 %s küldött %s-nak/nek %s skint!", get_cprefix(), sSender, sReceiverName, cKnifeSkin[g_eMarketAll[eNumberofsendItem]][eWeaponName]);
1666 g_eMarketAll[eMarketNum] = -1;
1667 }
1668 else if(g_eMarketAll[eMarketNum] == -1)
1669 {
1670 client_print_color(0, print_team_default, "^4%s^1 Ha ezt az üzenetet látod akkor valami rossz, kérlek jelezzed a Tulajnak.", get_cprefix());
1671 return;
1672 }
1673}
1674public Szerverbolt(id)
1675{
1676 new sText[256], iValue[15];
1677 format(sText, charsmax(sText), "%s^nSzerverbolt | %d Forint %d PP", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
1678 new iMenu = menu_create(sText, "Szerverbolt_h");
1679
1680 iValue[0] = g_ePlayer[eVIP][id] > get_systime() ? 1000:5000;//awp lada forint
1681 iValue[1] = g_ePlayer[eVIP][id] > get_systime() ? 3000:8000;//kes lada forint
1682 iValue[2] = g_ePlayer[eVIP][id] > get_systime() ? 500:2000;//pp pont forint
1683 iValue[3] = g_ePlayer[eVIP][id] > get_systime() ? 2000:8000;//awp lada kulcs forint
1684 iValue[4] = g_ePlayer[eVIP][id] > get_systime() ? 6000:12000;//kes lada kulcs forint
1685 iValue[5] = g_ePlayer[eVIP][id] > get_systime() ? 2000:6000;//1 het vip pp
1686 iValue[6] = g_ePlayer[eVIP][id] > get_systime() ? 6000:18000;//1 honap vip pp
1687 iValue[7] = g_ePlayer[eVIP][id] > get_systime() ? 18000:25000;//örök vip pp
1688 iValue[8] = g_ePlayer[eVIP][id] > get_systime() ? 500:1000;//random awp skin pp
1689 iValue[9] = g_ePlayer[eVIP][id] > get_systime() ? 1500:4000;//random kes skin pp
1690 iValue[10] = g_ePlayer[eVIP][id] > get_systime() ? 500:2000;//+50xp pp
1691 iValue[11] = g_ePlayer[eVIP][id] > get_systime() ? 200:1500;//+1 kill pp
1692 iValue[12] = g_ePlayer[eVIP][id] > get_systime() ? 40000:150000;//+1 szint Forint
1693 iValue[13] = g_ePlayer[eVIP][id] > get_systime() ? 1000:2500;//5pp forint forint
1694 iValue[14] = g_ePlayer[eVIP][id] > get_systime() ? 10:30;//1000 forint pp
1695
1696 formatex(sText, charsmax(sText), "Awp láda\d |\w %d Forint", iValue[0]);
1697 menu_additem(iMenu, sText, "1");
1698 formatex(sText, charsmax(sText), "Kés láda\d |\w %d Forint", iValue[1]);
1699 menu_additem(iMenu, sText, "2");
1700 formatex(sText, charsmax(sText), "+1 PP pont\d |\w %d Forint", iValue[2]);
1701 menu_additem(iMenu, sText, "3");
1702 formatex(sText, charsmax(sText), "Awp láda kulcs\d |\w %d Forint", iValue[3]);
1703 menu_additem(iMenu, sText, "4");
1704 formatex(sText, charsmax(sText), "Kés láda kulcs\d |\w %d Forint", iValue[4]);
1705 menu_additem(iMenu, sText, "5");
1706 formatex(sText, charsmax(sText), "1 hét VIP\d |\w %d PP", iValue[5]);
1707 menu_additem(iMenu, sText, "6");
1708 formatex(sText, charsmax(sText), "1 hónap VIP\d |\w %d PP", iValue[6]);
1709 menu_additem(iMenu, sText, "7");
1710 formatex(sText, charsmax(sText), "Örök VIP\d |\w %d PP", iValue[7]);
1711 menu_additem(iMenu, sText, "8");
1712 formatex(sText, charsmax(sText), "Random AWP skin\d |\w %d PP", iValue[8]);
1713 menu_additem(iMenu, sText, "9");
1714 formatex(sText, charsmax(sText), "Random KÉS skin\d |\w %d PP", iValue[9]);
1715 menu_additem(iMenu, sText, "10");
1716 formatex(sText, charsmax(sText), "+50 XP\d |\w %d PP", iValue[10]);
1717 menu_additem(iMenu, sText, "11");
1718 formatex(sText, charsmax(sText), "+1 kill\d |\w %d PP", iValue[11]);
1719 menu_additem(iMenu, sText, "12");
1720 formatex(sText, charsmax(sText), "+1 szint\d |\w %d Forint", iValue[12]);
1721 menu_additem(iMenu, sText, "13");
1722 formatex(sText, charsmax(sText), "5 PP\d |\w %d Forint", iValue[13]);
1723 menu_additem(iMenu, sText, "14");
1724 formatex(sText, charsmax(sText), "1000 Forint\d |\w %d PP", iValue[14]);
1725 menu_additem(iMenu, sText, "15");
1726
1727 menu_setprop(iMenu, MPROP_NEXTNAME, "Következő");
1728 menu_setprop(iMenu, MPROP_BACKNAME, "Vissza");
1729 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1730 menu_display(id, iMenu, 0);
1731}
1732public Szerverbolt_h(id, iMenu, iItem)
1733{
1734 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1735
1736 new sData[10], sName[64], iValue[15];
1737 new iAccess, iCallback;
1738 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1739 new iKey = str_to_num(sData);
1740
1741 iValue[0] = g_ePlayer[eVIP][id] > get_systime() ? 1000:5000;//awp lada forint w
1742 iValue[1] = g_ePlayer[eVIP][id] > get_systime() ? 3000:8000;//kes lada forint w
1743 iValue[2] = g_ePlayer[eVIP][id] > get_systime() ? 500:2000;//pp pont forint w
1744 iValue[3] = g_ePlayer[eVIP][id] > get_systime() ? 2000:8000;//awp lada kulcs forint w
1745 iValue[4] = g_ePlayer[eVIP][id] > get_systime() ? 6000:12000;//kes lada kulcs forint w
1746 iValue[5] = g_ePlayer[eVIP][id] > get_systime() ? 2000:6000;//1 het vip pp w
1747 iValue[6] = g_ePlayer[eVIP][id] > get_systime() ? 6000:18000;//1 honap vip pp w
1748 iValue[7] = g_ePlayer[eVIP][id] > get_systime() ? 18000:25000;//örök vip pp
1749 iValue[8] = g_ePlayer[eVIP][id] > get_systime() ? 500:1000;//random awp skin pp
1750 iValue[9] = g_ePlayer[eVIP][id] > get_systime() ? 1500:4000;//random kes skin pp
1751 iValue[10] = g_ePlayer[eVIP][id] > get_systime() ? 500:2000;//+50xp pp
1752 iValue[11] = g_ePlayer[eVIP][id] > get_systime() ? 200:1500;//+1 kill pp
1753 iValue[12] = g_ePlayer[eVIP][id] > get_systime() ? 40000:150000;//+1 szint Forint
1754 iValue[13] = g_ePlayer[eVIP][id] > get_systime() ? 1000:2500;//5pp forint forint
1755 iValue[14] = g_ePlayer[eVIP][id] > get_systime() ? 10:30;//1000 forint pp
1756
1757 switch(iKey)
1758 {
1759 case 1:
1760 {
1761 if(g_ePlayer[eHungarianForint][id] < iValue[0])
1762 {
1763 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1764 return;
1765 }
1766
1767 g_iChest[0][id]++;
1768 client_print_color(id, print_team_default, "^4%s^1 Vettél egy awp ládát.", get_cprefix());
1769 g_ePlayer[eHungarianForint][id] -= iValue[0];
1770 }
1771 case 2:
1772 {
1773 if(g_ePlayer[eHungarianForint][id] < iValue[1])
1774 {
1775 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1776 return;
1777 }
1778
1779 g_iChest[1][id]++;
1780 client_print_color(id, print_team_default, "^4%s^1 Vettél egy kés ládát.", get_cprefix());
1781 g_ePlayer[eHungarianForint][id] -= iValue[1];
1782 }
1783 case 3:
1784 {
1785 if(g_ePlayer[eHungarianForint][id] < iValue[2])
1786 {
1787 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1788 return;
1789 }
1790
1791 g_ePlayer[ePP][id]++;
1792 client_print_color(id, print_team_default, "^4%s^1 Vettél +1 PPt.", get_cprefix());
1793 g_ePlayer[eHungarianForint][id] -= iValue[2];
1794 }
1795 case 4:
1796 {
1797 if(g_ePlayer[eHungarianForint][id] < iValue[3])
1798 {
1799 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1800 return;
1801 }
1802
1803 g_iKey[0][id]++;
1804 client_print_color(id, print_team_default, "^4%s^1 Vettél egy awp láda kulcsot.", get_cprefix());
1805 g_ePlayer[eHungarianForint][id] -= iValue[3];
1806 }
1807 case 5:
1808 {
1809 if(g_ePlayer[eHungarianForint][id] < iValue[4])
1810 {
1811 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1812 return;
1813 }
1814
1815 g_iKey[1][id]++;
1816 client_print_color(id, print_team_default, "^4%s^1 Vettél egy kés láda kulcsot.", get_cprefix());
1817 g_ePlayer[eHungarianForint][id] -= iValue[4];
1818 }
1819 case 6:
1820 {
1821 if(g_ePlayer[eVIP][id] > get_systime())
1822 {
1823 client_print_color(id, print_team_default, "^4%s^1 Már vettél VIPet!", get_cprefix());
1824 return;
1825 }
1826 if(g_ePlayer[ePP][id] < iValue[5])
1827 {
1828 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1829 return;
1830 }
1831
1832 g_ePlayer[eVIP][id] = get_systime() + 86400*7;
1833 client_print_color(id, print_team_default, "^4%s^1 Vettél egy hét VIPet.", get_cprefix());
1834 g_ePlayer[ePP][id] -= iValue[5];
1835 }
1836 case 7:
1837 {
1838 if(g_ePlayer[eVIP][id] > get_systime())
1839 {
1840 client_print_color(id, print_team_default, "^4%s^1 Már vettél VIPet!", get_cprefix());
1841 return;
1842 }
1843 if(g_ePlayer[ePP][id] < iValue[6])
1844 {
1845 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1846 return;
1847 }
1848
1849 g_ePlayer[eVIP][id] = get_systime() + 86400*30;
1850 client_print_color(id, print_team_default, "^4%s^1 Vettél egy hónap VIPet.", get_cprefix());
1851 g_ePlayer[ePP][id] -= iValue[6];
1852 }
1853 case 8:
1854 {
1855 if(g_ePlayer[eVIP][id] > get_systime())
1856 {
1857 client_print_color(id, print_team_default, "^4%s^1 Már vettél VIPet!", get_cprefix());
1858 return;
1859 }
1860 if(g_ePlayer[ePP][id] < iValue[7])
1861 {
1862 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1863 return;
1864 }
1865
1866 g_ePlayer[eVIP][id] = get_systime() + 86400*9999;
1867 client_print_color(id, print_team_default, "^4%s^1 Örök vipet vettél.", get_cprefix());
1868 g_ePlayer[ePP][id] -= iValue[7];
1869 }
1870 case 9:
1871 {
1872 if(g_ePlayer[ePP][id] < iValue[8])
1873 {
1874 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1875 return;
1876 }
1877
1878 new iRnd = random_num(1, 77);
1879 g_iAllWp[iRnd][id]++;
1880 client_print_color(id, print_team_default, "^4%s^1 Kaptál random egy %s awp skint.", get_cprefix(), cAwpSkin[iRnd][eWeaponName]);
1881 g_ePlayer[ePP][id] -= iValue[8];
1882 }
1883 case 10:
1884 {
1885 if(g_ePlayer[ePP][id] < iValue[9])
1886 {
1887 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1888 return;
1889 }
1890
1891 new iRnd = random_num(1, 51);
1892 g_iAllKnife[iRnd][id]++;
1893 client_print_color(id, print_team_default, "^4%s^1 Kaptál random egy %s kés skint.", get_cprefix(), cKnifeSkin[iRnd][eWeaponName]);
1894 g_ePlayer[ePP][id] -= iValue[9];
1895 }
1896 case 11:
1897 {
1898 if(g_ePlayer[ePP][id] < iValue[10])
1899 {
1900 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1901 return;
1902 }
1903
1904 g_ePlayer[eXp][id] += 50;
1905 client_print_color(id, print_team_default, "^4%s^1 Vettél +50xpt.", get_cprefix());
1906 g_ePlayer[ePP][id] -= iValue[10];
1907 }
1908 case 12:
1909 {
1910 if(g_ePlayer[ePP][id] < iValue[11])
1911 {
1912 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1913 return;
1914 }
1915
1916 g_ePlayer[eKills][id]++;
1917 client_print_color(id, print_team_default, "^4%s^1 Vettél +1 killt.", get_cprefix());
1918 g_ePlayer[ePP][id] -= iValue[11];
1919 }
1920 case 13:
1921 {
1922 if(g_ePlayer[eHungarianForint][id] < iValue[12])
1923 {
1924 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1925 return;
1926 }
1927
1928 g_ePlayer[eLvl][id]++;
1929 client_print_color(id, print_team_default, "^4%s^1 Vettél +1 szintet.", get_cprefix());
1930 g_ePlayer[eHungarianForint][id] -= iValue[12];
1931 }
1932 case 14:
1933 {
1934 if(g_ePlayer[eHungarianForint][id] < iValue[13])
1935 {
1936 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő forintod!", get_cprefix());
1937 return;
1938 }
1939
1940 g_ePlayer[ePP][id]+=5;
1941 client_print_color(id, print_team_default, "^4%s^1 Átváltottál %d forintot 5ppre.", get_cprefix(), iValue[13]);
1942 g_ePlayer[eHungarianForint][id] -= iValue[13];
1943 }
1944 case 15:
1945 {
1946 if(g_ePlayer[ePP][id] < iValue[14])
1947 {
1948 client_print_color(id, print_team_default, "^4%s^1 Nincs elegendő PPd!", get_cprefix());
1949 return;
1950 }
1951
1952 g_ePlayer[eHungarianForint][id]+=1000;
1953 client_print_color(id, print_team_default, "^4%s^1 Átváltottál %d ppt 1000 forintra.", get_cprefix(), iValue[14]);
1954 g_ePlayer[eHungarianForint][id] -= iValue[14];
1955 }
1956 }
1957}
1958public Beallitasok(id)
1959{
1960 new sText[256];
1961 format(sText, charsmax(sText), "%s^nBeállítások", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
1962 new iMenu = menu_create(sText, "Beallitasok_h");
1963
1964 if(g_bSkinOFFON[id] == false)
1965 menu_additem(iMenu, "Skin: \rBekapcsolva", "1", 0);
1966 else
1967 menu_additem(iMenu, "Skin: \dKikapcsolva", "1", 0);
1968
1969 if(g_bHudOFFON[id] == false)
1970 menu_additem(iMenu, "Hud: \rBekapcsolva", "2", 0);
1971 else
1972 menu_additem(iMenu, "Hud: \dKikapcsolva", "2", 0);
1973
1974 if(g_iHudChange[id] == 0)
1975 menu_additem(iMenu, "Hud: \dVáltakozó^n", "3", 0);
1976 else if(g_iHudChange[id] == 1)
1977 menu_additem(iMenu, "Hud: \dElső^n", "3", 0);
1978 else if(g_iHudChange[id] == 2)
1979 menu_additem(iMenu, "Hud: \dMásodik^n", "3", 0);
1980 else if(g_iHudChange[id] == 3)
1981 menu_additem(iMenu, "Hud: \dHarmadik^n", "3", 0);
1982
1983 menu_additem(iMenu, "Jelszó megváltoztatása", "4", 0);
1984 menu_additem(iMenu, "Ajándék első regisztráció^n", "5", 0);
1985 menu_additem(iMenu, "Fiókinfó", "6", 0);
1986
1987 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1988 menu_display(id, iMenu, 0);
1989}
1990public Beallitasok_h(id, iMenu, iItem)
1991{
1992 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1993
1994 new sData[10], sName[64];
1995 new iAccess, iCallback;
1996 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1997 new iKey = str_to_num(sData);
1998
1999 switch(iKey)
2000 {
2001 case 1: Beallitasok_p(id, 0);
2002 case 2: Beallitasok_p(id, 1);
2003 case 3: Beallitasok_p(id, 2);
2004 case 4: { client_cmd(id, "say /changepw");}
2005 case 5: Beallitasok_p(id, 3);
2006 case 6: Informaciok(id);
2007 }
2008}
2009public Beallitasok_p(id, iNum)
2010{
2011 switch(iNum)
2012 {
2013 case 0:
2014 {
2015 if(g_bSkinOFFON[id] == false)
2016 {
2017 g_bSkinOFFON[id] = true;
2018 client_print_color(id, print_team_default, "^4%s^1 Kikapcsoltad a skineket.", get_cprefix());
2019 Beallitasok(id);
2020 }
2021 else
2022 {
2023 g_bSkinOFFON[id] = false;
2024 client_print_color(id, print_team_default, "^4%s^1 Bekapcsoltad a skineket.", get_cprefix());
2025 Beallitasok(id);
2026 }
2027 }
2028 case 1:
2029 {
2030 if(g_bHudOFFON[id] == false)
2031 {
2032 g_bHudOFFON[id] = true;
2033 client_print_color(id, print_team_default, "^4%s^1 Kikapcsoltad a hudot.", get_cprefix());
2034 Beallitasok(id);
2035 }
2036 else
2037 {
2038 g_bHudOFFON[id] = false;
2039 client_print_color(id, print_team_default, "^4%s^1 Bekapcsoltad a hudot.", get_cprefix());
2040 Beallitasok(id);
2041 }
2042 }
2043 case 2:
2044 {
2045 if(g_iHudChange[id] == 0)
2046 {
2047 g_iHudChange[id] = 1;
2048 client_print_color(id, print_team_default, "^4%s^1 Csak az első hudra váltottál.", get_cprefix());
2049 Beallitasok(id);
2050 }
2051 else if(g_iHudChange[id] == 1)
2052 {
2053 g_iHudChange[id] = 2;
2054 client_print_color(id, print_team_default, "^4%s^1 Csak a második hudra váltottál.", get_cprefix());
2055 Beallitasok(id);
2056 }
2057 else if(g_iHudChange[id] == 2)
2058 {
2059 g_iHudChange[id] = 3;
2060 client_print_color(id, print_team_default, "^4%s^1 Csak a harmadik hudra váltottál.", get_cprefix());
2061 Beallitasok(id);
2062 }
2063 else if(g_iHudChange[id] == 3)
2064 {
2065 g_iHudChange[id] = 0;
2066 client_print_color(id, print_team_default, "^4%s^1 Váltakozó hudra váltottál.", get_cprefix());
2067 Beallitasok(id);
2068 }
2069 }
2070 case 3:
2071 {
2072 if(g_iGift[id] == 0)
2073 {
2074 new iRnd[5];
2075 iRnd[0] = random_num(1, 105);
2076 iRnd[1] = random_num(1, 51);
2077 iRnd[2] = random_num(1000, 5000);
2078 iRnd[3] = random_num(200, 500);
2079
2080 g_iAllWp[iRnd[0]][id]++;
2081 g_iAllKnife[iRnd[1]][id]++;
2082 g_ePlayer[eHungarianForint][id] += iRnd[2];
2083 g_ePlayer[ePP][id] += iRnd[3];
2084 client_print_color(id, print_team_default, "^4%s^1 Ajándékba kaptál egy %s awp skint.", get_cprefix(), cAwpSkin[iRnd[0]][eWeaponName]);
2085 client_print_color(id, print_team_default, "^4%s^1 Ajándékba kaptál egy %s awp skint.", get_cprefix(), cKnifeSkin[iRnd[1]][eWeaponName]);
2086 client_print_color(id, print_team_default, "^4%s^1 Ajándékba kaptál %d Forintot és %d PP pontot.", get_cprefix(), iRnd[2], iRnd[3]);
2087 g_iGift[id] = 1;
2088 }
2089 else
2090 client_print_color(id, print_team_default, "^4%s^1 Ezt már egyszer aktiváltad.", get_cprefix());
2091
2092 }
2093 }
2094}
2095public KukaEloszto(id)
2096{
2097 new sText[256];
2098 format(sText, charsmax(sText), "%s^nKuka elosztó", get_mprefix());
2099 new iMenu = menu_create(sText, "KukaEloszto_h");
2100
2101 menu_additem(iMenu, "AWP Kuka", "1", 0);
2102 menu_additem(iMenu, "KÉS Kuka", "2", 0);
2103
2104 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
2105 menu_display(id, iMenu, 0);
2106}
2107public KukaEloszto_h(id, iMenu, iItem)
2108{
2109 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
2110
2111 new sData[10], sName[64];
2112 new iAccess, iCallback;
2113 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2114 new iKey = str_to_num(sData);
2115
2116 switch(iKey)
2117 {
2118 case 1: Kukaawp(id);
2119 case 2: Kukakes(id);
2120
2121 }
2122}
2123public Kukaawp(id)
2124{
2125 new sText[256], iRow[8];
2126 format(sText, charsmax(sText), "%s^nAwp Kuka \wOldal", get_mprefix());
2127 new iMenu = menu_create(sText, "Kukaawp_h");
2128
2129 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cAwpSkin[0][eWeaponName]);
2130 menu_additem(iMenu, sText, "0", 0);
2131 for(new i = 1; i < sizeof(cAwpSkin); i++)
2132 {
2133 if(g_iAllWp[i][id] > 0)
2134 {
2135 num_to_str(i, iRow, 7);
2136 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cAwpSkin[i][eWeaponName], g_iAllWp[i][id]);
2137 menu_additem(iMenu, sText,iRow);
2138 }
2139 }
2140 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
2141 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
2142 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
2143
2144 menu_display(id, iMenu, 0);
2145}
2146public Kukaawp_h(id, iMenu, iItem)
2147{
2148 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
2149
2150 new sData[10], sName[64];
2151 new iAccess, iCallback;
2152 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2153 new iKey = str_to_num(sData);
2154
2155 if(iKey == 0)
2156 {
2157 client_print_color(id, print_team_default, "^4%s^1 Az alap awpt nem törölheted.", get_cprefix());
2158 KukaEloszto(id);
2159 return PLUGIN_HANDLED;
2160 }
2161 g_iAllWp[iKey][id]--;
2162 client_print_color(id, print_team_default, "^4%s^1 Törölted az^3 %s^1 skint.", get_cprefix(), cAwpSkin[iKey][eWeaponName]);
2163 KukaEloszto(id);
2164 return PLUGIN_HANDLED;
2165}
2166public Kukakes(id)
2167{
2168 new sText[256], iRow[8];
2169 format(sText, charsmax(sText), "%s^nKés Kuka \wOldal", get_mprefix());
2170 new iMenu = menu_create(sText, "Kukakes_h");
2171
2172 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cKnifeSkin[0][eWeaponName]);
2173 menu_additem(iMenu, sText, "0", 0);
2174 for(new i = 1; i < sizeof(cKnifeSkin); i++)
2175 {
2176 if(g_iAllKnife[i][id] > 0)
2177 {
2178 num_to_str(i, iRow, 7);
2179 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cKnifeSkin[i][eWeaponName], g_iAllKnife[i][id]);
2180 menu_additem(iMenu, sText,iRow);
2181 }
2182 }
2183 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
2184 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
2185 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
2186
2187 menu_display(id, iMenu, 0);
2188}
2189public Kukakes_h(id, iMenu, iItem)
2190{
2191 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
2192
2193 new sData[10], sName[64];
2194 new iAccess, iCallback;
2195 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2196 new iKey = str_to_num(sData);
2197
2198 if(iKey == 0)
2199 {
2200 client_print_color(id, print_team_default, "^4%s^1 Az alap kést nem törölheted.", get_cprefix());
2201 KukaEloszto(id);
2202 return PLUGIN_HANDLED;
2203 }
2204 g_iAllKnife[iKey][id]--;
2205 client_print_color(id, print_team_default, "^4%s^1 Törölted az^3 %s^1 skint.", get_cprefix(), cKnifeSkin[iKey][eWeaponName]);
2206 KukaEloszto(id);
2207 return PLUGIN_HANDLED;
2208}
2209public awpraktar(id)
2210{
2211 new sText[256], iRow[8];
2212 format(sText, charsmax(sText), "%s^nAwp skinek \wOldal", get_mprefix());
2213 new iMenu = menu_create(sText, "awpraktar_h");
2214
2215 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cAwpSkin[0][eWeaponName]);
2216 menu_additem(iMenu, sText, "0", 0);
2217 for(new i = 1; i < sizeof(cAwpSkin); i++)
2218 {
2219 if(g_iAllWp[i][id] > 0)
2220 {
2221 num_to_str(i, iRow, 7);
2222 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cAwpSkin[i][eWeaponName], g_iAllWp[i][id]);
2223 menu_additem(iMenu, sText,iRow);
2224 }
2225 }
2226 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
2227 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
2228 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
2229
2230 menu_display(id, iMenu, 0);
2231}
2232public awpraktar_h(id, iMenu, iItem)
2233{
2234 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
2235
2236 new sData[10], sName[64];
2237 new iAccess, iCallback;
2238 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2239 new iKey = str_to_num(sData);
2240
2241 if(g_eMarketAll[eMarketNum] == 3)
2242 {
2243 if(iKey == 0)
2244 {
2245 client_print_color(id, print_team_default, "^4%s^1 Alap skint nem küldhetsz!", get_cprefix());
2246 g_eMarketAll[eMarketNum] = -1;
2247 Kuldesm(id);
2248 return PLUGIN_HANDLED;
2249 }
2250 g_eMarketAll[eNumberofsendItem] = iKey;
2251 valasszjatekost(id);
2252 }
2253 else
2254 {
2255 if(iKey == 0)
2256 {
2257 if(Skin[0][id] == 0)
2258 {
2259 client_print_color(id, print_team_default, "^4%s^1 Már az alap fegyvert használod!.", get_cprefix());
2260 RaktarEloszto(id);
2261 return PLUGIN_HANDLED;
2262 }
2263 else
2264 {
2265 Skin[0][id] = 0;
2266 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 ALAP AWP-t.", get_cprefix());
2267 RaktarEloszto(id);
2268 }
2269 }
2270 else
2271 {
2272 Skin[0][id] = iKey;
2273 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 %s^1 skint.", get_cprefix(), cAwpSkin[Skin[0][id]][eWeaponName]);
2274 RaktarEloszto(id);
2275 }
2276 }
2277 return PLUGIN_HANDLED;
2278}
2279public kesraktar(id)
2280{
2281 new sText[256], iRow[8];
2282 format(sText, charsmax(sText), "%s^nKés skinek \wOldal", get_mprefix());
2283 new iMenu = menu_create(sText, "kesraktar_h");
2284
2285 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cKnifeSkin[0][eWeaponName]);
2286 menu_additem(iMenu, sText, "0", 0);
2287 for(new i = 1; i < sizeof(cKnifeSkin); i++)
2288 {
2289 if(g_iAllKnife[i][id] > 0)
2290 {
2291 num_to_str(i, iRow, 7);
2292 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cKnifeSkin[i][eWeaponName], g_iAllKnife[i][id]);
2293 menu_additem(iMenu, sText,iRow);
2294 }
2295 }
2296
2297 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
2298 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
2299 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
2300
2301 menu_display(id, iMenu, 0);
2302}
2303public kesraktar_h(id, iMenu, iItem)
2304{
2305 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
2306
2307 new sData[10], sName[64];
2308 new iAccess, iCallback;
2309 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2310 new iKey = str_to_num(sData);
2311
2312 if(g_eMarketAll[eMarketNum] == 4)
2313 {
2314 if(iKey == 0)
2315 {
2316 client_print_color(id, print_team_default, "^4%s^1 Alap skint nem küldhetsz!", get_cprefix());
2317 Kuldesm(id);
2318 g_eMarketAll[eMarketNum] = -1;
2319 return PLUGIN_HANDLED;
2320 }
2321 g_eMarketAll[eNumberofsendItem] = iKey;
2322 valasszjatekost(id);
2323 }
2324 else
2325 {
2326 if(iKey == 0)
2327 {
2328 if(Skin[1][id] == 0)
2329 {
2330 client_print_color(id, print_team_default, "^4%s^1 Már az alap kést használod!.", get_cprefix());
2331 RaktarEloszto(id);
2332 return PLUGIN_HANDLED;
2333 }
2334 else
2335 {
2336 Skin[1][id] = 0;
2337 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 ALAP KÉS-t.", get_cprefix());
2338 RaktarEloszto(id);
2339 }
2340 }
2341 else
2342 {
2343 Skin[1][id] = iKey;
2344 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 %s^1 skint.", get_cprefix(), cKnifeSkin[Skin[1][id]][eWeaponName]);
2345 RaktarEloszto(id);
2346 }
2347 }
2348 return PLUGIN_HANDLED;
2349}
2350public RaktarEloszto(id)
2351{
2352 new sText[256];
2353 format(sText, charsmax(sText), "%s^nRaktár elosztó", get_mprefix());
2354 new iMenu = menu_create(sText, "RaktarEloszto_h");
2355
2356 menu_additem(iMenu, "AWP raktár", "1", 0);
2357 menu_additem(iMenu, "KÉS raktár^n", "2", 0);
2358
2359 menu_additem(iMenu, "Kuka^n", "3", 0);
2360
2361 formatex(sText, charsmax(sText), "\wAktív AWP skin:\d %s", cAwpSkin[Skin[0][id]][eWeaponName]);
2362 menu_addtext2(iMenu, sText);
2363 formatex(sText, charsmax(sText), "\wAktív Kés skin:\d %s", cKnifeSkin[Skin[1][id]][eWeaponName]);
2364 menu_addtext2(iMenu, sText);
2365
2366 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
2367 menu_display(id, iMenu, 0);
2368}
2369public RaktarEloszto_h(id, iMenu, iItem)
2370{
2371 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
2372
2373 new sData[10], sName[64];
2374 new iAccess, iCallback;
2375 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2376 new iKey = str_to_num(sData);
2377
2378 switch(iKey)
2379 {
2380 case 1: awpraktar(id);
2381 case 2: kesraktar(id);
2382 case 3: KukaEloszto(id);
2383
2384 }
2385}
2386public m_kuldetesek(id)
2387{
2388 new String[256];
2389 format(String, charsmax(String), "%s^n\dElvégzett küldetésk: könnyű: %d | nehéz: %d", get_mprefix(), g_eQuest[QuestEasyDone][id], g_eQuest[QuestHardDone][id]);
2390 new menu = menu_create(String, "m_kuldetesek_h");
2391
2392 if(g_bQuestActive[id] == false)
2393 {
2394 menu_additem(menu, "Küldetés felvétele", "1", 0);
2395
2396 if(g_bQuestDeathOff[id] == false)
2397 menu_additem(menu, "\wkönnyű", "2", 0);
2398 else
2399 menu_additem(menu, "\rnehéz", "2", 0);
2400
2401 }
2402 else
2403 {
2404 if(g_bQuestDeathOff[id] == false)
2405 {
2406 formatex(String, charsmax(String), "\dA könnyű küldetés teljesítés feltételei:", g_eQuest[QuestKill][id], g_eQuest[QuestEndKill][id]);
2407 menu_addtext2(menu, String);
2408 formatex(String, charsmax(String), "\wÖlj meg\r %d\w embert", g_eQuest[QuestKill][id]);
2409 menu_addtext2(menu, String);
2410 formatex(String, charsmax(String), "\wEbből \r%d\w fejessel^n", g_eQuest[QuestHs][id]);
2411 menu_addtext2(menu, String);
2412 formatex(String, charsmax(String), "\wMegölt emberek száma:\r %d", g_eQuest[QuestEndKill][id]);
2413 menu_addtext2(menu, String);
2414 formatex(String, charsmax(String), "\wEbből\r %d\w fejes^n", g_eQuest[QuestEndHs][id]);
2415 menu_addtext2(menu, String);
2416
2417 menu_additem(menu, "Lemondom a küldetést\r(100 Forint)", "4", 0);
2418 }
2419 else
2420 {
2421 formatex(String, charsmax(String), "\dA nehéz küldetés teljesítés feltételei:", g_eQuest[QuestKill][id], g_eQuest[QuestEndKill][id]);
2422 menu_addtext2(menu, String);
2423 formatex(String, charsmax(String), "\wÖlj meg\r %d\w embert", g_eQuest[QuestKill][id]);
2424 menu_addtext2(menu, String);
2425 formatex(String, charsmax(String), "\wEbből \r%d\w fejessel", g_eQuest[QuestHs][id]);
2426 menu_addtext2(menu, String);
2427 formatex(String, charsmax(String), "\wEnnyiszer halhatsz meg:\r %d^n", g_eQuest[QuestDeath][id]);
2428 menu_addtext2(menu, String);
2429 formatex(String, charsmax(String), "\wMegölt emberek száma:\r %d", g_eQuest[QuestEndKill][id]);
2430 menu_addtext2(menu, String);
2431 formatex(String, charsmax(String), "\wEbből\r %d\w fejes", g_eQuest[QuestEndHs][id]);
2432 menu_addtext2(menu, String);
2433 formatex(String, charsmax(String), "\wMeghaltál:\r %d", g_eQuest[QuestEndDeath][id]);
2434 menu_addtext2(menu, String);
2435
2436 menu_additem(menu, "Lemondom a küldetést\r(100 Forint)", "4", 0);
2437 }
2438 }
2439
2440 menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
2441 menu_display(id, menu, 0);
2442}
2443public m_kuldetesek_h(id, iMenu, iItem){
2444 if(iItem == MENU_EXIT)
2445 {
2446 menu_destroy(iMenu);
2447 return;
2448 }
2449
2450 new sData[9], sName[64];
2451 new iAccess, iCallback;
2452 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2453 new iKey = str_to_num(sData);
2454
2455 switch(iKey)
2456 {
2457 case 1:
2458 {
2459 if(g_bQuestActive[id] == false)
2460 {
2461 QuestCalculator(id);
2462 m_kuldetesek(id);
2463 }
2464 else
2465 m_kuldetesek(id);
2466 }
2467 case 2:
2468 {
2469 if(g_bQuestDeathOff[id] == false && g_bQuestActive[id] == false)
2470 {
2471 g_bQuestDeathOff[id] = true;
2472 client_print_color(id, print_team_default, "^4%s ^1átváltottad^3 nehéz^1 küldetésre", get_cprefix());
2473 m_kuldetesek(id);
2474 }
2475 else if(g_bQuestDeathOff[id] == true && g_bQuestActive[id] == false)
2476 {
2477 g_bQuestDeathOff[id] = false;
2478 client_print_color(id, print_team_default, "^4%s ^1átváltottad^3 könnyű^1 küldetésre", get_cprefix());
2479 m_kuldetesek(id);
2480 }
2481 else if(g_bQuestActive[id] == false)
2482 m_kuldetesek(id);
2483 }
2484 case 3: m_kuldetesek(id);
2485 case 4:
2486 {
2487 if(g_bQuestActive[id] == false)
2488 return;
2489 else
2490 {
2491 if(g_ePlayer[eHungarianForint][id] < 100)
2492 {
2493 client_print_color(id, print_team_default, "^4%s ^1Nincs^3 100^1 forintod, hogy lemondjad a küldetést!", get_cprefix());
2494 return;
2495 }
2496
2497 g_bQuestDeathOff[id] = false;g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestDeath][id] = 0;
2498 g_bQuestActive[id] = false;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;g_eQuest[QuestEndDeath][id] = 0;g_ePlayer[eHungarianForint][id] -= 100;
2499 client_print_color(id, print_team_default, "^4%s ^1Sikeresen lemondtad a küldetést!", get_cprefix());
2500 }
2501 }
2502 }
2503}
2504public LadaNyitas(id)
2505{
2506 new sText[256];
2507 format(sText, charsmax(sText), "%s^nLádanyitás", get_mprefix());
2508 new iMenu = menu_create(sText, "LadaNyitas_h");
2509
2510 menu_additem(iMenu, "AWP Láda", "1", 0);
2511 menu_additem(iMenu, "KÉS Láda^n", "2", 0);
2512
2513 formatex(sText, charsmax(sText), "\wAWP láda:\d %d\w | Kulcs:\d %d", g_iChest[0][id], g_iKey[0][id]);
2514 menu_addtext2(iMenu, sText);
2515 formatex(sText, charsmax(sText), "\wKÉS láda:\d %d\w | Kulcs:\d %d", g_iChest[1][id], g_iKey[1][id]);
2516 menu_addtext2(iMenu, sText);
2517
2518 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
2519 menu_display(id, iMenu, 0);
2520}
2521public LadaNyitas_h(id, iMenu, iItem)
2522{
2523 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
2524
2525 new sData[10], sName[64];
2526 new iAccess, iCallback;
2527 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2528 new iKey = str_to_num(sData);
2529
2530 switch(iKey)
2531 {
2532 case 1:
2533 {
2534 if(g_iChest[0][id] < 1)
2535 {
2536 client_print_color(id, print_team_default, "^4%s^1 Nincs Awp ládád!", get_cprefix());
2537 return;
2538 }
2539 if(g_iKey[0][id] < 1)
2540 {
2541 client_print_color(id, print_team_default, "^4%s^1 Nincs Awp láda kulcsod!", get_cprefix());
2542 return;
2543 }
2544
2545 g_iChest[0][id]--;
2546 g_iKey[0][id]--;
2547 g_iChestopen[id] = 1;
2548 g_iRollingPattern[id] = random_num(1,2);
2549 g_iRolling[id] = 45;
2550 ItemRollWp(id);
2551 }
2552 case 2:
2553 {
2554 if(g_iChest[1][id] < 1)
2555 {
2556 client_print_color(id, print_team_default, "^4%s^1 Nincs Kés ládád!", get_cprefix());
2557 return;
2558 }
2559 if(g_iKey[1][id] < 1)
2560 {
2561 client_print_color(id, print_team_default, "^4%s^1 Nincs Kés láda kulcsod!", get_cprefix());
2562 return;
2563 }
2564
2565 g_iChest[1][id]--;
2566 g_iKey[1][id]--;
2567 g_iChestopen[id] = 2;
2568 g_iRollingPatternKnife[id] = random_num(1,2);
2569 g_iRollingKnife[id] = 45;
2570 ItemRollWp(id);
2571 }
2572
2573 }
2574}
2575public ItemRollWp(id)
2576{
2577 if(g_iChestopen[id] == 1)
2578 {
2579 show_menu(id, 0, "^n", 1);
2580 new menu[1024], string[1024], key;
2581 formatex(string, charsmax(string), "%s^n\dSkinroll^n^n\w%s^n%s^n\y>>\w%s^n%s^n%s", get_mprefix(),
2582 cAwpSkin[g_iNextItems[id][1]][eWeaponName],cAwpSkin[g_iNextItems[id][2]][eWeaponName],cAwpSkin[g_iNextItems[id][3]][eWeaponName]
2583 ,cAwpSkin[g_iNextItems[id][4]][eWeaponName],cAwpSkin[g_iNextItems[id][5]][eWeaponName]);
2584 add(menu, charsmax(string), string);
2585
2586 key = (-1^(-1<<(9)));
2587
2588 g_iNextItems[id][5] = g_iNextItems[id][4];
2589 g_iNextItems[id][4] = g_iNextItems[id][3];
2590 g_iNextItems[id][3] = g_iNextItems[id][2];
2591 g_iNextItems[id][2] = g_iNextItems[id][1];
2592
2593 new iRnd = random_num(2, 104);
2594
2595 g_iNextItems[id][1] = iRnd;
2596 g_iRolling[id]--;
2597
2598 show_menu(id, key, menu, -1, "CloseItemRollWp");
2599
2600 if(g_iRolling[id] < 1)
2601 {
2602 m_mainmenu(id);
2603 g_iAllWp[g_iNextItems[id][4]][id]++;
2604 client_print_color(0, print_team_default, "^4%s^3 %s^1 Pörgetett egy %s skint.", get_cprefix(), g_sName[id], cAwpSkin[g_iNextItems[id][4]][eWeaponName]);
2605 }
2606
2607 remove_task(id);
2608 client_cmd(id, "spk misc/talk.wav");
2609
2610 if(g_iRollingPattern[id] == 1)
2611 {
2612 if(g_iRolling[id] > 30)
2613 set_task(0.1, "ItemRollWp", id);
2614 if(g_iRolling[id] > 12)
2615 set_task(0.2, "ItemRollWp", id);
2616 if(g_iRolling[id] > 8)
2617 set_task(0.3, "ItemRollWp", id);
2618 if(g_iRolling[id] > 7)
2619 set_task(0.4, "ItemRollWp", id);
2620 if(g_iRolling[id] > 5)
2621 set_task(0.5, "ItemRollWp", id);
2622 if(g_iRolling[id] > 3)
2623 set_task(0.6, "ItemRollWp", id);
2624 if(g_iRolling[id] > 1)
2625 set_task(0.7, "ItemRollWp", id);
2626 if(g_iRolling[id] > 0)
2627 set_task(0.9, "ItemRollWp", id);
2628 if(g_iRolling[id] < 0)
2629 set_task(0.1, "LadaNyitas", id);
2630 }
2631 if(g_iRollingPattern[id] == 2)
2632 {
2633 if(g_iRolling[id] > 30)
2634 set_task(0.1, "ItemRollWp", id);
2635 if(g_iRolling[id] > 10)
2636 set_task(0.2, "ItemRollWp", id);
2637 if(g_iRolling[id] > 5)
2638 set_task(0.3, "ItemRollWp", id);
2639 if(g_iRolling[id] > 1)
2640 set_task(0.6, "ItemRollWp", id);
2641 if(g_iRolling[id] > 0)
2642 set_task(0.9, "ItemRollWp", id);
2643 if(g_iRolling[id] < 0)
2644 set_task(0.1, "LadaNyitas", id);
2645 }
2646 }
2647 else if(g_iChestopen[id] == 2)
2648 {
2649 show_menu(id, 0, "^n", 1);
2650 new menu[1024], string[1024], key;
2651 formatex(string, charsmax(string), "%s^n\dSkinroll^n^n\w%s^n%s^n\y>>\w%s^n%s^n%s", get_mprefix(),
2652 cKnifeSkin[g_iNextItemsKnife[id][1]][eWeaponName],cKnifeSkin[g_iNextItemsKnife[id][2]][eWeaponName],cKnifeSkin[g_iNextItemsKnife[id][3]][eWeaponName]
2653 ,cKnifeSkin[g_iNextItemsKnife[id][4]][eWeaponName],cKnifeSkin[g_iNextItemsKnife[id][5]][eWeaponName]);
2654 add(menu, charsmax(string), string);
2655
2656 key = (-1^(-1<<(9)));
2657
2658 g_iNextItemsKnife[id][5] = g_iNextItemsKnife[id][4];
2659 g_iNextItemsKnife[id][4] = g_iNextItemsKnife[id][3];
2660 g_iNextItemsKnife[id][3] = g_iNextItemsKnife[id][2];
2661 g_iNextItemsKnife[id][2] = g_iNextItemsKnife[id][1];
2662
2663 new iRnd = random_num(2, 50);
2664
2665 g_iNextItemsKnife[id][1] = iRnd;
2666 g_iRollingKnife[id]--;
2667
2668 show_menu(id, key, menu, -1, "CloseItemRollWp");
2669
2670 if(g_iRollingKnife[id] < 1)
2671 {
2672 m_mainmenu(id);
2673 g_iAllKnife[g_iNextItemsKnife[id][4]][id]++;
2674 client_print_color(0, print_team_default, "^4%s^3 %s^1 Pörgetett egy %s skint.", get_cprefix(), g_sName[id], cKnifeSkin[g_iNextItemsKnife[id][4]][eWeaponName]);
2675 }
2676 remove_task(id);
2677 client_cmd(id, "spk misc/talk.wav");
2678
2679 if(g_iRollingPatternKnife[id] == 1)
2680 {
2681 if(g_iRollingKnife[id] > 30)
2682 set_task(0.1, "ItemRollWp", id);
2683 if(g_iRollingKnife[id] > 12)
2684 set_task(0.2, "ItemRollWp", id);
2685 if(g_iRollingKnife[id] > 8)
2686 set_task(0.3, "ItemRollWp", id);
2687 if(g_iRollingKnife[id] > 7)
2688 set_task(0.4, "ItemRollWp", id);
2689 if(g_iRollingKnife[id] > 5)
2690 set_task(0.5, "ItemRollWp", id);
2691 if(g_iRollingKnife[id] > 3)
2692 set_task(0.6, "ItemRollWp", id);
2693 if(g_iRollingKnife[id] > 1)
2694 set_task(0.7, "ItemRollWp", id);
2695 if(g_iRollingKnife[id] > 0)
2696 set_task(0.9, "ItemRollWp", id);
2697 if(g_iRollingKnife[id] < 0)
2698 set_task(0.1, "LadaNyitas", id);
2699 }
2700 if(g_iRollingPatternKnife[id] == 2)
2701 {
2702 if(g_iRollingKnife[id] > 30)
2703 set_task(0.1, "ItemRollWp", id);
2704 if(g_iRollingKnife[id] > 10)
2705 set_task(0.2, "ItemRollWp", id);
2706 if(g_iRollingKnife[id] > 5)
2707 set_task(0.3, "ItemRollWp", id);
2708 if(g_iRollingKnife[id] > 1)
2709 set_task(0.6, "ItemRollWp", id);
2710 if(g_iRollingKnife[id] > 0)
2711 set_task(0.9, "ItemRollWp", id);
2712 if(g_iRollingKnife[id] < 0)
2713 set_task(0.1, "LadaNyitas", id);
2714 }
2715 }
2716}
2717public CloseItemRollWp(id)
2718{
2719 remove_task(id);
2720
2721 if(g_iRolling[id] < 0)
2722 {
2723 LadaNyitas(id);
2724 g_iAllWp[g_iNextItems[id][4]][id]++;
2725 client_print_color(id, print_team_default, "^4%s^3 %s^1 Pörgetett egy %s skint.", get_cprefix(), g_sName[id], cAwpSkin[g_iNextItems[id][4]][eWeaponName]);
2726 }
2727
2728 show_menu(id, 0, "^n", 1);
2729 m_mainmenu(id);
2730}
2731public Informaciok(id)
2732{
2733 new sText[256], sRegDate[128], iTimes[4];
2734 format(sText, charsmax(sText), "%s^nInformációk", get_mprefix());
2735 new iMenu = menu_create(sText, "Informaciok_h");
2736
2737 iTimes[0] = g_ePlayer[eSec][id] + get_user_time(id);
2738 iTimes[1] = iTimes[0] / 60;
2739 iTimes[2] = iTimes[1] / 60;
2740 iTimes[3] = iTimes[2] / 24;
2741 iTimes[0] = iTimes[0] - iTimes[1] * 60;
2742 iTimes[1] = iTimes[1] - iTimes[2] * 60;
2743 iTimes[2] = iTimes[2] - iTimes[3] * 24;
2744
2745 formatex(sText, charsmax(sText), "\wFelhasználó id:\d(#%d)", get_player_regID(id));
2746 menu_addtext2(iMenu, sText);
2747 format_time(sRegDate, charsmax(sRegDate), "\d%Y\w.\d%m\w.\d%d\w. \w-\d %H\w:\d%M\w:\d%S", get_player_regdate(id));
2748 formatex(sText, charsmax(sText), "\wRegisztrált:\d %s", sRegDate);
2749 menu_addtext2(iMenu, sText);
2750 formatex(sText, charsmax(sText), "\wForint:\d %d | \wPP pont:\d %d", g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
2751 menu_addtext2(iMenu, sText);
2752 formatex(sText, charsmax(sText), "\wJátékidő:\d%d \wnap\d %d\w óra\d %d\w perc", iTimes[3], iTimes[2], iTimes[1]);
2753 menu_addtext2(iMenu, sText);
2754 formatex(sText, charsmax(sText), "\wTeljesített össz küldetések:\d %d", g_eQuest[QuestEasyDone][id]+g_eQuest[QuestHardDone][id]);
2755 menu_addtext2(iMenu, sText);
2756 formatex(sText, charsmax(sText), "\wRangod:\d %d", cRanks[g_ePlayer[eRank][id]][eName]);
2757 menu_addtext2(iMenu, sText);
2758
2759 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
2760 menu_display(id, iMenu, 0);
2761}
2762public Informaciok_h(id, iMenu, iItem)
2763{
2764 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
2765
2766 new sData[10], sName[64];
2767 new iAccess, iCallback;
2768 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
2769 new iKey = str_to_num(sData);
2770
2771 switch(iKey)
2772 {
2773 case 1: awpraktar(id);
2774 case 2: kesraktar(id);
2775
2776 }
2777}
2778public client_disconnect(id)
2779{
2780 if(g_iLoadAccount[id] == 0)
2781 mentes(id);
2782}
2783public client_putinserver(id)
2784{
2785 if(is_user_bot(id))
2786 return;
2787
2788 g_sName[id] = "";
2789
2790 get_user_name(id, g_sName[id], charsmax(g_sName));
2791 get_user_authid(id, g_sSteamID[id], charsmax(g_sSteamID));
2792 get_user_ip(id, g_sIP[id], charsmax(g_sIP));
2793
2794 set_task(20.0, "VIPvagy");
2795
2796 g_iLoadAccount[id] = 1;
2797 g_ePlayer[eHungarianForint][id] = 0;
2798 g_ePlayer[eRank][id] = 0;
2799 g_ePlayer[eKills][id] = 0;
2800 g_ePlayer[eSec][id] = 0;
2801 g_ePlayer[ePP][id] = 0;
2802 g_ePlayer[eVIP][id] = 0;
2803 g_ePlayer[eCounter][id] = 0;
2804 g_ePlayer[eLvl][id] = 0;
2805 g_ePlayer[eXp][id] = 0;
2806 g_ePlayer[eHs][id] = 0;
2807 g_iOneVIP[id] = 0;
2808
2809 g_bHudOFFON[id] = false;
2810 g_bSkinOFFON[id] = false;
2811 g_iHudChange[id] = 0;
2812
2813 g_iChest[0][id] = 0;
2814 g_iChest[1][id] = 0;
2815 g_iKey[0][id] = 0;
2816 g_iKey[1][id] = 0;
2817 g_iGift[id] = 0;
2818
2819 g_eQuest[QuestKill][id] = 0;
2820 g_eQuest[QuestHs][id] = 0;
2821 g_eQuest[QuestDeath][id] = 0;
2822 g_bQuestDeathOff[id] = false;
2823 g_bQuestActive[id] = false;
2824
2825 g_eQuest[QuestEndKill][id] = 0;
2826 g_eQuest[QuestEndHs][id] = 0;
2827 g_eQuest[QuestEndDeath][id] = 0;
2828 g_eQuest[QuestEasyDone][id] = 0;
2829 g_eQuest[QuestHardDone][id] = 0;
2830
2831 Skin[0][id] = 0;
2832 Skin[1][id] = 0;
2833
2834 gSkinSold[0][id] = 0;
2835 gSkinPrize[0][id] = 0;
2836 gSkinSell[0][id] = 0;
2837
2838 gSkinSold[1][id] = 0;
2839 gSkinPrize[1][id] = 0;
2840 gSkinSell[1][id] = 0;
2841
2842 g_sSteamID[id] = "";
2843 g_sIP[id] = "";
2844
2845 g_iNextItems[1][id] = 0;
2846 g_iNextItems[2][id] = 0;
2847 g_iNextItems[3][id] = 0;
2848 g_iNextItems[4][id] = 0;
2849 g_iNextItems[5][id] = 0;
2850 g_iNextItems[6][id] = 0;
2851
2852 g_iRolling[id] = 0;
2853 g_iRollingPattern[id] = 0;
2854
2855 g_iNextItemsKnife[1][id] = 0;
2856 g_iNextItemsKnife[2][id] = 0;
2857 g_iNextItemsKnife[3][id] = 0;
2858 g_iNextItemsKnife[4][id] = 0;
2859 g_iNextItemsKnife[5][id] = 0;
2860 g_iNextItemsKnife[6][id] = 0;
2861
2862 g_iRollingKnife[id] = 0;
2863 g_iRollingPatternKnife[id] = 0;
2864 g_iUserFPS[id] = 0;
2865 g_iChestopen[id] = 0;
2866}
2867public DollarSzerencsekerek(id)
2868{
2869 new Erteke, Adatok[32];
2870 read_args(Adatok, charsmax(Adatok));
2871 remove_quotes(Adatok);
2872
2873 Erteke = str_to_num(Adatok);
2874
2875 new Hossz = strlen(Adatok);
2876
2877 if(Erteke > g_ePlayer[eHungarianForint][id])
2878 {
2879 client_print_color(id, print_team_default, "^4%s ^1Neked nincs ennyi Forintod!", get_cprefix());
2880 client_cmd(id, "messagemode TETED");
2881 }
2882 else if(Hossz > 7)
2883 {
2884 client_print_color(id, print_team_default, "^4%s ^1Az Összeg nem lehet nagyobb 1 milliónál!", get_cprefix());
2885 client_cmd(id, "messagemode TETED");
2886 }
2887 else if(Erteke < 100)
2888 {
2889 client_print_color(id, print_team_default, "^4%s ^1Csak 100 Forintod fölött lehet pörgetni!", get_cprefix());
2890 client_cmd(id, "messagemode TETED");
2891 }
2892 else
2893 {
2894 TetErteke[id] = Erteke;
2895 Szerencsekerek(id, Erteke);
2896 }
2897}
2898
2899public Szerencsekerek(id, Osszeg)
2900{
2901 new String[128], Esej[33];
2902 format(String, charsmax(String), "%s \d| \wSzerencsekerék^nForint: \r%d", get_mprefix(), g_ePlayer[eHungarianForint][id]);
2903 new menu = menu_create(String, "Szerencsekerek_h" );
2904
2905 if(Osszeg == 0)
2906 {
2907 Esej[id] = 0;
2908 }
2909 if(Osszeg >= 100 && Osszeg <= 500)
2910 {
2911 Esej[id] = random_num(1, 25);
2912 }
2913 else if(Osszeg >= 501 && Osszeg <= 1000)
2914 {
2915 Esej[id] = random_num(25, 50);
2916 }
2917 else if(Osszeg >= 1001 && Osszeg <= 2000)
2918 {
2919 Esej[id] = random_num(50, 75);
2920 }
2921 else if(Osszeg >= 2001 && Osszeg <= 5000)
2922 {
2923 Esej[id] = 100;
2924 }
2925
2926 format(String, charsmax(String), "\yTéted: \r%d Forint", TetErteke[id]);
2927 menu_additem(menu,String,"1",0);
2928 format(String, charsmax(String), "\wNyerési esély: \r%d%%", Esej[id]);
2929 menu_additem(menu,String,"2",0);
2930 format(String, charsmax(String), "\rPörgetés!");
2931 menu_additem(menu,String,"3",0);
2932
2933 menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
2934 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
2935 menu_display(id, menu, 0);
2936}
2937public Szerencsekerek_h(id, menu, item){
2938 if( item == MENU_EXIT )
2939 {
2940 menu_destroy(menu);
2941 return PLUGIN_HANDLED;
2942 }
2943 new data[9], szName[64];
2944 new access, callback;
2945 menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
2946 new key = str_to_num(data);
2947
2948 switch(key)
2949 {
2950 case 1:{
2951 client_cmd(id, "messagemode TETED");
2952 }
2953 case 2:{
2954 Szerencsekerek(id, TetErteke[id]);
2955 }
2956 case 3:{
2957 if(TetErteke[id] <= 0)
2958 {
2959 client_print_color(id, print_team_default, "^4%s ^1A téted nem lehet 0, nagyobb Ä‚Összegel használhatod!", get_cprefix());
2960 }
2961 if(TetErteke[id] < 100)
2962 {
2963 client_print_color(id, print_team_default, "^4%s ^1Csak 100 Forint fölött lehet pörgetni!", get_cprefix());
2964 }
2965 else if(TetErteke[id] >= 100 || TetErteke[id] <= 500)
2966 {
2967 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
2968 SzerencseTalal(id, 0);
2969 }
2970 else if(TetErteke[id] >= 501 || TetErteke[id] <= 1000)
2971 {
2972 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
2973 SzerencseTalal(id, 0);
2974 }
2975 else if(TetErteke[id] >= 1001 || TetErteke[id] <= 2000)
2976 {
2977 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
2978 SzerencseTalal(id, 1);
2979 }
2980 else if(TetErteke[id] >= 2001 || TetErteke[id] <= 5000)
2981 {
2982 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
2983 SzerencseTalal(id, 2);
2984 }
2985 }
2986 }
2987 menu_destroy(menu);
2988 return PLUGIN_HANDLED;
2989}
2990
2991public SzerencseTalal(id, key)
2992{
2993 new Nev[32]; get_user_name(id, Nev, 31);
2994
2995 if(key == 0) {
2996 switch(random_num(1, 230)) {
2997 case 1..30: {
2998 Porgetes(id);
2999 }
3000 case 31..60: {
3001 Porgetes(id);
3002 }
3003 case 61..90: {
3004 Porgetes(id);
3005 }
3006 case 91..120: {
3007 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1-nek most nemvolt szerencséje semmit sem pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3008 }
3009 case 121..150: {
3010 g_ePlayer[eHungarianForint][id] += TetErteke[id];
3011 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 vissza pörgette a Szerencsekerékkel árát ^4%d$ Forint!", get_cprefix(), Nev, TetErteke[id]);
3012 }
3013 case 151..199: {
3014 Porgetes(id);
3015 }
3016 case 200: {
3017 Porgetes(id);
3018 }
3019 case 201: {
3020 Porgetes(id);
3021 }
3022 case 202..230: {
3023 Porgetes(id);
3024 }
3025 }
3026 TetErteke[id] = 0;
3027 }
3028 if(key == 1) {
3029 switch(random_num(1, 245)) {
3030 case 1..10: {
3031 Porgetes2(id);
3032 }
3033 case 11..30: {
3034 Porgetes2(id);
3035 }
3036 case 31..60: {
3037 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1-nek most nemvolt szerencsée semmit sem pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3038 }
3039 case 61..90: {
3040 Porgetes2(id);
3041 }
3042 case 91..120: {
3043 Porgetes2(id);
3044 }
3045 case 121..150: {
3046 g_ePlayer[eHungarianForint][id] += TetErteke[id];
3047 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 vissza pörgette a Szerencsekerék árát ^4%d$ Forint!", get_cprefix(), Nev, TetErteke[id]);
3048 }
3049 case 151..199: {
3050 if(g_ePlayer[eVIP][id] < get_systime(id))
3051 {
3052 g_ePlayer[eVIP][id] = g_ePlayer[eVIP][id] += 86400*3;
3053 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 egy^4 3^1 napos *VIP* tagságot pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3054 }
3055 else
3056 {
3057 g_ePlayer[eHungarianForint][id] += TetErteke[id];
3058 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 vissza pörgette a Szerencsekerék árát ^4%d$ Forint!", get_cprefix(), Nev, TetErteke[id]);
3059 }
3060 }
3061 case 200: {
3062 Porgetes2(id);
3063 }
3064 case 201: {
3065 Porgetes2(id);
3066 }
3067 case 202..230: {
3068 Porgetes2(id);
3069 }
3070 case 231..245: {
3071 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1-nek most nemvolt szerencsée semmit sem pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3072 }
3073 }
3074 TetErteke[id] = 0;
3075 }
3076 if(key == 2) {
3077 switch(random_num(1, 250)) {
3078 case 1..10: {
3079 Porgetes3(id);
3080 }
3081 case 11..30: {
3082 Porgetes3(id);
3083 }
3084 case 31..60: {
3085 Porgetes3(id);
3086 }
3087 case 61..90: {
3088 if(g_ePlayer[eVIP][id] < get_systime(id))
3089 {
3090 g_ePlayer[eVIP][id] = g_ePlayer[eVIP][id] += 86400*5;
3091 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 egy^4 5^1 napos *VIP* tagságot pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3092 }
3093 else
3094 {
3095 g_ePlayer[eHungarianForint][id] += TetErteke[id];
3096 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 vissza pörgette a Szerencsekerék árát ^4%d$ Forint!", get_cprefix(), Nev, TetErteke[id]);
3097 }
3098 }
3099 case 91..120: {
3100 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1-nek most nemvolt szerencsée semmit sem pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3101 }
3102 case 121..150: {
3103 Porgetes3(id);
3104 }
3105 case 151..199: {
3106 Porgetes3(id);
3107 }
3108 case 200: {
3109 Porgetes3(id);
3110 }
3111 case 201: {
3112 Porgetes3(id);
3113 }
3114 case 202..230: {
3115 Porgetes3(id);
3116 }
3117 case 231: {
3118 if(g_ePlayer[eVIP][id] < get_systime(id))
3119 {
3120 g_ePlayer[eVIP][id] = g_ePlayer[eVIP][id] += 86400*30;
3121 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 egy^4 30^1 napos *VIP* tagságot pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3122 }
3123 else
3124 {
3125 g_ePlayer[eHungarianForint][id] += TetErteke[id];
3126 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1 vissza pörgette a Szerencsekerék árát ^4%d$ Forint!", Nev, TetErteke[id]);
3127 }
3128 }
3129 case 232..235: {
3130 Porgetes3(id);
3131 }
3132 case 236..250: {
3133 client_print_color(id, print_team_default, "^4%s ^1- ^3%s^1-nek most nemvolt szerencséje semmit sem pörgetett a Szerencsekerékkel!", get_cprefix(), Nev);
3134 }
3135 }
3136 TetErteke[id] = 0;
3137 }
3138}
3139public Porgetes(id)
3140{
3141 new client_name[33];
3142 get_user_name(id, client_name, 32);
3143
3144 new const Szamok[][] = { 3,6,3,4,5,6,7,8,9,10,11,12,12,13,15,16,17,28,25,20,21,22 };
3145 new a = random_num(0,21);
3146 new b = Szamok[a][0];
3147
3148
3149 g_iAllWp[b][id]++;
3150 client_print_color(id, print_team_default, "^4%s ^3%s ^1pörgetett a szerencsekerékkel egy ^4%s^1 -skint!", get_cprefix(), client_name, cAwpSkin[b][eWeaponName]);
3151 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
3152 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cAwpSkin[b][eWeaponName]);
3153}
3154
3155public Porgetes2(id)
3156{
3157 new client_name[33];
3158 get_user_name(id, client_name, 32);
3159
3160 new const Szamok[][] = { 3,6,3,4,5,6,7,8,9,10,11,12,12,13,15,16,17,28,25,20,21,22 };
3161 new a = random_num(0,21);
3162 new b = Szamok[a][0];
3163
3164 g_iAllKnife[b][id]++;
3165 client_print_color(id, print_team_default, "^4%s ^3%s ^1pörgetett a szerencsekerékkel egy ^4%s^1 -skint!", get_cprefix(), client_name, cKnifeSkin[b][eWeaponName]);
3166 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
3167 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cKnifeSkin[b][eWeaponName]);
3168}
3169
3170public Porgetes3(id)
3171{
3172 new client_name[33];
3173 get_user_name(id, client_name, 32);
3174
3175 new const Szamok[][] = { 3,6,3,4,5,6,7,8,9,10,11,12,12,13,15,16,17,28,25,20,21,22 };
3176 new a = random_num(0,21);
3177 new b = Szamok[a][0];
3178
3179 g_iAllWp[b][id]++;
3180 client_print_color(id, print_team_default, "^4%s ^3%s ^1pörgetett a szerencsekerékkel egy ^4%s^1 -skint!", get_cprefix(), client_name, cAwpSkin[b][eWeaponName]);
3181 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
3182 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cAwpSkin[b][eWeaponName]);
3183}
3184public plugin_cfg()
3185{
3186 g_SqlTuple = SQL_MakeDbTuple("87.229.115.198", "sw_u761", "qiSn1TZwOk", "sw_server761");
3187 Awpskintable();
3188 Knifeskintable();
3189 Playertable();
3190 Questtable();
3191}
3192public Load_User_Data(id)
3193{
3194 new sData[1];
3195 sData[0] = id;
3196 static sQuery[5048];
3197
3198 SQL_ThreadQuery(g_SqlTuple, "sqlconnectioncheck", sQuery);
3199
3200 if(SQLCONNECTION == 1)
3201 {
3202 for(new i = 0; i < 4; i++)
3203 {
3204 switch(i)
3205 {
3206 case 0:
3207 {
3208 formatex(sQuery, charsmax(sQuery), "SELECT * FROM `Awpskintable` WHERE `Id` = %d;", get_player_regID(id));
3209 SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataAwp", sQuery, sData, 2);
3210 }
3211 case 1:
3212 {
3213 formatex(sQuery, charsmax(sQuery), "SELECT * FROM `Knifeskintable` WHERE `Id` = %d;", get_player_regID(id));
3214 SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataKnife", sQuery, sData, 2);
3215 }
3216 case 2:
3217 {
3218 formatex(sQuery, charsmax(sQuery), "SELECT * FROM `Playertable` WHERE `Id` = %d;", get_player_regID(id));
3219 SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataPlayer", sQuery, sData, 2);
3220 }
3221 case 3:
3222 {
3223 g_iLoadAccount[id] = 0;
3224 formatex(sQuery, charsmax(sQuery), "SELECT * FROM `Questtable` WHERE `Id` = %d;", get_player_regID(id));
3225 SQL_ThreadQuery(g_SqlTuple, "QuerySelectDataQuest", sQuery, sData, 2);
3226 }
3227 }
3228 }
3229 }
3230}
3231public sqlconnectioncheck(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3232{
3233 if(iFailState == TQUERY_CONNECT_FAILED)
3234 {
3235 SQLCONNECTION = 0;
3236 log_amx("%s", sError);
3237 return;
3238 }
3239 else
3240 SQLCONNECTION = 1;
3241}
3242public Awpskintable(){
3243 new iLen;
3244 static sQuery[10000];
3245
3246 iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS `Awpskintable` ");
3247 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
3248 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
3249
3250 for(new i=1;i < 105; i++)
3251 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`AWP_%d` int(11) NOT NULL,", i);
3252
3253 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qAllskinwp` int(11) NOT NULL,");
3254
3255 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`User_Id` INT(11) NOT NULL DEFAULT 0)");
3256
3257 SQL_ThreadQuery(g_SqlTuple, "AWPCreateThread", sQuery);
3258}
3259public AwpUpdate(id)
3260{
3261 static sQuery[10000];
3262 new iLen;
3263
3264 iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE `Awpskintable` SET ");
3265
3266 for(new i=1;i < 105; i++)
3267 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "AWP_%d = ^"%i^",", i, g_iAllWp[i][id]);
3268
3269 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qAllskinwp = ^"%i^" WHERE `User_Id` = %d;", Skin[0][id], get_player_regID(id));
3270
3271 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3272 KnifeUpdate(id);
3273}
3274public AWPCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3275{
3276 if(iFailState == TQUERY_CONNECT_FAILED)
3277 set_fail_state("[AWP] NEM TUDTAM CSATLAKOZNI AZ ADATBAZISHOZ!");
3278 else if(iFailState == TQUERY_QUERY_FAILED)
3279 set_fail_state("[AWP] Query Error");
3280 if(iErrcode)
3281 log_amx("[AWP] HIBAT DOBTAM: %s", sError);
3282}
3283public AWPInsert(id)
3284{
3285 static sQuery[10000];
3286
3287 formatex(sQuery, charsmax(sQuery), "INSERT INTO `Awpskintable` (`User_Id`) VALUES (%d);", get_player_regID(id));
3288 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3289}
3290public QuerySelectDataAwp(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3291{
3292 if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
3293 {
3294 log_amx("%s", sError);
3295 return;
3296 }
3297 else
3298 {
3299 new id = sData[0];
3300
3301 if(SQL_NumRows(sQuery) > 0)
3302 {
3303 for(new i = 1;i < 105; i++)
3304 {
3305 new sString[64];
3306 formatex(sString, charsmax(sString), "AWP_%d", i);
3307 g_iAllWp[i][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, sString));
3308 }
3309 Skin[0][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qAllskinwp"));
3310 }
3311 else
3312 AWPInsert(id);
3313 }
3314}
3315public Knifeskintable(){
3316 new iLen;
3317 static sQuery[10000];
3318
3319 iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS `Knifeskintable` ");
3320 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
3321 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
3322
3323 for(new i=1;i < 51; i++)
3324 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Knife_%d` int(11) NOT NULL, ", i);
3325
3326 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qAllskinKnife` int(11) NOT NULL,");
3327
3328 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`User_Id` INT(11) NOT NULL DEFAULT 0)");
3329 SQL_ThreadQuery(g_SqlTuple, "KnifeCreateThread", sQuery);
3330}
3331public KnifeUpdate(id)
3332{
3333 static sQuery[10000];
3334 new iLen;
3335
3336 iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE `Knifeskintable` SET ");
3337
3338 for(new i=1;i < 51; i++)
3339 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "Knife_%d = ^"%i^", ", i, g_iAllKnife[i][id]);
3340
3341 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qAllskinKnife = ^"%i^" WHERE `User_Id` = %d;", Skin[1][id], get_player_regID(id));
3342 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3343 PlayerUpdate(id);
3344}
3345public KnifeCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3346{
3347 if(iFailState == TQUERY_CONNECT_FAILED)
3348 set_fail_state("[Knife] NEM TUDTAM CSATLAKOZNI AZ ADATBAZISHOZ!");
3349 else if(iFailState == TQUERY_QUERY_FAILED)
3350 set_fail_state("[Knife] Query Error");
3351 if(iErrcode)
3352 log_amx("[Knife] HIBAT DOBTAM: %s", sError);
3353}
3354public KnifeInsert(id)
3355{
3356 static sQuery[5000];
3357
3358 formatex(sQuery, charsmax(sQuery), "INSERT INTO `Knifeskintable` (`User_Id`) VALUES (%d);", get_player_regID(id));
3359 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3360}
3361public QuerySelectDataKnife(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3362{
3363 if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
3364 {
3365 log_amx("%s", sError);
3366 return;
3367 }
3368 else
3369 {
3370 new id = sData[0];
3371
3372 if(SQL_NumRows(sQuery) > 0)
3373 {
3374 for(new i = 1;i < 51; i++)
3375 {
3376 new sString[64];
3377 formatex(sString, charsmax(sString), "Knife_%d", i);
3378 g_iAllKnife[i][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, sString));
3379 }
3380 Skin[1][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qAllskinKnife"));
3381 }
3382 else
3383 KnifeInsert(id);
3384 }
3385}
3386public Playertable(){
3387 new iLen;
3388 static sQuery[10000];
3389
3390 iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS `Playertable` ");
3391 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
3392 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
3393
3394 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qForint` int(11) NOT NULL, ");
3395 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qRank` int(11) NOT NULL, ");
3396 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qKill` int(11) NOT NULL, ");
3397 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qSec` int(11) NOT NULL, ");
3398 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qPP` int(11) NOT NULL, ");
3399 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qVIP` int(11) NOT NULL, ");
3400 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qLvl` int(11) NOT NULL, ");
3401 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qXp` int(11) NOT NULL, ");
3402 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qHs` int(11) NOT NULL, ");
3403 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qOneVIP` int(11) NOT NULL, ");
3404 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qHudoffon` int(11) NOT NULL, ");
3405 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qHudchange` int(11) NOT NULL, ");
3406 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qSkinoffon` int(11) NOT NULL, ");
3407 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qChest0` int(11) NOT NULL, ");
3408 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qChest1` int(11) NOT NULL, ");
3409 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qKey0` int(11) NOT NULL, ");
3410 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qKey1` int(11) NOT NULL, ");
3411 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qGift` int(11) NOT NULL, ");
3412
3413 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`User_Id` INT(11) NOT NULL DEFAULT 0)");
3414 SQL_ThreadQuery(g_SqlTuple, "PlayerCreateThread", sQuery);
3415}
3416public PlayerUpdate(id)
3417{
3418 static sQuery[10000];
3419 new iLen;
3420
3421 iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE `Playertable` SET qForint = ^"%i^",", g_ePlayer[eHungarianForint][id]);
3422
3423 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qRank = ^"%i^",", g_ePlayer[eRank][id]);
3424 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qKill = ^"%i^",", g_ePlayer[eKills][id]);
3425 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qSec = ^"%i^",", g_ePlayer[eSec][id]+ get_user_time(id));
3426 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qPP = ^"%i^",", g_ePlayer[ePP][id]);
3427 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qVIP = ^"%i^",", g_ePlayer[eVIP][id]-get_user_time(id));
3428 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qLvl = ^"%i^",", g_ePlayer[eLvl][id]);
3429 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qXp = ^"%i^",", g_ePlayer[eXp][id]);
3430 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qHs = ^"%i^",", g_ePlayer[eHs][id]);
3431 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qOneVIP = ^"%i^",", g_iOneVIP[id]);
3432 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qHudoffon = ^"%d^",", g_bHudOFFON[id]);
3433 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qHudchange = ^"%i^",", g_iHudChange[id]);
3434 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qSkinoffon = ^"%d^",", g_bSkinOFFON[id]);
3435 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qChest0 = ^"%i^",", g_iChest[0][id]);
3436 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qChest1 = ^"%i^",", g_iChest[1][id]);
3437 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qKey0 = ^"%i^",", g_iKey[0][id]);
3438 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qKey1 = ^"%i^",", g_iKey[1][id]);
3439 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qGift = ^"%i^" WHERE `User_Id` = %d;", g_iGift[id], get_player_regID(id));
3440
3441 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3442 QuestUpdate(id);
3443}
3444public PlayerCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3445{
3446 if(iFailState == TQUERY_CONNECT_FAILED)
3447 set_fail_state("[Plyer] NEM TUDTAM CSATLAKOZNI AZ ADATBAZISHOZ!");
3448 else if(iFailState == TQUERY_QUERY_FAILED)
3449 set_fail_state("[Plyer] Query Error");
3450 if(iErrcode)
3451 log_amx("[Plyer] HIBAT DOBTAM: %s", sError);
3452}
3453public PlayerInsert(id)
3454{
3455 static sQuery[1024];
3456
3457 formatex(sQuery, charsmax(sQuery), "INSERT INTO `Playertable` (`User_Id`) VALUES (%d);", get_player_regID(id));
3458 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3459}
3460public QuerySelectDataPlayer(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3461{
3462 if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
3463 {
3464 log_amx("%s", sError);
3465 return;
3466 }
3467 else
3468 {
3469 new id = sData[0];
3470
3471 if(SQL_NumRows(sQuery) > 0)
3472 {
3473 g_ePlayer[eHungarianForint][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qForint"));
3474 g_ePlayer[eRank][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qRank"));
3475 g_ePlayer[eKills][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qKill"));
3476 g_ePlayer[eSec][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qSec"));
3477 g_ePlayer[ePP][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qPP"));
3478 g_ePlayer[eVIP][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qVIP"));
3479 g_ePlayer[eLvl][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qLvl"));
3480 g_ePlayer[eXp][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qXp"));
3481 g_ePlayer[eHs][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qHs"));
3482 g_iOneVIP[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qOneVIP"));
3483 g_bHudOFFON[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qHudoffon"));
3484 g_iHudChange[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qHudchange"));
3485 g_bSkinOFFON[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qSkinoffon"));
3486 g_iChest[0][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qChest0"));
3487 g_iChest[1][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qChest1"));
3488 g_iKey[0][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qKey0"));
3489 g_iKey[1][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qKey1"));
3490 g_iGift[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qGift"));
3491 }
3492 else
3493 PlayerInsert(id);
3494 }
3495}
3496public Questtable(){
3497 new iLen;
3498 static sQuery[10000];
3499
3500 iLen += formatex(sQuery[iLen], charsmax(sQuery), "CREATE TABLE IF NOT EXISTS `Questtable` ");
3501 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "( ");
3502 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`Id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,");
3503
3504 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestKill` int(11) NOT NULL, ");
3505 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestHs` int(11) NOT NULL, ");
3506 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestDeathoff` int(11) NOT NULL, ");
3507 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestDeath` int(11) NOT NULL, ");
3508 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestActive` int(11) NOT NULL, ");
3509 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestEndkill` int(11) NOT NULL, ");
3510 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestEndhs` int(11) NOT NULL, ");
3511 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestEnddeath` int(11) NOT NULL, ");
3512 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestEasydone` int(11) NOT NULL, ");
3513 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`qQuestHarddone` int(11) NOT NULL, ");
3514
3515 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "`User_Id` INT(11) NOT NULL DEFAULT 0)");
3516
3517 SQL_ThreadQuery(g_SqlTuple, "QuestCreateThread", sQuery);
3518}
3519public QuestUpdate(id)
3520{
3521 static sQuery[10000];
3522 new iLen;
3523
3524 iLen += formatex(sQuery[iLen], charsmax(sQuery), "UPDATE `Questtable` SET ");
3525
3526 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestKill = ^"%i^",", g_eQuest[QuestKill][id]);
3527 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestHs = ^"%i^",", g_eQuest[QuestHs][id]);
3528 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestDeathoff = ^"%i^",", g_bQuestDeathOff[id]);
3529 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestDeath = ^"%i^",", g_eQuest[QuestDeath][id]);
3530 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestActive = ^"%i^",", g_bQuestActive[id]);
3531 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestEndkill = ^"%i^",", g_eQuest[QuestEndKill][id]);
3532 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestEndhs = ^"%i^",", g_eQuest[QuestEndHs][id]);
3533 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestEnddeath = ^"%i^",", g_eQuest[QuestEndDeath][id]);
3534 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestEasydone = ^"%i^",", g_eQuest[QuestEasyDone][id]);
3535 iLen += formatex(sQuery[iLen], charsmax(sQuery)-iLen, "qQuestHarddone = ^"%i^" WHERE `User_Id` = %d;", g_eQuest[QuestHardDone][id], get_player_regID(id));
3536
3537 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3538 log_amx("Updatelem questet");
3539}
3540public QuestCreateThread(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3541{
3542 if(iFailState == TQUERY_CONNECT_FAILED)
3543 set_fail_state("[Quest] NEM TUDTAM CSATLAKOZNI AZ ADATBAZISHOZ!");
3544 else if(iFailState == TQUERY_QUERY_FAILED)
3545 set_fail_state("[Quest] Query Error");
3546 if(iErrcode)
3547 log_amx("[Quest] HIBAT DOBTAM: %s", sError);
3548}
3549public QuestInsert(id)
3550{
3551 static sQuery[10000];
3552
3553 formatex(sQuery, charsmax(sQuery), "INSERT INTO `Questtable` (`User_Id`) VALUES (%d);", get_player_regID(id));
3554 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", sQuery);
3555}
3556public QuerySelectDataQuest(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3557{
3558 if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
3559 {
3560 log_amx("%s", sError);
3561 return;
3562 }
3563 else
3564 {
3565 new id = sData[0];
3566
3567 if(SQL_NumRows(sQuery) > 0)
3568 {
3569 g_eQuest[QuestKill][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestKill"));
3570 g_eQuest[QuestHs][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestHs"));
3571 g_bQuestDeathOff[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestDeathoff"));
3572 g_eQuest[QuestDeath][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestDeath"));
3573 g_bQuestActive[id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestActive"));
3574 g_eQuest[QuestEndKill][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestEndkill"));
3575 g_eQuest[QuestEndHs][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestEndhs"));
3576 g_eQuest[QuestEndDeath][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestEnddeath"));
3577 g_eQuest[QuestEasyDone][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestEasydone"));
3578 g_eQuest[QuestHardDone][id] = SQL_ReadResult(sQuery, SQL_FieldNameToNum(sQuery, "qQuestHarddone"));
3579 }
3580 else
3581 {
3582 QuestInsert(id);
3583 Load_User_Data(id);
3584 }
3585 }
3586}
3587public QuerySetData(iFailState, Handle:sQuery, sError[], iErrcode, sData[], iDataSize, Float:fQueuetime)
3588{
3589 if(iFailState == TQUERY_CONNECT_FAILED || iFailState == TQUERY_QUERY_FAILED)
3590 {
3591 log_amx("%s", sError);
3592 return;
3593 }
3594}