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