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