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