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