· 4 years ago · Feb 22, 2021, 05:56 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/";
18new const szabaly[][] = { "Tilos a szerveren a segédprogramok használata", "Tilos az adminok szidása", "Tilos a játékostársaid anyázni","Tilos a Szerveren való kéregetés, azonnal némítás jár érte!","Tilos a szerveren bugoltatni kitiltás, jár érte!","Tilos a Szerveren, 16 alatt mikrofont használni!","Tilos a Szerveren való Anyázás,apázás,ocsmány szavak használata!","Ez vonatkozik az Adminisztrátorokra is!"};
19
20#define TULAJ ADMIN_IMMUNITY
21#define FOADMIN ADMIN_LEVEL_E
22#define ADMIN ADMIN_LEVEL_F
23#define UGYNOK ADMIN_LEVEL_G
24#define PVIP ADMIN_LEVEL_G
25#define VIP ADMIN_LEVEL_H
26
27#define DLMIN 1
28#define DLMAX 6
29
30#define MAXPLAYERS 33
31
32enum _:eWeaponData {
33 eWeaponName[64],
34 eWeaponFile[64]
35}
36
37#define AWP 77
38#define KNIFE 34
39new g_iAllWp[AWP][33], g_iAllKnife[KNIFE][33], Skin[2][33];
40
41new const cAwpSkin[][eWeaponData] = {
42 {"AWP | ALAP", "models/v_awp.mdl"},//0
43 {"AWP | GreenWave", "models/bigbrotherz_awp/awp1.mdl"},//1
44 {"AWP | Hyper Beast", "models/bigbrotherz_awp/awp2.mdl"},//2
45 {"AWP | Vaporwave", "models/bigbrotherz_awp/awp3.mdl" }, //3
46 {"AWP | Assimov", "models/bigbrotherz_awp/awp4.mdl" }, //4
47 {"AWP | Banshee", "models/bigbrotherz_awp/awp5.mdl" }, //5
48 {"AWP | Black_Dragon", "models/bigbrotherz_awp/awp6.mdl" }, //6
49 {"AWP | Lightning Strike", "models/bigbrotherz_awp/awp7.mdl" }, //7
50 {"AWP | Phobos", "models/bigbrotherz_awp/awp8.mdl" }, //8
51 {"AWP | Dragon_Lore", "models/bigbrotherz_awp/awp9.mdl" }, //9
52 {"AWP | Fever_Dream", "models/bigbrotherz_awp/awp10.mdl" }, //10
53 {"AWP | Elite Build", "models/bigbrotherz_awp/awp11.mdl" }, //11
54 {"AWP | Golden", "models/bigbrotherz_awp/awp12.mdl" }, //12
55 {"AWP | White Tiger", "models/bigbrotherz_awp/awp13.mdl" }, //13
56 {"AWP | Oni Taiji", "models/bigbrotherz_awp/awp14.mdl" }, //14
57 {"AWP | Stress Free", "models/bigbrotherz_awp/awp15.mdl" }, //15
58 {"AWP | Longun", "models/bigbrotherz_awp/awp16.mdl" }, //16
59 {"AWP | Jacket", "models/bigbrotherz_awp/awp17.mdl" }, //17
60 {"AWP | Elf Ranger", "models/bigbrotherz_awp/awp18.mdl" }, //18
61 {"AWP | MLG", "models/bigbrotherz_awp/awp19.mdl" }, //19
62 {"AWP | Zebra", "models/bigbrotherz_awp/awp20.mdl" }, //20
63 {"AWP | Rave", "models/bigbrotherz_awp/awp21.mdl" }, //21
64 {"AWP | Cyrex", "models/bigbrotherz_awp/awp22.mdl" }, //22
65 {"AWP | TheProjecT", "models/bigbrotherz_awp/awp23.mdl" }, //23
66 {"AWP | Iron Man", "models/bigbrotherz_awp/awp24.mdl" }, //24
67 {"AWP | Southeast Tiger", "models/bigbrotherz_awp/awp25.mdl" }, //25
68 {"AWP | Abstract", "models/bigbrotherz_awp/awp26.mdl" }, //26
69 {"AWP | Mosin Nagant", "models/bigbrotherz_awp/awp27.mdl" }, //27
70 {"AWP | Stinger", "models/bigbrotherz_awp/awp28.mdl" }, //28
71 {"AWP | Celestial", "models/bigbrotherz_awp/awp29.mdl" }, //29
72 {"AWP | Blue Bubbles", "models/bigbrotherz_awp/awp30.mdl" }, //30
73 {"AWP | Eternal Dragon", "models/bigbrotherz_awp/awp31.mdl" }, //31
74 {"AWP | Xmas", "models/bigbrotherz_awp/awp32.mdl" }, //32
75 {"AWP | SprayTime", "models/bigbrotherz_awp/awp33.mdl" }, //33
76 {"AWP | Fire Blaze", "models/bigbrotherz_awp/awp34.mdl" }, //34
77 {"AWP | Green Energy", "models/bigbrotherz_awp/awp35.mdl" }, //35
78 {"AWP | Graffiti", "models/bigbrotherz_awp/awp36.mdl" }, //36
79 {"AWP | Kar98k", "models/bigbrotherz_awp/awp37.mdl" }, //37
80 {"AWP | Engraving", "models/bigbrotherz_awp/awp38.mdl" }, //38
81 {"AWP | Tiger Domination", "models/bigbrotherz_awp/awp39.mdl" }, //39
82 {"AWP | Blue Tiger", "models/bigbrotherz_awp/awp40.mdl" }, //40
83 {"AWP | Reptile Lightning", "models/bigbrotherz_awp/awp41.mdl" }, //41
84 {"AWP | Pulse", "models/bigbrotherz_awp/awp42.mdl" }, //42
85 {"AWP | Fire", "models/bigbrotherz_awp/awp43.mdl" }, //43
86 {"AWP | Color Z", "models/bigbrotherz_awp/awp44.mdl" }, //44
87 {"AWP | Inferno", "models/bigbrotherz_awp/awp45.mdl" }, //45
88 {"AWP | Silver Red Camo", "models/bigbrotherz_awp/awp46.mdl" }, //46
89 {"AWP | Razer", "models/bigbrotherz_awp/awp47.mdl" }, //47
90 {"AWP | Snow Tiger", "models/bigbrotherz_awp/awp48.mdl" }, //48
91 {"AWP | BOOM", "models/bigbrotherz_awp/awp49.mdl" }, //49
92 {"AWP | Bomb Snow", "models/bigbrotherz_awp/awp50.mdl" }, //50
93 {"AWP | Saints Row", "models/bigbrotherz_awp/awp51.mdl" }, //51
94 {"AWP | Laser", "models/bigbrotherz_awp/awp52.mdl" }, //52
95 {"AWP | White", "models/bigbrotherz_awp/awp53.mdl" }, //53
96 {"AWP | Green Camo", "models/bigbrotherz_awp/awp54.mdl" }, //54
97 {"AWP | Fast", "models/bigbrotherz_awp/awp55.mdl" }, //55
98 {"AWP | Rust", "models/bigbrotherz_awp/awp56.mdl" }, //56
99 {"AWP | Airsoft", "models/bigbrotherz_awp/awp57.mdl" }, //57
100 {"AWP | L96A1", "models/bigbrotherz_awp/awp58.mdl" }, //58
101 {"AWP | SG3000", "models/bigbrotherz_awp/awp59.mdl" }, //59
102 {"AWP | Azure Fantasy", "models/bigbrotherz_awp/awp60.mdl" }, //60
103 {"AWP | Shadow", "models/bigbrotherz_awp/awp61.mdl" }, //61
104 {"AWP | Emerald", "models/bigbrotherz_awp/awp62.mdl" }, //62
105 {"AWP | Tiger Tooth", "models/bigbrotherz_awp/awp63.mdl" }, //63
106 {"AWP | Blue Hive", "models/bigbrotherz_awp/awp64.mdl" }, //64
107 {"AWP | Taan", "models/bigbrotherz_awp/awp65.mdl" }, //65
108 {"AWP | Warface AS50", "models/bigbrotherz_awp/awp66.mdl" }, //66
109 {"AWP | Zombie", "models/bigbrotherz_awp/awp67.mdl" }, //67
110 {"AWP | Race Stripes", "models/bigbrotherz_awp/awp68.mdl" }, //68
111 {"AWP | European", "models/bigbrotherz_awp/awp69.mdl" }, //69
112 {"AWP | Lee-Enfield" , "models/bigbrotherz_awp/awp70.mdl"}, //70
113 {"AWP | Remington XM2010", "models/bigbrotherz_awp/awp71.mdl" }, //71
114 {"AWP | Magma", "models/bigbrotherz_awp/awp72.mdl" }, //72
115 {"AWP | Death Valley", "models/bigbrotherz_awp/awp73.mdl" }, //73
116 {"AWP | Hawking" , "models/bigbrotherz_awp/awp74.mdl"}, //74
117 {"AWP | Medusa", "models/bigbrotherz_awp/awp75.mdl" }, //75
118 {"AWP | Atheris", "models/bigbrotherz_awp/awp76.mdl" } //76
119};
120new const cKnifeSkin[][eWeaponData] ={
121 {"KÉS | ALAP","models/v_knife.mdl" }, //0
122 {"KÉS | Asiimov Butterfly", "models/bigbrotherz_awp/knife1.mdl" }, //1
123 {"KÉS | Lore Butterfly", "models/bigbrotherz_awp/knife2.mdl" }, //2
124 {"KÉS | Slaughter Huntsman", "models/bigbrotherz_awp/knife3.mdl" }, //3
125 {"KÉS | Doppler Bayonet", "models/bigbrotherz_awp/knife4.mdl" }, //4
126 {"KÉS | Fade Karambit", "models/bigbrotherz_awp/knife5.mdl" }, //5
127 {"KÉS | Gamma Doppler Karambit" , "models/bigbrotherz_awp/knife6.mdl" }, //6
128 {"KÉS | Autotronic Gut", "models/bigbrotherz_awp/knife7.mdl" }, //7
129 {"KÉS | Crimson Web M9 Bayonet", "models/bigbrotherz_awp/knife8.mdl" }, //8
130 {"KÉS | Case Hardened Karambit ", "models/bigbrotherz_awp/knife9.mdl" }, //9
131 {"KÉS | Hyper Beast Karambit", "models/bigbrotherz_awp/knife10.mdl" }, //10
132 {"KÉS | Superfurry Butterfly", "models/bigbrotherz_awp/knife11.mdl" }, //11
133 {"KÉS | Script Booster Karambit" , "models/bigbrotherz_awp/knife12.mdl" }, //12
134 {"KÉS | Tempered Flip", "models/bigbrotherz_awp/knife13.mdl" }, //13
135 {"KÉS | Lore Bayonet", "models/bigbrotherz_awp/knife14.mdl" }, //14
136 {"KÉS | Toxic Waste Huntsman", "models/bigbrotherz_awp/knife15.mdl" }, //15
137 {"KÉS | Combine Shadow Daggers", "models/bigbrotherz_awp/knife16.mdl" }, //16
138 {"KÉS | Redux Falchion", "models/bigbrotherz_awp/knife17.mdl" }, //17
139 {"KÉS | Lionfish M9 Bayonet", "models/bigbrotherz_awp/knife18.mdl" }, //18
140 {"KÉS | Space Gut", "models/bigbrotherz_awp/knife19.mdl" }, //19
141 {"KÉS | Nathlose Gut", "models/bigbrotherz_awp/knife20.mdl" }, //20
142 {"KÉS | Psychedelic Karambit", "models/bigbrotherz_awp/knife21.mdl" }, //21
143 {"KÉS | Aber Shark Karambit", "models/bigbrotherz_awp/knife22.mdl" }, //22
144 {"KÉS | Ultraviolet Falchion", "models/bigbrotherz_awp/knife23.mdl" }, //23
145 {"KÉS | Astro Bayonet", "models/bigbrotherz_awp/knife24.mdl" }, //24
146 {"KÉS | Paladin Shadow Daggers", "models/bigbrotherz_awp/knife25.mdl" }, //25
147 {"KÉS | Ultraviolet Stiletto", "models/bigbrotherz_awp/knife26.mdl" }, //26
148 {"KÉS | Reactor M9 Bayone", "models/bigbrotherz_awp/knife27.mdl" }, //27
149 {"KÉS | Fine Gold Stiletto", "models/bigbrotherz_awp/knife28.mdl" }, //28
150 {"KÉS | Marble Fade Ursus", "models/bigbrotherz_awp/knife29.mdl" }, //29
151 {"KÉS | Fade Navaja", "models/bigbrotherz_awp/knife30.mdl" }, //30
152 {"KÉS | Polymer M9 Bayonet", "models/bigbrotherz_awp/knife31.mdl" }, //31
153 {"KÉS | Boom Bayonet", "models/bigbrotherz_awp/knife32.mdl" }, //32
154 {"KÉS | Acid Etched Huntsman" , "models/bigbrotherz_awp/knife33.mdl" } //33
155};
156
157enum _:eRanks{
158 eName[64],
159 eKill,
160}
161new g_eRanks[eRanks][MAXPLAYERS];
162new const cRanks[][eRanks] ={
163 { "Unranked", 25 },
164 { "BOT", 100 },
165 { "Idióta", 250 },
166 { "Szarzsák", 500 },
167 { "Kezdő", 700 },
168 { "Amatőr", 850 },
169 { "Valamit tud", 1000 },
170 { "Haladó I", 4000 },
171 { "Haladó II", 7000 },
172 { "Haladó III", 7800 },
173 { "Profi I", 8500 },
174 { "Profi II", 9999 },
175 { "Profi III", 10500 },
176 { "Elit I", 12000 },
177 { "Dupla Elit", 14000 },
178 { "Veszélyes", 16000 },
179 { "Brutális", 18000 },
180 { "Veterán", 2000000 },
181 { "--------------", 0 }
182};
183
184#define CHEST 2
185#define KEYS 2
186new g_iChest[CHEST][MAXPLAYERS], g_iKey[KEYS][MAXPLAYERS];
187enum _:Opening{
188 eChest[64],
189 eKeys[64]
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][33], g_sSteamID[64][33], g_sIP[64][33], g_iGift[33];
211new TetErteke[33];
212new cvarPrefix, cvarMenuPrefix;
213new g_iLastKiller[33];
214
215enum _:eQuest{
216 QuestKill,
217 QuestHs,
218 QuestDeath,
219 QuestReward,
220 QuestNs,
221
222 QuestEndKill,
223 QuestEndHs,
224 QuestEndDeath,
225 QuestEasyDone,
226 QuestHardDone,
227}
228new g_eQuest[eQuest][33];
229new bool:g_bQuestActive[33], bool:g_bQuestDeathOff[33];
230
231new gSyncHud[4];
232
233new Handle:g_SqlTuple;
234public plugin_init()
235{
236 register_plugin(PLUGIN, VERSION, AUTHOR);
237 g_SqlTuple = SQL_MakeDbTuple("87.229.115.198", "sw_u1670", "jNDDjeXHVH", "sw_server1670");
238
239 register_clcmd("say", "sayhook");
240 register_clcmd("say_team", "sayteamhook");
241
242 register_impulse(201, "checklogged");
243 register_clcmd("say /menu", "checklogged");
244 register_clcmd("say /rs", "reset_score");
245 register_clcmd("TETED", "DollarSzerencsekerek");
246
247 //RegisterHam(Ham_Spawn, "player", "VipEllenorzes", 1);
248 RegisterHam(Ham_Item_Deploy, "weapon_knife", "Fegyvervaltas", 1);
249 RegisterHam(Ham_Item_Deploy, "weapon_awp", "Fegyvervaltas", 1);
250
251 register_logevent("logevent_round_start", 2, "1=Round_Start");
252 register_event("DeathMsg", "Halal", "a");
253 register_forward(FM_ClientKill,"HookKill");
254 register_forward(FM_Touch,"ForwardTouch");
255
256 gSyncHud[0] = CreateHudSyncObj();
257 gSyncHud[1] = CreateHudSyncObj();
258 gSyncHud[2] = CreateHudSyncObj();
259 gSyncHud[3] = CreateHudSyncObj();
260
261 cvarPrefix = register_cvar("asd", "[-BiG BrotherZ-] ^3»^1");
262 cvarMenuPrefix = register_cvar("asd2", "\w[-BiG BrotherZ-]\d AWP v5.0");
263
264 set_task(1.0, "AutoCheck",_,_,_,"b");
265}
266public logevent_round_start()
267{
268 new hkt = FM_NULLENT;
269 while((hkt = find_ent_by_class(hkt, "ladadrop")))
270 engfunc(EngFunc_RemoveEntity, hkt);
271}
272public dropdobas()
273{
274 new victim = read_data(2);
275
276 static Float:origin[3];
277 pev(victim, pev_origin, origin);
278
279 new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
280 origin[2] -= 36;
281 engfunc(EngFunc_SetOrigin, ent, origin);
282
283 if(!pev_valid(ent))
284 return PLUGIN_HANDLED;
285
286 set_pev(ent, pev_classname, "ladadrop");
287 entity_set_model(ent, "models/lada/ladadrop.mdl");
288 dllfunc(DLLFunc_Spawn, ent);
289 set_pev(ent, pev_solid, SOLID_BBOX);
290 set_pev(ent, pev_movetype, MOVETYPE_NONE);
291 engfunc(EngFunc_SetSize, ent, Float:{-23.160000, -13.660000, -0.050000}, Float:{11.470000, 12.780000, 6.720000});
292 engfunc(EngFunc_DropToFloor, ent);
293
294 return PLUGIN_HANDLED;
295}
296public ForwardTouch(ent, id)
297{
298 if(pev_valid(ent))
299 {
300 new classname[32];
301 pev(ent, pev_classname, classname, charsmax(classname));
302
303 if(!equal(classname, "ladadrop"))
304 return FMRES_IGNORED;
305
306 if(!g_iLastKiller[id])
307 {
308 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());
309 return FMRES_SUPERCEDE;
310 }
311
312 TalalLada(id);
313
314 engfunc(EngFunc_RemoveEntity, ent);
315 }
316 return FMRES_IGNORED;
317}
318public TalalLada(id)
319{ new iRandom, iRnd;
320 iRandom = random_num(40, 150);
321 iRnd = random_num(1, 34);
322
323 switch(random_num(0, 100))
324 {
325 case 0..50:
326 {
327 g_ePlayer[eHungarianForint][id]+=iRandom;
328 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);
329 }
330 case 51..55:
331 {
332 g_ePlayer[ePP][id] ++;
333 client_print_color(id, print_team_default, "^4%s ^1Találtál a földön lévő dobozból +1 PPt.",get_cprefix());
334 }
335 case 56..57:
336 {
337 g_ePlayer[eHungarianForint][id]+=iRandom;
338 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);
339 }
340 case 58..99:
341 {
342 g_ePlayer[eXp][id]+=iRnd;
343 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);
344 }
345 case 100:
346 {
347 g_iAllKnife[iRnd][id]++;
348 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]);
349 }
350 }
351}
352public checklogged(id)
353{
354 if(get_player_loggedIn(id))
355 m_mainmenu(id);
356 else
357 client_cmd(id, "say /regfomenu");
358}
359get_cprefix()
360{
361 new sPrefix[32];
362 get_pcvar_string(cvarPrefix, sPrefix, charsmax(sPrefix));
363 return sPrefix;
364}
365get_mprefix()
366{
367 new sPrefix1[32];
368 get_pcvar_string(cvarMenuPrefix, sPrefix1, charsmax(sPrefix1));
369 return sPrefix1;
370}
371public sayhook(id)
372{
373 new Message[512];
374 read_args(Message, charsmax(Message));
375 remove_quotes(Message);
376
377 if(strlen(Message) == 0 || Message[0] == '/')
378 return PLUGIN_HANDLED;
379
380 new Death[16], sName[64];
381 get_user_name(id, sName, charsmax(sName));
382
383 new sRank[64], sColor[16];
384
385 if(get_user_flags(id) & TULAJ)
386 {sRank = "^4[^3Tulajdonos^4]"; sColor = "^4";}
387 else if(get_user_flags(id) & FOADMIN)
388 {sRank = "^4[^3FőAdmin^4]"; sColor = "^4";}
389 else if(get_user_flags(id) & ADMIN)
390 {sRank = "Admin"; sColor = "^4";}
391 else if(get_user_flags(id) & PVIP)
392 {sRank = "Prémium V.I.P"; sColor = "^4";}
393 else if(get_user_flags(id) & VIP)
394 {sRank = "V.I.P"; sColor = "^3";}
395 else
396 {sRank = "Játékos"; sColor = "^1";}
397
398 for(new i = 1; i <= get_maxplayers(); i++)
399 {
400 if(is_user_connected(i) && !is_user_bot(i))
401 {
402 formatex(Death, charsmax(Death), is_user_alive(id) ? "":"*Halott*");
403 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);
404 }
405 }
406 return PLUGIN_HANDLED;
407}
408public sayteamhook(id)
409{
410 new Message[192];
411 read_args(Message, charsmax(Message));
412 remove_quotes(Message);
413
414 if(strlen(Message) == 0 || Message[0] == '/')
415 return PLUGIN_HANDLED;
416
417 new Death[16], sName[MAX_NAME_LENGTH];
418 get_user_name(id, sName, charsmax(sName));
419
420 new iTeam, sTeam[32];
421 iTeam = get_user_team(id, sTeam, charsmax(sTeam));
422
423 switch(iTeam)
424 {
425 case CS_TEAM_CT: sTeam = "CT";
426 case CS_TEAM_T: sTeam = "T";
427 case CS_TEAM_SPECTATOR: sTeam = "SPEC";
428 }
429 for(new i = 1; i <= get_maxplayers(); i++)
430 {
431 if(is_user_connected(i) && !is_user_bot(i))
432 {
433 formatex(Death, charsmax(Death), is_user_alive(id) ? "":"*Halott*");
434 client_print_color(i, print_team_default, "%s^3[%s] ^1%s: ^3%s", Death, sTeam, sName, Message);
435 }
436 }
437 return PLUGIN_HANDLED;
438}
439public HookKill(id)
440{
441 client_print_color(id, print_team_default, "^4%s ^1Nem ölheted meg magad!", get_cprefix());
442 return FMRES_SUPERCEDE;
443}
444public reset_score(id)
445{
446 cs_set_user_deaths(id, 0);set_user_frags(id, 0);cs_set_user_deaths(id, 0);set_user_frags(id, 0);
447 client_print_color(id, print_team_default, "^4%s ^1Eredményjelződ törölve lett!", get_cprefix());
448 client_print_color(id, print_team_default, "^4%s ^1Kiégett. Nullázta a statját Név: ^4%s ^1!", get_cprefix(), g_sName[id]);
449}
450public AutoCheck()
451{
452 new p[32],n;
453 get_players(p,n,"ch");
454 for(new i=0;i<n;i++)
455 {
456 new id = p[i];
457 InfoHud(id);
458 }
459}
460/*public VipEllenorzes(id)
461{
462 if(Vip[id] >= 1)
463 set_user_flags(id, get_user_flags(id) | VIP);
464}*/
465public InfoHud(id)
466{
467 if(g_bHudOFFON[id] == true)
468 return;
469
470 new idT, ido[64], datum[64], sRank[64],iTimes[4];
471 new CurrentPlayers = get_playersnum();
472 new MaxPlayers = get_maxplayers();
473 new Target = pev(id, pev_iuser1) == 4 ? pev(id, pev_iuser2) : id;
474
475 get_time("%H:%M:%S", ido, charsmax(ido));
476 get_time("%Y.%m.%d", datum, charsmax(datum));
477
478 idT = is_user_alive(id) ? id:Target;
479
480 iTimes[0] = g_ePlayer[eSec][idT] + get_user_time(idT);
481 iTimes[1] = iTimes[0] / 60;
482 iTimes[2] = iTimes[1] / 60;
483 iTimes[3] = iTimes[2] / 24;
484 iTimes[0] = iTimes[0] - iTimes[1] * 60;
485 iTimes[1] = iTimes[1] - iTimes[2] * 60;
486 iTimes[2] = iTimes[2] - iTimes[3] * 24;
487
488 if(get_user_flags(id) & TULAJ)
489 sRank = "Tulajdonos";
490 else if(get_user_flags(id) & FOADMIN)
491 sRank = "FőAdminisztrátor";
492 else if(get_user_flags(id) & ADMIN)
493 sRank = "Adminisztrátor";
494 else if(get_user_flags(id) & PVIP)
495 sRank = "Prémium V.I.P";
496 else if(get_user_flags(id) & VIP)
497 sRank = "V.I.P";
498 else
499 sRank = "Játékos";
500
501 if(g_iHudChange[id] == 0)
502 {
503 if(g_ePlayer[eCounter][id] < 100 && g_ePlayer[eCounter][id] != 100)
504 {
505 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
506 ShowSyncHudMsg(id, gSyncHud[0], "Üdv:^nForint:^nPP pontok:^nJátékidő:^nSzint/XP:^nStátusz:^n^nAktív AWP:^nAktív KÉS:");
507 set_hudmessage(0, 255, 0, 0.01, 0.151, 0, 6.0, 1.1, 0.0, 0.0, -1);
508 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]);
509 g_ePlayer[eCounter][id]++;
510 return;
511 }
512 else
513 {
514 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
515 ShowSyncHudMsg(id, gSyncHud[2], "Jelenlegi idő:^nDátum:^nJátékosok:");
516 set_hudmessage(0, 255, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
517 ShowSyncHudMsg(id, gSyncHud[3], " %s^n %s^n %d/%d", ido, datum, CurrentPlayers, MaxPlayers);
518 g_ePlayer[eCounter][id]++;
519 }
520
521 if(g_ePlayer[eCounter][id] == 150)
522 g_ePlayer[eCounter][id] = 0;
523
524 return;
525 }
526 else if(g_iHudChange[id] == 1)
527 {
528 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.1, 0.2, -1);
529 ShowSyncHudMsg(id, gSyncHud[0], "Üdv:^nForint:^nPP pontok:^nJátékidő:^nSzint/XP:^nStátusz:^n^nAktív AWP:^nAktív KÉS:");
530 set_hudmessage(0, 255, 0, 0.01, 0.151, 0, 6.0, 1.1, 0.0, 0.0, -1);
531 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]);
532
533 return;
534 }
535 else if(g_iHudChange[id] == 2)
536 {
537 set_hudmessage(255, 255, 255, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
538 ShowSyncHudMsg(id, gSyncHud[2], "Jelenlegi idő:^nDátum:^nJátékosok:");
539 set_hudmessage(0, 255, 0, 0.01, 0.15, 0, 6.0, 1.1, 0.0, 0.0, -1);
540 ShowSyncHudMsg(id, gSyncHud[3], " %s^n %s^n %d/%d", ido, datum, CurrentPlayers, MaxPlayers);
541 }
542}
543public plugin_precache()
544{
545 for(new i = 0; i < sizeof(cAwpSkin); i++)
546 precache_model(cAwpSkin[i][eWeaponFile]);
547
548 for(new i = 0; i < sizeof(cKnifeSkin); i++)
549 precache_model(cKnifeSkin[i][eWeaponFile]);
550
551 precache_model("models/knife/knife.mdl");
552 precache_model("models/lada/ladadrop.mdl");
553}
554public Fegyvervaltas(iEnt)
555{
556 new id = get_pdata_cbase(iEnt, 41, 4);
557
558 if(!is_user_alive(id) || !is_user_connected(id))
559 return HAM_IGNORED;
560
561 if(g_bSkinOFFON[id] == true)
562 return HAM_IGNORED;
563
564 new Weapon = cs_get_weapon_id(iEnt);
565
566 switch(Weapon)
567 {
568 case CSW_AWP:
569 {
570 if(Skin[0][id] == -1)
571 return HAM_IGNORED;
572 else
573 entity_set_string(id, EV_SZ_viewmodel, cAwpSkin[Skin[0][id]][eWeaponFile]);
574 }
575 case CSW_KNIFE:
576 {
577 if(Skin[1][id] == -1)
578 return HAM_IGNORED;
579 else
580 entity_set_string(id, EV_SZ_viewmodel, cKnifeSkin[Skin[1][id]][eWeaponFile]);
581 }
582 }
583 return HAM_IGNORED;
584}
585public Halal()
586{
587 new iKiller = read_data(1);
588 new iVictim = read_data(2);
589 new iHs = read_data(3);
590 new iRnd[4];
591
592 if(iKiller == iVictim || !iVictim || !iKiller)
593 return PLUGIN_HANDLED;
594
595 g_ePlayer[eKills][iKiller]++;
596
597 if(g_ePlayer[eKills][iKiller] >= g_eRanks[eKill][iKiller])
598 {
599 g_ePlayer[eRank][iKiller]++;
600 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]);
601 }
602
603 iRnd[1] = random(10);iRnd[3] = random(20); iRnd[0] = random(200);iRnd[2] = random(400);
604
605 if(iHs)
606 {
607 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
608 show_dhudmessage(iKiller, "-|+ %d XP|-", iRnd[3]);
609
610 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
611 show_dhudmessage(iKiller, "-|______|-");
612
613 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
614 show_dhudmessage(iKiller, "^n|-Szép Fejes-|");
615
616 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
617 show_dhudmessage(iKiller, "^n^n-|+ %d Pont|-", iRnd[2]);
618
619 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.12, 0, 6.0, 10.0);
620 show_dhudmessage(iKiller, "^n^n-|________|-");
621
622 g_ePlayer[eHungarianForint][iKiller] += iRnd[2];g_ePlayer[eHs][iKiller]++;g_ePlayer[eXp][iKiller]+= iRnd[3];LadaDropp(iKiller, 0);
623 dropdobas();
624 g_iLastKiller[iKiller] = iKiller;
625 }
626 else
627 {
628 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
629 show_dhudmessage(iKiller, "+ %d Forint | + %d XP", iRnd[0], iRnd[1]);
630
631 g_ePlayer[eHungarianForint][iKiller] += iRnd[0];g_ePlayer[eXp][iKiller]+= iRnd[1];LadaDropp(iKiller, 1);
632 }
633
634 if(g_bQuestActive[iVictim] == true || g_bQuestActive[iKiller] == true || g_bQuestDeathOff[iVictim] == true)
635 g_eQuest[QuestEndDeath][iVictim]++;
636
637 if(g_eQuest[QuestDeath][iVictim] == g_eQuest[QuestEndDeath][iVictim] && g_bQuestActive[iVictim] == true)
638 questend(iVictim);
639
640 if(g_bQuestActive[iKiller] == true)
641 {
642 if(g_eQuest[QuestKill][iKiller] == g_eQuest[QuestEndKill][iKiller] && g_eQuest[QuestHs][iKiller] == g_eQuest[QuestEndHs][iKiller])
643 {
644 QuestCalculator(iKiller);
645 return PLUGIN_HANDLED;
646 }
647
648 if(g_eQuest[QuestKill][iKiller] == g_eQuest[QuestEndKill][iKiller] && g_eQuest[QuestHs][iKiller] != g_eQuest[QuestEndHs][iKiller])
649 {
650 if(iHs)
651 g_eQuest[QuestEndHs][iKiller]++;
652 }
653 else
654 {
655 if(iHs)
656 {
657 g_eQuest[QuestEndHs][iKiller]++;
658 g_eQuest[QuestEndKill][iKiller]++;
659 }
660 else
661 g_eQuest[QuestEndKill][iKiller]++;
662 }
663 }
664
665 return PLUGIN_HANDLED;
666}
667public QuestCalculator(id)
668{
669 if(g_bQuestActive[id] == false)
670 {
671 if(g_bQuestDeathOff[id] == false)
672 {
673 new iRnd[2];
674 iRnd[0] = random_num(25, 100);
675 iRnd[1] = random_num(25, 45);
676
677 g_eQuest[QuestKill][id] += iRnd[0];
678 g_eQuest[QuestHs][id] += iRnd[1];
679 g_bQuestActive[id] = true;
680
681 }
682 else if(g_bQuestDeathOff[id] == true)
683 {
684 new iRnd[3];
685 iRnd[0] = random_num(150, 1000);iRnd[1] = random_num(100, 800);iRnd[2] = random_num(200, 250);
686
687 g_eQuest[QuestKill][id] += iRnd[0];g_eQuest[QuestHs][id] += iRnd[1];g_eQuest[QuestDeath][id] += iRnd[2];g_bQuestActive[id] = true;
688 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());
689 }
690
691 }
692 else if(g_bQuestActive[id] == true)
693 {
694 new iRnd[2];
695 if(g_bQuestDeathOff[id] == false)
696 {
697 if(g_eQuest[QuestKill][id] == g_eQuest[QuestEndKill][id] && g_eQuest[QuestHs][id] == g_eQuest[QuestEndHs][id])
698 {
699 iRnd[0] = random_num(10, 1000);g_ePlayer[eHungarianForint][id] += iRnd[0];
700 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]);
701
702 g_eQuest[QuestEasyDone][id]+=1;
703 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]);
704
705 g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;
706 g_bQuestActive[id] = false;
707 }
708 }
709 else
710 {
711 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])
712 {
713 iRnd[0] = random_num(200, 10000);iRnd[1] = random_num(5, 150);
714 g_ePlayer[eHungarianForint][id] += iRnd[0];g_ePlayer[ePP][id] += iRnd[1];
715 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]);
716
717 g_eQuest[QuestHardDone][id]+=1;
718 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]);
719
720 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;
721 g_bQuestActive[id] = false;
722 }
723 }
724 }
725}
726public questend(id)
727{
728 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());
729 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]);
730
731 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;
732 g_bQuestActive[id] = false;
733}
734public client_PreThink(id)
735{
736 if(g_ePlayer[eXp][id] >= 150)
737 {
738 g_ePlayer[eLvl][id]++;g_ePlayer[eXp][id]-= 150;g_ePlayer[eXp][id] += 5;
739 client_print_color(id, print_team_default, "^4%s ^3%s ^1Szintet lépett!", get_cprefix(), g_sName[id]);
740 }
741}
742public LadaDropp(id, iNum)
743{
744 new iRnd[2];
745 switch(iNum)
746 {
747 case 0:
748 {
749 iRnd[0] = random_num(1,10);
750 switch(iRnd[0])
751 {
752 case 0..2:
753 {
754 g_ePlayer[ePP][id]++;
755 client_print_color(id, print_team_default, "^4%s ^1Kaptál egy PP Pontot.", get_cprefix());
756 }
757 case 3..4: client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());
758 case 5..6:
759 {
760 g_iChest[1][id]++;
761 client_print_color(id, print_team_default, "^4%s ^1Találtál egy KÉS ládát.", get_cprefix());
762 }
763 case 7..8: {client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());}
764 case 9..10:
765 {
766 g_iKey[1][id]++;
767 client_print_color(id, print_team_default, "^4%s ^1Találtál egy KÉS láda kulcsot.", get_cprefix());
768 }
769 }
770 }
771 case 1:
772 {
773 iRnd[1] = random_num(1,10);
774 switch(iRnd[1])
775 {
776 case 0..2:
777 {
778 g_ePlayer[eHungarianForint][id] += 10;
779 client_print_color(id, print_team_default, "^4%s ^1Kaptál 10 Forintot.", get_cprefix());
780 }
781 case 3..4: client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());
782 case 5..6:
783 {
784 g_iChest[0][id]++;
785 client_print_color(id, print_team_default, "^4%s ^1Találtál egy AWP ládát.", get_cprefix());
786 }
787 case 7..8: {client_print_color(id, print_team_default, "^4%s ^1Ezért az ölésért nem kaptál semmit!", get_cprefix());}
788 case 9..10:
789 {
790 g_iKey[0][id]++;
791 client_print_color(id, print_team_default, "^4%s ^1Találtál egy AWP láda kulcsot.", get_cprefix());
792 }
793 }
794 }
795 }
796}
797public m_mainmenu(id)
798{
799 new sText[256];
800 format(sText, charsmax(sText), "%s^n\dForint: \r%d \d| PP Pont: \r%d", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
801 new iMenu = menu_create(sText, "m_mainmenu_h");
802
803 menu_additem(iMenu, "\y»\wRaktár elosztó", "1", 0);
804 menu_additem(iMenu, "\y»\wLádaNyitás^n", "2", 0);
805 menu_additem(iMenu, "\y»\wÁruház", "3", 0);
806 menu_additem(iMenu, "\y»\wKüldetések^n", "4", 0);
807 menu_additem(iMenu, "\y»\wSzerencse Kerék", "5", 0);
808 menu_additem(iMenu, "\y»\wProfil\d/\wBeállítások^n^n", "6", 0);
809
810 formatex(sText, charsmax(sText), "\dSzinted: \r%s^n\d%s", cRanks[g_ePlayer[eKills][id]][eName], Website);
811 menu_addtext2(iMenu, sText);
812 formatex(sText, charsmax(sText), "\wHa bármi bugot/játékmenet hibát találsz keressed fel Raint.");
813 menu_addtext2(iMenu, sText);
814
815 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
816 menu_setprop(iMenu, MPROP_PERPAGE, 0);
817 menu_display(id, iMenu, 0);
818}
819public m_mainmenu_h(id, iMenu, iItem)
820{
821 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
822
823 new sData[10], sName[64];
824 new iAccess, iCallback;
825 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
826 new iKey = str_to_num(sData);
827
828 switch(iKey)
829 {
830 case 1: RaktarEloszto(id);
831 case 2: LadaNyitas(id);
832 case 3: Piac(id);
833 case 4: m_kuldetesek(id);
834 case 5: Szerencsekerek(id, 0);
835 case 6: Beallitasok(id);
836
837 }
838}
839public Piac(id)
840{
841 new sText[256];
842 format(sText, charsmax(sText), "%s^nÁruház", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
843 new iMenu = menu_create(sText, "Piac_h");
844
845 menu_additem(iMenu, "Skincsere", "1", 0);
846 menu_additem(iMenu, "Szerverbolt", "2", 0);
847 menu_additem(iMenu, "Küldés", "3", 0);
848 menu_additem(iMenu, "Skin kirakása a piacra", "4", 0);
849
850 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
851 menu_display(id, iMenu, 0);
852}
853public Piac_h(id, iMenu, iItem)
854{
855 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
856
857 new sData[10], sName[64];
858 new iAccess, iCallback;
859 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
860 new iKey = str_to_num(sData);
861
862/* switch(iKey)
863 {
864
865 }*/
866}
867public Beallitasok(id)
868{
869 new sText[256];
870 format(sText, charsmax(sText), "%s^nBeállítások", get_mprefix(), g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
871 new iMenu = menu_create(sText, "Beallitasok_h");
872
873 if(g_bSkinOFFON[id] == false)
874 menu_additem(iMenu, "Skin: \rBekapcsolva", "1", 0);
875 else
876 menu_additem(iMenu, "Skin: \dKikapcsolva", "1", 0);
877
878 if(g_bHudOFFON[id] == false)
879 menu_additem(iMenu, "Hud: \rBekapcsolva", "2", 0);
880 else
881 menu_additem(iMenu, "Hud: \dKikapcsolva", "2", 0);
882
883 if(g_iHudChange[id] == 0)
884 menu_additem(iMenu, "Hud: \rVáltakozó^n", "3", 0);
885 else if(g_iHudChange[id] == 1)
886 menu_additem(iMenu, "Hud: \dElső^n", "3", 0);
887 else if(g_iHudChange[id] == 2)
888 menu_additem(iMenu, "Hud: \dMásodik^n", "3", 0);
889
890 menu_additem(iMenu, "Jelszó megváltoztatása", "4", 0);
891 menu_additem(iMenu, "Ajándék első regisztráció^n", "5", 0);
892 menu_additem(iMenu, "Fiókinfó", "6", 0);
893
894 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
895 menu_display(id, iMenu, 0);
896}
897public Beallitasok_h(id, iMenu, iItem)
898{
899 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
900
901 new sData[10], sName[64];
902 new iAccess, iCallback;
903 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
904 new iKey = str_to_num(sData);
905
906 switch(iKey)
907 {
908 case 1: Beallitasok_p(id, 0);
909 case 2: Beallitasok_p(id, 1);
910 case 3: Beallitasok_p(id, 2);
911 case 4: { client_cmd(id, "say /changepw");}
912 case 5: Beallitasok_p(id, 3);
913 case 6: Informaciok(id);
914 }
915}
916public Beallitasok_p(id, iNum)
917{
918 switch(iNum)
919 {
920 case 0:
921 {
922 if(g_bSkinOFFON[id] == false)
923 {
924 g_bSkinOFFON[id] = true;
925 client_print_color(id, print_team_default, "^4%s^1 Kikapcsoltad a skineket.", get_cprefix());
926 Beallitasok(id);
927 }
928 else
929 {
930 g_bSkinOFFON[id] = false;
931 client_print_color(id, print_team_default, "^4%s^1 Bekapcsoltad a skineket.", get_cprefix());
932 Beallitasok(id);
933 }
934 }
935 case 1:
936 {
937 if(g_bHudOFFON[id] == false)
938 {
939 g_bHudOFFON[id] = true;
940 client_print_color(id, print_team_default, "^4%s^1 Kikapcsoltad a hudot.", get_cprefix());
941 Beallitasok(id);
942 }
943 else
944 {
945 g_bHudOFFON[id] = false;
946 client_print_color(id, print_team_default, "^4%s^1 Bekapcsoltad a hudot.", get_cprefix());
947 Beallitasok(id);
948 }
949 }
950 case 2:
951 {
952 if(g_iHudChange[id] == 0)
953 {
954 g_iHudChange[id] = 1;
955 client_print_color(id, print_team_default, "^4%s^1 Váltakozó hudra váltottál.", get_cprefix());
956 Beallitasok(id);
957 }
958 else if(g_iHudChange[id] == 1)
959 {
960 g_iHudChange[id] = 2;
961 client_print_color(id, print_team_default, "^4%s^1 Csak az első hudra váltottál.", get_cprefix());
962 Beallitasok(id);
963 }
964 else if(g_iHudChange[id] == 2)
965 {
966 g_iHudChange[id] = 0;
967 client_print_color(id, print_team_default, "^4%s^1 Csak a első hudra váltottál.", get_cprefix());
968 Beallitasok(id);
969 }
970 }
971 case 3:
972 {
973 if(g_iGift[id] == 0)
974 {
975 new iRnd[5];
976 iRnd[0] = random_num(1, 77);
977 iRnd[1] = random_num(1, 34);
978 iRnd[2] = random_num(1000, 5000);
979 iRnd[3] = random_num(200, 500);
980
981 g_iAllWp[iRnd[0]][id]++;
982 g_iAllKnife[iRnd[1]][id]++;
983 g_ePlayer[eHungarianForint][id] += iRnd[2];
984 g_ePlayer[ePP][id] += iRnd[3];
985 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]);
986 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]);
987 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]);
988 g_iGift[id] = 1;
989 }
990 else
991 {
992 client_print_color(id, print_team_default, "^4%s^1 Ezt már egyszer aktiváltad.", get_cprefix());
993 }
994
995 }
996 }
997}
998public KukaEloszto(id)
999{
1000 new sText[256];
1001 format(sText, charsmax(sText), "%s^nKuka elosztó", get_mprefix());
1002 new iMenu = menu_create(sText, "KukaEloszto_h");
1003
1004 menu_additem(iMenu, "AWP Kuka", "1", 0);
1005 menu_additem(iMenu, "KÉS Kuka^n", "2", 0);
1006
1007 menu_setprop(iMenu, MPROP_PERPAGE, 3);
1008 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1009 menu_display(id, iMenu, 0);
1010}
1011public KukaEloszto_h(id, iMenu, iItem)
1012{
1013 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1014
1015 new sData[10], sName[64];
1016 new iAccess, iCallback;
1017 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1018 new iKey = str_to_num(sData);
1019
1020 switch(iKey)
1021 {
1022 case 1: Kukaawp(id);
1023 case 2: Kukakes(id);
1024
1025 }
1026}
1027public Kukaawp(id)
1028{
1029 new sText[256], iRow[8];
1030 format(sText, charsmax(sText), "%s^nAwp Kuka \wOldal", get_mprefix());
1031 new iMenu = menu_create(sText, "Kukaawp_h");
1032
1033 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cAwpSkin[0][eWeaponName]);
1034 menu_additem(iMenu, sText, "0", 0);
1035 for(new i = 1; i < sizeof(cAwpSkin); i++)
1036 {
1037 if(g_iAllWp[i][id] > 0)
1038 {
1039 num_to_str(i, iRow, 7);
1040 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cAwpSkin[i][eWeaponName], g_iAllWp[i][id]);
1041 menu_additem(iMenu, sText,iRow);
1042 }
1043 }
1044 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
1045 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
1046 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
1047
1048 menu_display(id, iMenu, 0);
1049}
1050public Kukaawp_h(id, iMenu, iItem)
1051{
1052 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
1053
1054 new sData[10], sName[64];
1055 new iAccess, iCallback;
1056 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1057 new iKey = str_to_num(sData);
1058
1059 if(iKey == 0)
1060 {
1061 client_print_color(id, print_team_default, "^4%s^1 Az alap awpt nem törölheted.", get_cprefix());
1062 KukaEloszto(id);
1063 return PLUGIN_HANDLED;
1064 }
1065 g_iAllWp[iKey][id]--;
1066 client_print_color(id, print_team_default, "^4%s^1 Törölted az^3 %s^1 skint.", get_cprefix(), cAwpSkin[iKey][eWeaponName]);
1067 KukaEloszto(id);
1068 return PLUGIN_HANDLED;
1069}
1070public Kukakes(id)
1071{
1072 new sText[256], iRow[8];
1073 format(sText, charsmax(sText), "%s^nKés Kuka \wOldal", get_mprefix());
1074 new iMenu = menu_create(sText, "Kukakes_h");
1075
1076 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cKnifeSkin[0][eWeaponName]);
1077 menu_additem(iMenu, sText, "0", 0);
1078 for(new i = 1; i < sizeof(cKnifeSkin); i++)
1079 {
1080 if(g_iAllKnife[i][id] > 0)
1081 {
1082 num_to_str(i, iRow, 7);
1083 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cKnifeSkin[i][eWeaponName], g_iAllKnife[i][id]);
1084 menu_additem(iMenu, sText,iRow);
1085 }
1086 }
1087 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
1088 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
1089 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
1090
1091 menu_display(id, iMenu, 0);
1092}
1093public Kukakes_h(id, iMenu, iItem)
1094{
1095 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
1096
1097 new sData[10], sName[64];
1098 new iAccess, iCallback;
1099 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1100 new iKey = str_to_num(sData);
1101
1102 if(iKey == 0)
1103 {
1104 client_print_color(id, print_team_default, "^4%s^1 Az alap kést nem törölheted.", get_cprefix());
1105 KukaEloszto(id);
1106 return PLUGIN_HANDLED;
1107 }
1108 g_iAllKnife[iKey][id]--;
1109 client_print_color(id, print_team_default, "^4%s^1 Törölted az^3 %s^1 skint.", get_cprefix(), cKnifeSkin[iKey][eWeaponName]);
1110 KukaEloszto(id);
1111 return PLUGIN_HANDLED;
1112}
1113public awpraktar(id)
1114{
1115 new sText[256], iRow[8];
1116 format(sText, charsmax(sText), "%s^nAwp skinek \wOldal", get_mprefix());
1117 new iMenu = menu_create(sText, "awpraktar_h");
1118
1119 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cAwpSkin[0][eWeaponName]);
1120 menu_additem(iMenu, sText, "0", 0);
1121 for(new i = 1; i < sizeof(cAwpSkin); i++)
1122 {
1123 g_iAllWp[i][id]++;
1124 if(g_iAllWp[i][id] > 0)
1125 {
1126 num_to_str(i, iRow, 7);
1127 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cAwpSkin[i][eWeaponName], g_iAllWp[i][id]);
1128 menu_additem(iMenu, sText,iRow);
1129 }
1130 }
1131 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
1132 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
1133 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
1134
1135 menu_display(id, iMenu, 0);
1136}
1137public awpraktar_h(id, iMenu, iItem)
1138{
1139 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
1140
1141 new sData[10], sName[64];
1142 new iAccess, iCallback;
1143 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1144 new iKey = str_to_num(sData);
1145
1146 if(iKey == 0)
1147 {
1148 if(Skin[0][id] == 0)
1149 {
1150 client_print_color(id, print_team_default, "^4%s^1 Már az alap fegyvert használod!.", get_cprefix());
1151 RaktarEloszto(id);
1152 return PLUGIN_HANDLED;
1153 }
1154 else
1155 {
1156 Skin[0][id] = 0;
1157 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 ALAP AWP-t.", get_cprefix());
1158 RaktarEloszto(id);
1159 }
1160 }
1161 else
1162 {
1163 Skin[0][id] = iKey;
1164 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 %s^1 skint.", get_cprefix(), cAwpSkin[Skin[0][id]][eWeaponName]);
1165 RaktarEloszto(id);
1166 }
1167 return PLUGIN_HANDLED;
1168}
1169public kesraktar(id)
1170{
1171 new sText[256], iRow[8];
1172 format(sText, charsmax(sText), "%s^nKés skinek \wOldal", get_mprefix());
1173 new iMenu = menu_create(sText, "kesraktar_h");
1174
1175 formatex(sText, charsmax(sText), "\w%s^n\d*------====--****--====------*", cKnifeSkin[0][eWeaponName]);
1176 menu_additem(iMenu, sText, "0", 0);
1177 for(new i = 1; i < sizeof(cKnifeSkin); i++)
1178 {
1179 g_iAllKnife[i][id]++;
1180 if(g_iAllKnife[i][id] > 0)
1181 {
1182 num_to_str(i, iRow, 7);
1183 formatex(sText, charsmax(sText), "\w%s \y[\r%dDB\y]", cKnifeSkin[i][eWeaponName], g_iAllKnife[i][id]);
1184 menu_additem(iMenu, sText,iRow);
1185 }
1186
1187 }
1188 menu_setprop(iMenu, MPROP_BACKNAME, "\wVissza");
1189 menu_setprop(iMenu, MPROP_NEXTNAME, "\wKövetkező");
1190 menu_setprop(iMenu, MPROP_EXITNAME, "\wKilépés");
1191
1192 menu_display(id, iMenu, 0);
1193}
1194public kesraktar_h(id, iMenu, iItem)
1195{
1196 if(iItem == MENU_EXIT){menu_destroy(iMenu);return PLUGIN_HANDLED;}
1197
1198 new sData[10], sName[64];
1199 new iAccess, iCallback;
1200 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1201 new iKey = str_to_num(sData);
1202
1203 if(iKey == 0)
1204 {
1205 if(Skin[1][id] == 0)
1206 {
1207 client_print_color(id, print_team_default, "^4%s^1 Már az alap kést használod!.", get_cprefix());
1208 RaktarEloszto(id);
1209 return PLUGIN_HANDLED;
1210 }
1211 else
1212 {
1213 Skin[1][id] = 0;
1214 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 ALAP KÉS-t.", get_cprefix());
1215 RaktarEloszto(id);
1216 }
1217 }
1218 else
1219 {
1220 Skin[1][id] = iKey;
1221 client_print_color(id, print_team_default, "^4%s^1 Kiválasztottad az^3 %s^1 skint.", get_cprefix(), cKnifeSkin[Skin[1][id]][eWeaponName]);
1222 RaktarEloszto(id);
1223 }
1224 return PLUGIN_HANDLED;
1225}
1226public RaktarEloszto(id)
1227{
1228 new sText[256];
1229 format(sText, charsmax(sText), "%s^nRaktár elosztó", get_mprefix());
1230 new iMenu = menu_create(sText, "RaktarEloszto_h");
1231
1232 menu_additem(iMenu, "AWP raktár", "1", 0);
1233 menu_additem(iMenu, "KÉS raktár^n", "2", 0);
1234
1235 menu_additem(iMenu, "Kuka", "3", 0);
1236
1237 formatex(sText, charsmax(sText), "\wAktív AWP skin:\d %s", cAwpSkin[Skin[0][id]][eWeaponName]);
1238 menu_addtext2(iMenu, sText);
1239 formatex(sText, charsmax(sText), "\wAktív Kés skin:\d %s", cKnifeSkin[Skin[1][id]][eWeaponName]);
1240 menu_addtext2(iMenu, sText);
1241
1242 menu_setprop(iMenu, MPROP_PERPAGE, 5);
1243 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1244 menu_display(id, iMenu, 0);
1245}
1246public RaktarEloszto_h(id, iMenu, iItem)
1247{
1248 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1249
1250 new sData[10], sName[64];
1251 new iAccess, iCallback;
1252 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1253 new iKey = str_to_num(sData);
1254
1255 switch(iKey)
1256 {
1257 case 1: awpraktar(id);
1258 case 2: kesraktar(id);
1259 case 3: KukaEloszto(id);
1260
1261 }
1262}
1263public m_kuldetesek(id)
1264{
1265 new String[256];
1266 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]);
1267 new menu = menu_create(String, "m_kuldetesek_h");
1268
1269 if(g_bQuestActive[id] == false)
1270 {
1271 menu_additem(menu, "Küldetés felvétele", "1", 0);
1272
1273 if(g_bQuestDeathOff[id] == false)
1274 menu_additem(menu, "\wkönnyű", "2", 0);
1275 else
1276 menu_additem(menu, "\rnehéz", "2", 0);
1277
1278 }
1279 else
1280 {
1281 if(g_bQuestDeathOff[id] == false)
1282 {
1283 formatex(String, charsmax(String), "\dA könnyű küldetés teljesítés feltételei:", g_eQuest[QuestKill][id], g_eQuest[QuestEndKill][id]);
1284 menu_addtext2(menu, String);
1285 formatex(String, charsmax(String), "\wÖlj meg\r %d\w embert", g_eQuest[QuestKill][id]);
1286 menu_addtext2(menu, String);
1287 formatex(String, charsmax(String), "\wEbből \r%d\w fejessel^n", g_eQuest[QuestHs][id]);
1288 menu_addtext2(menu, String);
1289 formatex(String, charsmax(String), "\wMegölt emberek száma:\r %d", g_eQuest[QuestEndKill][id]);
1290 menu_addtext2(menu, String);
1291 formatex(String, charsmax(String), "\wEbből\r %d\w fejes^n", g_eQuest[QuestEndHs][id]);
1292 menu_addtext2(menu, String);
1293
1294 menu_additem(menu, "Lemondom a küldetést\r(100 Forint)", "4", 0);
1295 }
1296 else
1297 {
1298 formatex(String, charsmax(String), "\dA nehéz küldetés teljesítés feltételei:", g_eQuest[QuestKill][id], g_eQuest[QuestEndKill][id]);
1299 menu_addtext2(menu, String);
1300 formatex(String, charsmax(String), "\wÖlj meg\r %d\w embert", g_eQuest[QuestKill][id]);
1301 menu_addtext2(menu, String);
1302 formatex(String, charsmax(String), "\wEbből \r%d\w fejessel", g_eQuest[QuestHs][id]);
1303 menu_addtext2(menu, String);
1304 formatex(String, charsmax(String), "\wEnnyiszer halhatsz meg:\r %d^n", g_eQuest[QuestDeath][id]);
1305 menu_addtext2(menu, String);
1306 formatex(String, charsmax(String), "\wMegölt emberek száma:\r %d", g_eQuest[QuestEndKill][id]);
1307 menu_addtext2(menu, String);
1308 formatex(String, charsmax(String), "\wEbből\r %d\w fejes", g_eQuest[QuestEndHs][id]);
1309 menu_addtext2(menu, String);
1310 formatex(String, charsmax(String), "\wMeghaltál:\r %d", g_eQuest[QuestEndDeath][id]);
1311 menu_addtext2(menu, String);
1312
1313 menu_additem(menu, "Lemondom a küldetést\r(100 Forint)", "4", 0);
1314 }
1315 }
1316
1317 menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
1318 menu_setprop(menu, MPROP_PERPAGE, 0);
1319 menu_display(id, menu, 0);
1320}
1321public m_kuldetesek_h(id, iMenu, iItem){
1322 if(iItem == MENU_EXIT)
1323 {
1324 menu_destroy(iMenu);
1325 return;
1326 }
1327
1328 new sData[9], sName[64];
1329 new iAccess, iCallback;
1330 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1331 new iKey = str_to_num(sData);
1332
1333 switch(iKey)
1334 {
1335 case 1:
1336 {
1337 if(g_bQuestActive[id] == false)
1338 {
1339 QuestCalculator(id);
1340 m_kuldetesek(id);
1341 }
1342 else
1343 m_kuldetesek(id);
1344 }
1345 case 2:
1346 {
1347 if(g_bQuestDeathOff[id] == false && g_bQuestActive[id] == false)
1348 {
1349 g_bQuestDeathOff[id] = true;
1350 client_print_color(id, print_team_default, "^4%s ^1átváltottad^3 nehéz^1 küldetésre", get_cprefix());
1351 m_kuldetesek(id);
1352 }
1353 else if(g_bQuestDeathOff[id] == true && g_bQuestActive[id] == false)
1354 {
1355 g_bQuestDeathOff[id] = false;
1356 client_print_color(id, print_team_default, "^4%s ^1átváltottad^3 könnyű^1 küldetésre", get_cprefix());
1357 m_kuldetesek(id);
1358 }
1359 else if(g_bQuestActive[id] == false)
1360 m_kuldetesek(id);
1361 }
1362 case 3: m_kuldetesek(id);
1363 case 4:
1364 {
1365 if(g_bQuestActive[id] == false)
1366 return;
1367 else
1368 {
1369 if(g_ePlayer[eHungarianForint][id] < 100)
1370 {
1371 client_print_color(id, print_team_default, "^4%s ^1Nincs^3 100^1 forintod, hogy lemondjad a küldetést!", get_cprefix());
1372 return;
1373 }
1374
1375 g_bQuestDeathOff[id] = false;g_eQuest[QuestKill][id] = 0;g_eQuest[QuestHs][id] = 0;g_eQuest[QuestDeath][id] = 0;
1376 g_bQuestActive[id] = false;g_eQuest[QuestEndKill][id] = 0;g_eQuest[QuestEndHs][id] = 0;g_eQuest[QuestEndDeath][id] = 0;g_ePlayer[eHungarianForint][id] -= 100;
1377 client_print_color(id, print_team_default, "^4%s ^1Sikeresen lemondtad a küldetést!", get_cprefix());
1378 }
1379 }
1380 }
1381}
1382public LadaNyitas(id)
1383{
1384 new sText[256];
1385 format(sText, charsmax(sText), "%s^nLádanyitás", get_mprefix());
1386 new iMenu = menu_create(sText, "LadaNyitas_h");
1387
1388 menu_additem(iMenu, "AWP Láda", "1", 0);
1389 menu_additem(iMenu, "KÉS Láda^n", "2", 0);
1390
1391 formatex(sText, charsmax(sText), "\wAWP láda:\d %d\w | Kulcs:\d %d", g_iChest[0][id], g_iKey[0][id]);
1392 menu_addtext2(iMenu, sText);
1393 formatex(sText, charsmax(sText), "\wKÉS láda:\d %d\w | Kulcs:\d %d", g_iChest[1][id], g_iKey[1][id]);
1394 menu_addtext2(iMenu, sText);
1395
1396 menu_setprop(iMenu, MPROP_PERPAGE, 5);
1397 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1398 menu_display(id, iMenu, 0);
1399}
1400public LadaNyitas_h(id, iMenu, iItem)
1401{
1402 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1403
1404 new sData[10], sName[64];
1405 new iAccess, iCallback;
1406 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1407 new iKey = str_to_num(sData);
1408
1409 switch(iKey)
1410 {
1411 case 1:
1412 {
1413 if(g_iChest[0][id] < 1)
1414 {
1415 client_print_color(id, print_team_default, "^4%s^1 Nincs Awp ládád!", get_cprefix());
1416 return;
1417 }
1418 if(g_iKey[0][id] < 1)
1419 {
1420 client_print_color(id, print_team_default, "^4%s^1 Nincs Awp láda kulcsod!", get_cprefix());
1421 return;
1422 }
1423
1424 g_iChest[0][id]--;
1425 g_iKey[0][id]--;
1426 Talal(id, 1);
1427 }
1428 case 2:
1429 {
1430 if(g_iChest[1][id] < 1)
1431 {
1432 client_print_color(id, print_team_default, "^4%s^1 Nincs Kés ládád!", get_cprefix());
1433 return;
1434 }
1435 if(g_iKey[1][id] < 1)
1436 {
1437 client_print_color(id, print_team_default, "^4%s^1 Nincs Kés láda kulcsod!", get_cprefix());
1438 return;
1439 }
1440
1441 g_iChest[1][id]--;
1442 g_iKey[1][id]--;
1443 Talal(id, 0);
1444 }
1445
1446 }
1447}
1448public Talal(id, iNum)
1449{
1450 new Nev[32]; get_user_name(id, Nev, 31);
1451 new FegyverID = random_num(1, 76);
1452 new KesID = random_num(1, 33);
1453 new iPrevious = -1;
1454 new iRnd;
1455 iRnd = random_num(1,5);
1456
1457 switch(iNum)
1458 {
1459 case 0:
1460 {
1461 if(KesID == iPrevious)
1462 {
1463 Talal(id, 0);
1464 return;
1465 }
1466 if(iRnd == 1 || iRnd == 2 || iRnd == 3 || iRnd == 4)
1467 {
1468 g_iAllKnife[KesID][id]++;
1469 client_print_color(id, print_team_default, "^4%s ^1Nyitottál egy ^4%s ^1skint", get_cprefix(), cKnifeSkin[KesID][eWeaponName]);
1470 iPrevious = KesID;
1471 }
1472 else
1473 {
1474 new iRnd = random_num(10,100);
1475 g_ePlayer[eHungarianForint][id] += iRnd;
1476 g_ePlayer[ePP][id]++;
1477 client_print_color(id, print_team_default, "^4%s ^1Skin helyett kaptal +1 PP pontot es %d Forintot", get_cprefix(), iRnd);
1478 }
1479 }
1480 case 1:
1481 {
1482 if(FegyverID == iPrevious)
1483 {
1484 Talal(id, 1);
1485 return;
1486 }
1487 if(iRnd == 1 || iRnd == 2 || iRnd == 3 || iRnd == 4)
1488 {
1489 g_iAllWp[FegyverID][id]++;
1490 client_print_color(id, print_team_default, "^4%s ^1Nyitottál egy ^4%s ^1skint", get_cprefix(), cAwpSkin[FegyverID][eWeaponName]);
1491 iPrevious = FegyverID;
1492 }
1493 else
1494 {
1495 new iRnd = random_num(50,150);
1496 g_ePlayer[eHungarianForint][id] += iRnd;
1497 client_print_color(id, print_team_default, "^4%s ^1Skin helyett kaptal %d Forintot", get_cprefix(), iRnd);
1498 }
1499
1500 }
1501 }
1502}
1503public Informaciok(id)
1504{
1505 new sText[256], sRegDate[128], iTimes[4];
1506 format(sText, charsmax(sText), "%s^nInformációk", get_mprefix());
1507 new iMenu = menu_create(sText, "Informaciok_h");
1508
1509 iTimes[0] = g_ePlayer[eSec][id] + get_user_time(id);
1510 iTimes[1] = iTimes[0] / 60;
1511 iTimes[2] = iTimes[1] / 60;
1512 iTimes[3] = iTimes[2] / 24;
1513 iTimes[0] = iTimes[0] - iTimes[1] * 60;
1514 iTimes[1] = iTimes[1] - iTimes[2] * 60;
1515 iTimes[2] = iTimes[2] - iTimes[3] * 24;
1516
1517 formatex(sText, charsmax(sText), "\wFelhasználó id:\d(#%d)", get_player_regID(id));
1518 menu_addtext2(iMenu, sText);
1519 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));
1520 formatex(sText, charsmax(sText), "\wRegisztrált:\d %s", sRegDate);
1521 menu_addtext2(iMenu, sText);
1522 formatex(sText, charsmax(sText), "\wForint:\d %d | \wPP pont:\d %d", g_ePlayer[eHungarianForint][id], g_ePlayer[ePP][id]);
1523 menu_addtext2(iMenu, sText);
1524 formatex(sText, charsmax(sText), "\wJátékidő:\d%d \wnap\d %d\w óra\d %d\w perc", iTimes[3], iTimes[2], iTimes[1]);
1525 menu_addtext2(iMenu, sText);
1526 formatex(sText, charsmax(sText), "\wTeljesített össz küldetések:\d %d", g_eQuest[QuestEasyDone][id]+g_eQuest[QuestHardDone][id]);
1527 menu_addtext2(iMenu, sText);
1528 formatex(sText, charsmax(sText), "\wRangod:\d %d", cRanks[g_ePlayer[eRank][id]][eName]);
1529 menu_addtext2(iMenu, sText);
1530
1531 menu_setprop(iMenu, MPROP_EXITNAME, "Kilépés");
1532 menu_display(id, iMenu, 0);
1533}
1534public Informaciok_h(id, iMenu, iItem)
1535{
1536 if(iItem == MENU_EXIT){menu_destroy(iMenu);return;}
1537
1538 new sData[10], sName[64];
1539 new iAccess, iCallback;
1540 menu_item_getinfo(iMenu, iItem, iAccess, sData, charsmax(sData), sName, charsmax(sName), iCallback);
1541 new iKey = str_to_num(sData);
1542
1543 switch(iKey)
1544 {
1545 case 1: awpraktar(id);
1546 case 2: kesraktar(id);
1547
1548 }
1549}
1550public client_disconnect(id)
1551{
1552 if(is_user_bot(id))
1553 return;
1554
1555 g_ePlayer[eHungarianForint][id] = 0;
1556 g_ePlayer[eRank][id] = 0;
1557 g_ePlayer[eKills][id] = 0;
1558 g_ePlayer[eSec][id] = 0;
1559 g_ePlayer[ePP][id] = 0;
1560 g_ePlayer[eVIP][id] = 0;
1561 g_ePlayer[eCounter][id] = 0;
1562 g_ePlayer[eLvl][id] = 0;
1563 g_ePlayer[eXp][id] = 0;
1564 g_ePlayer[eHs][id] = 0;
1565
1566 g_bHudOFFON[id] = false;
1567 g_bSkinOFFON[id] = false;
1568 g_iHudChange[id] = 0;
1569
1570 g_iChest[0][id] = 0;
1571 g_iChest[1][id] = 0;
1572 g_iKey[0][id] = 0;
1573 g_iKey[1][id] = 0;
1574 g_iGift[id] = 0;
1575
1576 g_eQuest[QuestKill][id] = 0;
1577 g_eQuest[QuestHs][id] = 0;
1578 g_eQuest[QuestDeath][id] = 0;
1579 g_bQuestDeathOff[id] = false;
1580 g_bQuestActive[id] = false;
1581 g_eQuest[QuestEndKill][id] = 0;
1582 g_eQuest[QuestEndHs][id] = 0;
1583 g_eQuest[QuestEndDeath][id] = 0;
1584 g_eQuest[QuestEasyDone][id] = 0;
1585 g_eQuest[QuestHardDone][id] = 0;
1586
1587 g_sName[id] = "";
1588}
1589public client_putinserver(id)
1590{
1591 if(is_user_bot(id))
1592 return;
1593
1594 g_sName[id] = "";
1595
1596 get_user_name(id, g_sName[id], charsmax(g_sName));
1597
1598 g_ePlayer[eHungarianForint][id] = 0;
1599 g_ePlayer[eRank][id] = 0;
1600 g_ePlayer[eKills][id] = 0;
1601 g_ePlayer[eSec][id] = 0;
1602 g_ePlayer[ePP][id] = 0;
1603 g_ePlayer[eVIP][id] = 0;
1604 g_ePlayer[eCounter][id] = 0;
1605 g_ePlayer[eLvl][id] = 0;
1606 g_ePlayer[eXp][id] = 0;
1607 g_ePlayer[eHs][id] = 0;
1608
1609 g_bHudOFFON[id] = false;
1610 g_bSkinOFFON[id] = false;
1611 g_iHudChange[id] = 0;
1612
1613 g_iChest[0][id] = 0;
1614 g_iChest[1][id] = 0;
1615 g_iKey[0][id] = 0;
1616 g_iKey[1][id] = 0;
1617 g_iGift[id] = 0;
1618
1619 g_eQuest[QuestKill][id] = 0;
1620 g_eQuest[QuestHs][id] = 0;
1621 g_eQuest[QuestDeath][id] = 0;
1622 g_bQuestDeathOff[id] = false;
1623 g_bQuestActive[id] = false;
1624
1625 g_eQuest[QuestEndKill][id] = 0;
1626 g_eQuest[QuestEndHs][id] = 0;
1627 g_eQuest[QuestEndDeath][id] = 0;
1628 g_eQuest[QuestEasyDone][id] = 0;
1629 g_eQuest[QuestHardDone][id] = 0;
1630}
1631/*public plugin_cfg()
1632{
1633 createmaintable();
1634}
1635createmaintable()
1636{
1637 static Query[10048];
1638 new Len;
1639
1640 Len += formatex(Query[Len], charsmax(Query), "CREATE TABLE IF NOT EXISTS `awpv4.5`");
1641 Len += formatex(Query[Len], charsmax(Query)-Len, "(`Nev` varchar(32) NOT NULL, ");
1642 Len += formatex(Query[Len], charsmax(Query)-Len, "`Felhasznalonev` varchar(32) NOT NULL,");
1643 Len += formatex(Query[Len], charsmax(Query)-Len, "`Jelszo` varchar(32) NOT NULL,");
1644 Len += formatex(Query[Len], charsmax(Query)-Len, "`Regisztralt` int(11) NOT NULL,");
1645 Len += formatex(Query[Len], charsmax(Query)-Len, "`Masodpercek` int(11) NOT NULL,");
1646 Len += formatex(Query[Len], charsmax(Query)-Len, "`SMS` int(11) NOT NULL,");
1647 Len += formatex(Query[Len], charsmax(Query)-Len, "`AutoB` int(11) NOT NULL,");
1648 Len += formatex(Query[Len], charsmax(Query)-Len, "`Dollars` int(11) NOT NULL,");
1649 Len += formatex(Query[Len], charsmax(Query)-Len, "`Szint` int(11) NOT NULL,");
1650 Len += formatex(Query[Len], charsmax(Query)-Len, "`Oles` int(11) NOT NULL,");
1651 Len += formatex(Query[Len], charsmax(Query)-Len, "`eXp` int(11) NOT NULL,");
1652 Len += formatex(Query[Len], charsmax(Query)-Len, "`eSzint` int(11) NOT NULL,");
1653 Len += formatex(Query[Len], charsmax(Query)-Len, "`Fejloves` int(11) NOT NULL,");
1654 Len += formatex(Query[Len], charsmax(Query)-Len, "`Elolvas` int(11) NOT NULL,");
1655 Len += formatex(Query[Len], charsmax(Query)-Len, "`DropOles` int(11) NOT NULL,");
1656 Len += formatex(Query[Len], charsmax(Query)-Len, "`Vip` int(11) NOT NULL,");
1657
1658 Len += formatex(Query[Len], charsmax(Query)-Len, "`Killq` int(11) NOT NULL,");
1659 Len += formatex(Query[Len], charsmax(Query)-Len, "`Hsq` int(11) NOT NULL,");
1660 Len += formatex(Query[Len], charsmax(Query)-Len, "`Deathq` int(11) NOT NULL,");
1661 Len += formatex(Query[Len], charsmax(Query)-Len, "`Activeq` int(11) NOT NULL,");
1662 Len += formatex(Query[Len], charsmax(Query)-Len, "`Deathoffq` int(11) NOT NULL,");
1663 Len += formatex(Query[Len], charsmax(Query)-Len, "`EndKillq` int(11) NOT NULL,");
1664 Len += formatex(Query[Len], charsmax(Query)-Len, "`EndHsq` int(11) NOT NULL,");
1665 Len += formatex(Query[Len], charsmax(Query)-Len, "`EndDeathq` int(11) NOT NULL,");
1666 Len += formatex(Query[Len], charsmax(Query)-Len, "`EasyDoneq` int(11) NOT NULL,");
1667 Len += formatex(Query[Len], charsmax(Query)-Len, "`HardDoneq` int(11) NOT NULL,");
1668
1669 for(new i;i < MAX; i++)
1670 Len += formatex(Query[Len], charsmax(Query)-Len, "`F%d` int(11) NOT NULL,", i);
1671 for(new i;i < LADA; i++)
1672 Len += formatex(Query[Len], charsmax(Query)-Len, "`L%d` int(11) NOT NULL,", i);
1673 for(new i;i < 11; i++)
1674 Len += formatex(Query[Len], charsmax(Query)-Len, "`S%d` int(11) NOT NULL,", i);
1675
1676 Len += formatex(Query[Len], charsmax(Query)-Len, "`Kulcs` int(11) NOT NULL, `id` INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY)");
1677
1678 SQL_ThreadQuery(g_SqlTuple, "createTableThread", Query);
1679}
1680public Load(id) {
1681 static Query[10048];
1682 new Data[1], Name[32];
1683 get_user_name(id, Name, 31);
1684 Data[0] = id;
1685
1686 formatex(Query, charsmax(Query), "SELECT * FROM `awpv4.5` WHERE Nev = ^"%s^";", name[id]);
1687 SQL_ThreadQuery(g_SqlTuple, "QuerySelectData", Query, Data, 1);
1688}
1689public QuerySelectData(FailState, Handle:Query, Error[], Errcode, Data[], DataSize, Float:Queuetime) {
1690 if(FailState == TQUERY_CONNECT_FAILED || FailState == TQUERY_QUERY_FAILED) {
1691 log_amx("%s", Error);
1692 return;
1693 }
1694 else {
1695 new id = Data[0];
1696
1697 if(SQL_NumRows(Query) > 0) {
1698 g_Id[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "id"));
1699 Rang[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Szint"));
1700 Dollar[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Dollars"));
1701 SMS[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "SMS"));
1702 AutoB[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "AutoB"));
1703 Oles[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Oles"));
1704 eXp[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "eXp"));
1705 eSzint[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "eSzint"));
1706 Fejloves[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Fejloves"));
1707 Elolvas[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Elolvas"));
1708 D_Oles[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DropOles"));
1709 Vip[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Vip"));
1710 Masodpercek[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Masodpercek"));
1711 SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Felhasznalonev"), regFh[id], charsmax(regFh[]));
1712 SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Jelszo"), regJelszo[id], charsmax(regJelszo[]));
1713 Regisztralt[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Regisztralt"));
1714
1715 g_eQuest[QuestKill][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Killq"));
1716 g_eQuest[QuestHs][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Hsq"));
1717 g_eQuest[QuestDeath][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Deathq"));
1718 g_bQuestActive[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Activeq"));
1719 g_bQuestDeathOff[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Deathoffq"));
1720 g_eQuest[QuestEndKill][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "EndKillq"));
1721 g_eQuest[QuestEndHs][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "EndHsq"));
1722 g_eQuest[QuestEndDeath][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "EndDeathq"));
1723
1724 g_eQuest[QuestEasyDone][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "EasyDoneq"));
1725 g_eQuest[QuestHardDone][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "HardDoneq"));
1726
1727 for(new i;i < MAX; i++)
1728 {
1729 new String[64];
1730 formatex(String, charsmax(String), "F%d", i);
1731 OsszesSkin[i][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, String));
1732 }
1733 for(new i;i < LADA; i++)
1734 {
1735 new String[64];
1736 formatex(String, charsmax(String), "L%d", i);
1737 Lada[i][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, String));
1738 }
1739 for(new i;i < 11; i++)
1740 {
1741 new String[64];
1742 formatex(String, charsmax(String), "S%d", i);
1743 Skin[i][id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, String));
1744 }
1745
1746 Kulcs[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Kulcs"));
1747 }
1748 else
1749 {
1750 Save(id);
1751 }
1752 }
1753}
1754public Save(id)
1755{
1756 static Query[256];
1757
1758 formatex(Query, charsmax(Query), "INSERT INTO `awpv4.5` (`Nev`) VALUES (^"%s^");", name[id]);
1759 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", Query);
1760}
1761public SQL_Update_Reg(id)
1762{
1763 static Query[10048];
1764 new Len;
1765
1766 Len += formatex(Query[Len], charsmax(Query), "UPDATE `awpv4.5` SET Felhasznalonev = ^"%s^", ", regFh[id]);
1767 Len += formatex(Query[Len], charsmax(Query)-Len, "Jelszo = ^"%s^", ", regJelszo[id]);
1768 Len += formatex(Query[Len], charsmax(Query)-Len, "Regisztralt = ^"%i^" WHERE Nev = ^"%s^";", Regisztralt[id], name[id]);
1769
1770 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", Query);
1771}
1772public Update(id)
1773{
1774 static Query[10048];
1775 new Len;
1776
1777 Len += formatex(Query[Len], charsmax(Query), "UPDATE `awpv4.5` SET Dollars = ^"%i^", ",Dollar[id]);
1778 Len += formatex(Query[Len], charsmax(Query)-Len, "Szint = ^"%i^", ", Rang[id]);
1779 Len += formatex(Query[Len], charsmax(Query)-Len, "Oles = ^"%i^", ", Oles[id]);
1780 Len += formatex(Query[Len], charsmax(Query)-Len, "eXp = ^"%i^", ", eXp[id]);
1781 Len += formatex(Query[Len], charsmax(Query)-Len, "eSzint = ^"%i^", ", eSzint[id]);
1782 Len += formatex(Query[Len], charsmax(Query)-Len, "Fejloves = ^"%i^", ", Fejloves[id]);
1783 Len += formatex(Query[Len], charsmax(Query)-Len, "Elolvas = ^"%i^", ", Elolvas[id]);
1784 Len += formatex(Query[Len], charsmax(Query)-Len, "DropOles = ^"%i^", ", D_Oles[id]);
1785 Len += formatex(Query[Len], charsmax(Query)-Len, "AutoB = ^"%i^", ", AutoB[id]);
1786 Len += formatex(Query[Len], charsmax(Query)-Len, "Masodpercek = ^"%i^", ", Masodpercek[id]+get_user_time(id));
1787 Len += formatex(Query[Len], charsmax(Query)-Len, "SMS = ^"%i^", ", SMS[id]);
1788 Len += formatex(Query[Len], charsmax(Query)-Len, "Vip = ^"%i^", ", Vip[id]-get_user_time(id));
1789
1790 Len += formatex(Query[Len], charsmax(Query)-Len, "Killq = ^"%i^", ", g_eQuest[QuestKill][id]);
1791 Len += formatex(Query[Len], charsmax(Query)-Len, "Hsq = ^"%i^", ", g_eQuest[QuestHs][id]);
1792 Len += formatex(Query[Len], charsmax(Query)-Len, "Deathq = ^"%i^", ", g_eQuest[QuestDeath][id]);
1793 Len += formatex(Query[Len], charsmax(Query)-Len, "Activeq = ^"%i^", ", g_bQuestActive[id]);
1794 Len += formatex(Query[Len], charsmax(Query)-Len, "Deathoffq = ^"%i^", ",g_bQuestDeathOff[id]);
1795 Len += formatex(Query[Len], charsmax(Query)-Len, "EndKillq = ^"%i^", ", g_eQuest[QuestEndKill][id]);
1796 Len += formatex(Query[Len], charsmax(Query)-Len, "EndHsq = ^"%i^", ", g_eQuest[QuestEndHs][id]);
1797 Len += formatex(Query[Len], charsmax(Query)-Len, "EndDeathq = ^"%i^", ", g_eQuest[QuestEndDeath][id]);
1798 Len += formatex(Query[Len], charsmax(Query)-Len, "EasyDoneq = ^"%i^", ", g_eQuest[QuestEasyDone][id]);
1799 Len += formatex(Query[Len], charsmax(Query)-Len, "HardDoneq = ^"%i^", ", g_eQuest[QuestHardDone][id]);
1800
1801 for(new i=0;i < MAX; i++)
1802 Len += formatex(Query[Len], charsmax(Query)-Len, "F%d = ^"%i^", ", i, OsszesSkin[i][id]);
1803
1804 for(new i;i < LADA; i++)
1805 Len += formatex(Query[Len], charsmax(Query)-Len, "L%d = ^"%i^", ", i, Lada[i][id]);
1806
1807 for(new i;i < 11; i++)
1808 Len += formatex(Query[Len], charsmax(Query)-Len, "S%d = ^"%i^", ", i, Skin[i][id]);
1809
1810 Len += formatex(Query[Len], charsmax(Query)-Len, "Kulcs = ^"%i^" WHERE Nev = ^"%s^";", Kulcs[id], name[id]);
1811
1812 SQL_ThreadQuery(g_SqlTuple, "QuerySetData", Query);
1813}
1814public createTableThread(FailState, Handle:Query, Error[], Errcode, Data[], DataSize, Float:Queuetime) {
1815 if(FailState == TQUERY_CONNECT_FAILED)
1816 set_fail_state("[HIBA*] NEM TUDTAM CSATLAKOZNI AZ ADATBAZISHOZ!");
1817 else if(FailState == TQUERY_QUERY_FAILED)
1818 set_fail_state("Query Error");
1819 if(Errcode)
1820 log_amx("[HIBA*] HIBAT DOBTAM: %s",Error);
1821}
1822public QuerySetData(FailState, Handle:Query, Error[], Errcode, Data[], DataSize, Float:Queuetime) {
1823 if(FailState == TQUERY_CONNECT_FAILED || FailState == TQUERY_QUERY_FAILED) {
1824 log_amx("%s", Error);
1825 return;
1826 }
1827}
1828public plugin_end() {
1829 SQL_FreeHandle(g_SqlTuple);
1830}*/
1831public DollarSzerencsekerek(id)
1832{
1833 new Erteke, Adatok[32];
1834 read_args(Adatok, charsmax(Adatok));
1835 remove_quotes(Adatok);
1836
1837 Erteke = str_to_num(Adatok);
1838
1839 new Hossz = strlen(Adatok);
1840
1841 if(Erteke > g_ePlayer[eHungarianForint][id])
1842 {
1843 client_print_color(id, print_team_default, "^4%s ^1Neked nincs ennyi Forintod!", get_cprefix());
1844 client_cmd(id, "messagemode TETED");
1845 }
1846 else if(Hossz > 7)
1847 {
1848 client_print_color(id, print_team_default, "^4%s ^1Az Összeg nem lehet nagyobb 1 milliónál!", get_cprefix());
1849 client_cmd(id, "messagemode TETED");
1850 }
1851 else if(Erteke < 100)
1852 {
1853 client_print_color(id, print_team_default, "^4%s ^1Csak 100 Forintod fölött lehet pörgetni!", get_cprefix());
1854 client_cmd(id, "messagemode TETED");
1855 }
1856 else
1857 {
1858 TetErteke[id] = Erteke;
1859 Szerencsekerek(id, Erteke);
1860 }
1861}
1862
1863public Szerencsekerek(id, Osszeg)
1864{
1865 new String[128], Esej[33];
1866 format(String, charsmax(String), "%s \d| \wSzerencsekerék^nForint: \r%d", get_mprefix(), g_ePlayer[eHungarianForint][id]);
1867 new menu = menu_create(String, "Szerencsekerek_h" );
1868
1869 if(Osszeg == 0)
1870 {
1871 Esej[id] = 0;
1872 }
1873 if(Osszeg >= 100 && Osszeg <= 500)
1874 {
1875 Esej[id] = random_num(1, 25);
1876 }
1877 else if(Osszeg >= 501 && Osszeg <= 1000)
1878 {
1879 Esej[id] = random_num(25, 50);
1880 }
1881 else if(Osszeg >= 1001 && Osszeg <= 2000)
1882 {
1883 Esej[id] = random_num(50, 75);
1884 }
1885 else if(Osszeg >= 2001 && Osszeg <= 5000)
1886 {
1887 Esej[id] = 100;
1888 }
1889
1890 format(String, charsmax(String), "\yTéted: \r%d Forint", TetErteke[id]);
1891 menu_additem(menu,String,"1",0);
1892 format(String, charsmax(String), "\wNyerési esély: \r%d%%", Esej[id]);
1893 menu_additem(menu,String,"2",0);
1894 format(String, charsmax(String), "\rPörgetés!");
1895 menu_additem(menu,String,"3",0);
1896
1897 menu_setprop(menu, MPROP_EXITNAME, "Kilépés");
1898 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
1899 menu_display(id, menu, 0);
1900}
1901public Szerencsekerek_h(id, menu, item){
1902 if( item == MENU_EXIT )
1903 {
1904 menu_destroy(menu);
1905 return PLUGIN_HANDLED;
1906 }
1907 new data[9], szName[64];
1908 new access, callback;
1909 menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
1910 new key = str_to_num(data);
1911
1912 switch(key)
1913 {
1914 case 1:{
1915 client_cmd(id, "messagemode TETED");
1916 }
1917 case 2:{
1918 Szerencsekerek(id, TetErteke[id]);
1919 }
1920 case 3:{
1921 if(TetErteke[id] <= 0)
1922 {
1923 client_print_color(id, print_team_default, "^4%s ^1A téted nem lehet 0, nagyobb Ä‚Összegel használhatod!", get_cprefix());
1924 }
1925 if(TetErteke[id] < 100)
1926 {
1927 client_print_color(id, print_team_default, "^4%s ^1Csak 100 Forint fölött lehet pörgetni!", get_cprefix());
1928 }
1929 else if(TetErteke[id] >= 100 || TetErteke[id] <= 500)
1930 {
1931 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
1932 SzerencseTalal(id, 0);
1933 }
1934 else if(TetErteke[id] >= 501 || TetErteke[id] <= 1000)
1935 {
1936 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
1937 SzerencseTalal(id, 0);
1938 }
1939 else if(TetErteke[id] >= 1001 || TetErteke[id] <= 2000)
1940 {
1941 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
1942 SzerencseTalal(id, 1);
1943 }
1944 else if(TetErteke[id] >= 2001 || TetErteke[id] <= 5000)
1945 {
1946 g_ePlayer[eHungarianForint][id]-=TetErteke[id];
1947 SzerencseTalal(id, 2);
1948 }
1949 }
1950 }
1951 menu_destroy(menu);
1952 return PLUGIN_HANDLED;
1953}
1954
1955public SzerencseTalal(id, key)
1956{
1957 new Nev[32]; get_user_name(id, Nev, 31);
1958
1959 if(key == 0) {
1960 switch(random_num(1, 230)) {
1961 case 1..30: {
1962 Porgetes(id);
1963 }
1964 case 31..60: {
1965 Porgetes(id);
1966 }
1967 case 61..90: {
1968 Porgetes(id);
1969 }
1970 case 91..120: {
1971 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);
1972 }
1973 case 121..150: {
1974 g_ePlayer[eHungarianForint][id] += TetErteke[id];
1975 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]);
1976 }
1977 case 151..199: {
1978 Porgetes(id);
1979 }
1980 case 200: {
1981 Porgetes(id);
1982 }
1983 case 201: {
1984 Porgetes(id);
1985 }
1986 case 202..230: {
1987 Porgetes(id);
1988 }
1989 }
1990 TetErteke[id] = 0;
1991 }
1992 if(key == 1) {
1993 switch(random_num(1, 245)) {
1994 case 1..10: {
1995 Porgetes2(id);
1996 }
1997 case 11..30: {
1998 Porgetes2(id);
1999 }
2000 case 31..60: {
2001 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);
2002 }
2003 case 61..90: {
2004 Porgetes2(id);
2005 }
2006 case 91..120: {
2007 Porgetes2(id);
2008 }
2009 case 121..150: {
2010 g_ePlayer[eHungarianForint][id] += TetErteke[id];
2011 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]);
2012 }
2013 /*case 151..199: {
2014 if(Vip[id] < get_systime(id))
2015 {
2016 Vip[id] = Vip[id] += 86400*3;
2017 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);
2018 }
2019 else
2020 {
2021 g_ePlayer[eHungarianForint][id] += TetErteke[id];
2022 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]);
2023 }
2024 }*/
2025 case 200: {
2026 Porgetes2(id);
2027 }
2028 case 201: {
2029 Porgetes2(id);
2030 }
2031 case 202..230: {
2032 Porgetes2(id);
2033 }
2034 case 231..245: {
2035 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);
2036 }
2037 }
2038 TetErteke[id] = 0;
2039 }
2040 if(key == 2) {
2041 switch(random_num(1, 250)) {
2042 case 1..10: {
2043 Porgetes3(id);
2044 }
2045 case 11..30: {
2046 Porgetes3(id);
2047 }
2048 case 31..60: {
2049 Porgetes3(id);
2050 }
2051 /*case 61..90: {
2052 if(Vip[id] < get_systime(id))
2053 {
2054 Vip[id] = Vip[id] += 86400*5;
2055 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);
2056 }
2057 else
2058 {
2059 Dollar[id] += TetErteke[id];
2060 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]);
2061 }
2062 }*/
2063 case 91..120: {
2064 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);
2065 }
2066 case 121..150: {
2067 Porgetes3(id);
2068 }
2069 case 151..199: {
2070 Porgetes3(id);
2071 }
2072 case 200: {
2073 Porgetes3(id);
2074 }
2075 case 201: {
2076 Porgetes3(id);
2077 }
2078 case 202..230: {
2079 Porgetes3(id);
2080 }
2081 /*case 231: {
2082 if(Vip[id] < get_systime(id))
2083 {
2084 Vip[id] = Vip[id] += 86400*30;
2085 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);
2086 }
2087 else
2088 {
2089 Dollar[id] += TetErteke[id];
2090 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]);
2091 }
2092 }*/
2093 case 232..235: {
2094 Porgetes3(id);
2095 }
2096 case 236..250: {
2097 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);
2098 }
2099 }
2100 TetErteke[id] = 0;
2101 }
2102}
2103public Porgetes(id)
2104{
2105 new client_name[33];
2106 get_user_name(id, client_name, 32);
2107
2108 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 };
2109 new a = random_num(0,21);
2110 new b = Szamok[a][0];
2111
2112
2113 g_iAllWp[b][id]++;
2114 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]);
2115 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
2116 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cAwpSkin[b][eWeaponName]);
2117}
2118
2119public Porgetes2(id)
2120{
2121 new client_name[33];
2122 get_user_name(id, client_name, 32);
2123
2124 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 };
2125 new a = random_num(0,21);
2126 new b = Szamok[a][0];
2127
2128 g_iAllKnife[b][id]++;
2129 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]);
2130 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
2131 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cKnifeSkin[b][eWeaponName]);
2132}
2133
2134public Porgetes3(id)
2135{
2136 new client_name[33];
2137 get_user_name(id, client_name, 32);
2138
2139 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 };
2140 new a = random_num(0,21);
2141 new b = Szamok[a][0];
2142
2143 g_iAllWp[b][id]++;
2144 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]);
2145 set_dhudmessage(random(256), random(256), random(256), -1.0, 0.20, 0, 6.0, 3.0);
2146 show_dhudmessage(id, "Pörgettél egy:^n%s -t!", cAwpSkin[b][eWeaponName]);
2147}