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