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