/
weapons.sp
676 lines (580 loc) · 20.3 KB
/
weapons.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
//includes
#include <sourcemod>
#include <cstrike>
#include <clientprefs>
#include <warden>
#include <colors>
#include <autoexecconfig>
#include <myjailbreak>
//Compiler Options
#pragma semicolon 1
#pragma newdecls required
//Booleans
bool newWeaponsSelected[MAXPLAYERS+1];
bool rememberChoice[MAXPLAYERS+1];
bool weaponsGivenThisRound[MAXPLAYERS + 1] = { false, ... };
//Handles
Handle optionsMenu1 = null;
Handle optionsMenu2 = null;
Handle optionsMenu3 = null;
Handle optionsMenu4 = null;
Handle Timers[MAXPLAYERS + 1] = null;
Handle array_primary;
Handle array_secondary;
Handle weapons1 = null;
Handle weapons2 = null;
//Handle remember = null;
//ConVars
ConVar gc_bSpawn;
ConVar gc_bPlugin;
ConVar gc_bTerror;
ConVar gc_bCTerror;
ConVar gc_bTA;
ConVar gc_bJBmenu;
ConVar gc_bAWP;
ConVar gc_bAutoSniper;
ConVar gc_bHealth;
ConVar gc_sCustomCommand;
//Strings
char primaryWeapon[MAXPLAYERS + 1][24];
char secondaryWeapon[MAXPLAYERS + 1][24];
char g_sCustomCommand[64];
enum weapons
{
String:ItemName[64],
String:desc[64]
}
public Plugin myinfo =
{
name = "MyJailbreak - Weapons",
author = "shanapu, Franc1sco",
description = "Jailbreak weapons script",
version = PLUGIN_VERSION,
url = "https://github.com/shanapu/MyJailbreak"
};
public void OnPluginStart()
{
// Translation
LoadTranslations("MyJailbreak.Weapons.phrases");
//Client Commands
RegConsoleCmd("sm_guns", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_gun", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_weapon", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_weapons", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_gunmenu", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_weaponmenu", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
RegConsoleCmd("sm_giveweapon", Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
//AutoExecConfig
AutoExecConfig_SetFile("Weapons", "MyJailbreak");
AutoExecConfig_SetCreateFile(true);
AutoExecConfig_CreateConVar("sm_weapons_version", PLUGIN_VERSION, "The version of this MyJailbreak SourceMod plugin", FCVAR_SPONLY|FCVAR_PLUGIN|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
gc_bPlugin = AutoExecConfig_CreateConVar("sm_weapons_enable", "1", "0 - disabled, 1 - enable weapons menu - you shouldn't touch these, cause events days will handle them", _, true, 0.0, true, 1.0);
gc_sCustomCommand = AutoExecConfig_CreateConVar("sm_weapons_cmd", "arms", "Set your custom chat command for Event voting. no need for sm_ or !");
gc_bTerror = AutoExecConfig_CreateConVar("sm_weapons_t", "0", "0 - disabled, 1 - enable weapons menu for T - you shouldn't touch these, cause events days will handle them", _, true, 0.0, true, 1.0);
gc_bCTerror = AutoExecConfig_CreateConVar("sm_weapons_ct", "1", "0 - disabled, 1 - enable weapons menu for CT - you shouldn't touch these, cause events days will handle them", _, true, 0.0, true, 1.0);
gc_bSpawn = AutoExecConfig_CreateConVar("sm_weapons_spawnmenu", "1", "0 - disabled, 1 - enable autoopen weapon menu on spawn", _, true, 0.0, true, 1.0);
gc_bAWP = AutoExecConfig_CreateConVar("sm_weapons_awp", "1", "0 - disabled, 1 - enable AWP in menu", _, true, 0.0, true, 1.0);
gc_bAutoSniper = AutoExecConfig_CreateConVar("sm_weapons_autosniper", "1", "0 - disabled, 1 - enable scar20 & g3sg1 in menu", _, true, 0.0, true, 1.0);
gc_bTA = AutoExecConfig_CreateConVar("sm_weapons_warden_tagrenade", "1", "0 - disabled, 1 - warden get a TA grenade with weapons", _, true, 0.0, true, 1.0);
gc_bHealth = AutoExecConfig_CreateConVar("sm_weapons_warden_healthshot", "1", "0 - disabled, 1 - warden get a healthshot with weapons", _, true, 0.0, true, 1.0);
gc_bJBmenu = AutoExecConfig_CreateConVar("sm_weapons_jbmenu", "1", "0 - disabled, 1 - enable autoopen the MyJailbreak !menu after weapon given.", _, true, 0.0, true, 1.0);
AutoExecConfig_ExecuteFile();
AutoExecConfig_CleanFile();
//Hooks
HookEvent("player_spawn", Event_PlayerSpawn);
HookConVarChange(gc_sCustomCommand, OnSettingChanged);
weapons1 = RegClientCookie("Primary Weapons", "", CookieAccess_Private);
weapons2 = RegClientCookie("Secondary Weapons", "", CookieAccess_Private);
//remember = RegClientCookie("Remember Weapons", "", CookieAccess_Private);
//FindConVar
gc_sCustomCommand.GetString(g_sCustomCommand , sizeof(g_sCustomCommand));
}
public int OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
if(convar == gc_sCustomCommand)
{
strcopy(g_sCustomCommand, sizeof(g_sCustomCommand), newValue);
char sBufferCMD[64];
Format(sBufferCMD, sizeof(sBufferCMD), "sm_%s", g_sCustomCommand);
if(GetCommandFlags(sBufferCMD) == INVALID_FCVAR_FLAGS)
RegConsoleCmd(sBufferCMD, Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
}
}
public void OnConfigsExecuted()
{
array_primary = CreateArray(128);
array_secondary = CreateArray(128);
ListWeapons();
// Create menus
optionsMenu1 = BuildOptionsMenu(true);
optionsMenu2 = BuildOptionsMenu(false);
optionsMenu3 = BuildOptionsMenuWeapons(true);
optionsMenu4 = BuildOptionsMenuWeapons(false);
char sBufferCMD[64];
Format(sBufferCMD, sizeof(sBufferCMD), "sm_%s", g_sCustomCommand);
if(GetCommandFlags(sBufferCMD) == INVALID_FCVAR_FLAGS)
RegConsoleCmd(sBufferCMD, Cmd_Weapons, "Open the weapon menu if enabled (in EventDays/for CT)");
}
Handle BuildOptionsMenu(bool sameWeaponsEnabled)
{
char info1[255], info2[255], info3[255], info4[255], info5[255], info6[255];
int sameWeaponsStyle = (sameWeaponsEnabled) ? ITEMDRAW_DEFAULT : ITEMDRAW_DISABLED;
Handle menu3 = CreateMenu(Menu_Options);
Format(info1, sizeof(info1), "%T\n ", "weapons_info_title", LANG_SERVER);
SetMenuTitle(menu3, info1);
SetMenuExitButton(menu3, true);
Format(info2, sizeof(info2), "%T", "weapons_info_choose", LANG_SERVER);
AddMenuItem(menu3, "New", info2);
Format(info3, sizeof(info3), "%T", "weapons_info_same", LANG_SERVER);
AddMenuItem(menu3, "Same 1", info3, sameWeaponsStyle);
Format(info4, sizeof(info4), "%T", "weapons_info_sameall", LANG_SERVER);
AddMenuItem(menu3, "Same All", info4, sameWeaponsStyle);
Format(info5, sizeof(info5), "%T", "weapons_info_random", LANG_SERVER);
AddMenuItem(menu3, "Random 1", info5);
Format(info6, sizeof(info6), "%T", "weapons_info_randomall", LANG_SERVER);
AddMenuItem(menu3, "Random All", info6);
return menu3;
}
public void DisplayOptionsMenu(int clientIndex)
{
if(gc_bPlugin.BoolValue)
{
if((gc_bTerror.BoolValue && GetClientTeam(clientIndex) == 2) || (gc_bCTerror.BoolValue && GetClientTeam(clientIndex) == 3))
{
if (strcmp(primaryWeapon[clientIndex], "") == 0 || strcmp(secondaryWeapon[clientIndex], "") == 0)
DisplayMenu(optionsMenu2, clientIndex, 30);
else
DisplayMenu(optionsMenu1, clientIndex, 30);
}
}
}
Handle BuildOptionsMenuWeapons(bool primary)
{
char info7[255], info8[255];
Handle menu;
int Items[weapons];
if(primary)
{
menu = CreateMenu(Menu_Primary);
Format(info7, sizeof(info7), "%T\n ", "weapons_info_prim", LANG_SERVER);
SetMenuTitle(menu, info7);
SetMenuExitButton(menu, true);
for(int i=0;i<GetArraySize(array_primary);++i)
{
GetArrayArray(array_primary, i, Items[0]);
AddMenuItem(menu, Items[ItemName], Items[desc]);
}
}
else
{
menu = CreateMenu(Menu_Secondary);
Format(info8, sizeof(info8), "%T\n ", "weapons_info_sec", LANG_SERVER);
SetMenuTitle(menu, info8);
SetMenuExitButton(menu, true);
for(int i=0;i<GetArraySize(array_secondary);++i)
{
GetArrayArray(array_secondary, i, Items[0]);
AddMenuItem(menu, Items[ItemName], Items[desc]);
}
}
return menu;
}
public int Menu_Options(Handle menu, MenuAction action, int param1, int param2)
{
if (action == MenuAction_Select)
{
char info[24];
GetMenuItem(menu, param2, info, sizeof(info));
if (StrEqual(info, "New"))
{
if (weaponsGivenThisRound[param1])
newWeaponsSelected[param1] = true;
DisplayMenu(optionsMenu3, param1, MENU_TIME_FOREVER);
rememberChoice[param1] = false;
}
else if (StrEqual(info, "Same 1"))
{
if (weaponsGivenThisRound[param1])
{
newWeaponsSelected[param1] = true;
CPrintToChat(param1, "%t %t", "weapons_tag", "weapons_same");
}
GiveSavedWeapons(param1);
rememberChoice[param1] = false;
}
else if (StrEqual(info, "Same All"))
{
if (weaponsGivenThisRound[param1])
CPrintToChat(param1, "%t %t", "weapons_tag", "weapons_sameall");
GiveSavedWeapons(param1);
rememberChoice[param1] = true;
}
else if (StrEqual(info, "Random 1"))
{
if (weaponsGivenThisRound[param1])
{
newWeaponsSelected[param1] = true;
CPrintToChat(param1, "%t %t", "weapons_tag", "weapons_random");
}
primaryWeapon[param1] = "random";
secondaryWeapon[param1] = "random";
GiveSavedWeapons(param1);
rememberChoice[param1] = false;
}
else if (StrEqual(info, "Random All"))
{
if (weaponsGivenThisRound[param1])
CPrintToChat(param1, "%t %t", "weapons_tag", "weapons_randomall");
primaryWeapon[param1] = "random";
secondaryWeapon[param1] = "random";
GiveSavedWeapons(param1);
rememberChoice[param1] = true;
}
}
}
public int Menu_Primary(Handle menu, MenuAction action, int param1, int param2)
{
if (action == MenuAction_Select)
{
char info[24];
GetMenuItem(menu, param2, info, sizeof(info));
primaryWeapon[param1] = info;
DisplayMenu(optionsMenu4, param1, MENU_TIME_FOREVER);
}
}
public int Menu_Secondary(Handle menu, MenuAction action,int param1,int param2)
{
if (action == MenuAction_Select)
{
char info[24];
GetMenuItem(menu, param2, info, sizeof(info));
secondaryWeapon[param1] = info;
GiveSavedWeapons(param1);
if (!IsPlayerAlive(param1))
newWeaponsSelected[param1] = true;
if (newWeaponsSelected[param1])
CPrintToChat(param1, "%t %t", "weapons_tag", "weapons_next");
}
}
public void OnMapStart()
{
SetBuyZones("Disable");
}
public int Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
int clientIndex = GetClientOfUserId(GetEventInt(event, "userid"));
//CancelClientMenu(clientIndex);
KillAllTimer(clientIndex);
if(gc_bSpawn.BoolValue)
{
Timers[clientIndex] = CreateTimer(1.0, GetWeapons, clientIndex);
}
}
public Action GetWeapons(Handle timer, any clientIndex)
{
Timers[clientIndex] = null;
if (GetClientTeam(clientIndex) > 1 && IsPlayerAlive(clientIndex))
{
if(gc_bPlugin.BoolValue)
{
if(gc_bSpawn.BoolValue)
{
if((gc_bTerror.BoolValue && GetClientTeam(clientIndex) == 2) || (gc_bCTerror.BoolValue && GetClientTeam(clientIndex) == 3))
{
// Give weapons or display menu.
weaponsGivenThisRound[clientIndex] = false;
if (newWeaponsSelected[clientIndex])
{
GiveSavedWeapons(clientIndex);
newWeaponsSelected[clientIndex] = false;
}
else if (rememberChoice[clientIndex])
{
GiveSavedWeapons(clientIndex);
}
else
{
DisplayOptionsMenu(clientIndex);
}
}
}
}
}
}
public Action Fix(Handle timer, any clientIndex)
{
Timers[clientIndex] = null;
if (GetClientTeam(clientIndex) > 1 && IsPlayerAlive(clientIndex))
{
GiveSavedWeaponsFix(clientIndex);
}
}
public void GiveSavedWeaponsFix(int clientIndex)
{
if (IsPlayerAlive(clientIndex))
{
if(gc_bPlugin.BoolValue)
{
if((gc_bTerror.BoolValue && GetClientTeam(clientIndex) == 2) || (gc_bCTerror.BoolValue && GetClientTeam(clientIndex) == 3))
{
//StripAllWeapons(clientIndex);
if(GetPlayerWeaponSlot(clientIndex, CS_SLOT_PRIMARY) == -1)
{
if (StrEqual(primaryWeapon[clientIndex], "random"))
{
// Select random menu item (excluding "Random" option)
int random = GetRandomInt(0, GetArraySize(array_primary)-1);
int Items[weapons];
GetArrayArray(array_primary, random, Items[0]);
GivePlayerItem(clientIndex, Items[ItemName]);
}
else GivePlayerItem(clientIndex, primaryWeapon[clientIndex]);
}
if(GetPlayerWeaponSlot(clientIndex, CS_SLOT_SECONDARY) == -1)
{
if (StrEqual(secondaryWeapon[clientIndex], "random"))
{
// Select random menu item (excluding "Random" option)
int random = GetRandomInt(0, GetArraySize(array_secondary)-1);
int Items[weapons];
GetArrayArray(array_secondary, random, Items[0]);
GivePlayerItem(clientIndex, Items[ItemName]);
}
else GivePlayerItem(clientIndex, secondaryWeapon[clientIndex]);
}
if(GetPlayerWeaponSlot(clientIndex, CS_SLOT_GRENADE) == -1) GivePlayerItem(clientIndex, "weapon_hegrenade");
weaponsGivenThisRound[clientIndex] = true;
}
}
}
}
public void SetBuyZones(const char[] status)
{
int maxEntities = GetMaxEntities();
char class[24];
for (int i = MaxClients + 1; i < maxEntities; i++)
{
if (IsValidEdict(i))
{
GetEdictClassname(i, class, sizeof(class));
if (StrEqual(class, "func_buyzone"))
AcceptEntityInput(i, status);
}
}
}
public Action Cmd_Weapons(int client,int args)
{
if(gc_bPlugin.BoolValue)
{
if (client != 0 && IsClientInGame(client))
{
rememberChoice[client] = false;
DisplayOptionsMenu(client);
return Plugin_Handled;
}
return Plugin_Continue;
}
else CPrintToChat(client, "%t %t", "weapons_tag" , "weapons_disabled");
return Plugin_Continue;
}
public void GiveSavedWeapons(int clientIndex)
{
if (!weaponsGivenThisRound[clientIndex] && IsPlayerAlive(clientIndex))
{
StripAllWeapons(clientIndex);
if (StrEqual(primaryWeapon[clientIndex], "random"))
{
// Select random menu item (excluding "Random" option)
int random = GetRandomInt(0, GetArraySize(array_primary)-1);
int Items[weapons];
GetArrayArray(array_primary, random, Items[0]);
GivePlayerItem(clientIndex, Items[ItemName]);
}
else
GivePlayerItem(clientIndex, primaryWeapon[clientIndex]);
if (StrEqual(secondaryWeapon[clientIndex], "random"))
{
// Select random menu item (excluding "Random" option)
int random = GetRandomInt(0, GetArraySize(array_secondary)-1);
int Items[weapons];
GetArrayArray(array_secondary, random, Items[0]);
GivePlayerItem(clientIndex, Items[ItemName]);
}
else
GivePlayerItem(clientIndex, secondaryWeapon[clientIndex]);
if (warden_iswarden(clientIndex))
{
if (gc_bHealth .BoolValue)
{
GivePlayerItem(clientIndex, "weapon_healthshot");
CPrintToChat(clientIndex, "%t %t", "weapons_tag", "weapons_health");
}
if (gc_bTA.BoolValue)
{
GivePlayerItem(clientIndex, "weapon_tagrenade");
CPrintToChat(clientIndex, "%t %t", "weapons_tag", "weapons_ta");
}
}
//GivePlayerItem(clientIndex, "weapon_decoy");
//GivePlayerItem(clientIndex, "weapon_flashbang");
//GivePlayerItem(clientIndex, "weapon_molotov");
//GivePlayerItem(clientIndex, "weapon_decoy");
//GivePlayerItem(clientIndex, "weapon_flashbang");
//GivePlayerItem(clientIndex, "weapon_molotov");
weaponsGivenThisRound[clientIndex] = true;
GivePlayerItem(clientIndex, "weapon_knife");
//FakeClientCommand(clientIndex,"use weapon_knife");
if (gc_bJBmenu.BoolValue)
{
FakeClientCommand(clientIndex,"sm_menu");
}
Timers[clientIndex] = CreateTimer(6.0, Fix, clientIndex);
}
}
public void OnClientPutInServer(int client)
{
ResetClientSettings(client);
}
public void OnClientCookiesCached(int client)
{
GetClientCookie(client, weapons1, primaryWeapon[client], 24);
GetClientCookie(client, weapons2, secondaryWeapon[client], 24);
//rememberChoice[client] = GetCookie(client);
rememberChoice[client] = false;
}
public void ResetClientSettings(int clientIndex)
{
weaponsGivenThisRound[clientIndex] = false;
newWeaponsSelected[clientIndex] = false;
}
public void OnClientDisconnect(int clientIndex)
{
KillAllTimer(clientIndex);
SetClientCookie(clientIndex, weapons1, primaryWeapon[clientIndex]);
SetClientCookie(clientIndex, weapons2, secondaryWeapon[clientIndex]);
/* if(rememberChoice[clientIndex]) SetClientCookie(clientIndex, remember, "On");
else SetClientCookie(clientIndex, remember, "Off"); */
}
public void KillAllTimer(int client)
{
if (Timers[client] != null)
{
KillTimer(Timers[client]);
Timers[client] = null;
}
}
public void ListWeapons()
{
ClearArray(array_primary);
ClearArray(array_secondary);
int Items[weapons];
Format(Items[ItemName], 64, "weapon_m4a1");
Format(Items[desc], 64, "M4A1");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_m4a1_silencer");
Format(Items[desc], 64, "M4A1-S");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_ak47");
Format(Items[desc], 64, "AK-47");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_famas");
Format(Items[desc], 64, "FAMAS");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_galilar");
Format(Items[desc], 64, "Galil AR");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_aug");
Format(Items[desc], 64, "AUG");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_sg556");
Format(Items[desc], 64, "SG 553");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_negev");
Format(Items[desc], 64, "Negev");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_m249");
Format(Items[desc], 64, "M249");
PushArrayArray(array_primary, Items[0]);
if (gc_bAWP.BoolValue)
{
Format(Items[ItemName], 64, "weapon_awp");
Format(Items[desc], 64, "AWP");
PushArrayArray(array_primary, Items[0]);
}
if (gc_bAutoSniper.BoolValue)
{
Format(Items[ItemName], 64, "weapon_scar20");
Format(Items[desc], 64, "SCAR-20");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_g3sg1");
Format(Items[desc], 64, "G3SG1");
PushArrayArray(array_primary, Items[0]);
}
Format(Items[ItemName], 64, "weapon_bizon");
Format(Items[desc], 64, "PP-Bizon");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_p90");
Format(Items[desc], 64, "P90");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_ump45");
Format(Items[desc], 64, "UMP-45");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_mp7");
Format(Items[desc], 64, "MP7");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_mp9");
Format(Items[desc], 64, "MP9");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_mac10");
Format(Items[desc], 64, "MAC-10");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_ssg08");
Format(Items[desc], 64, "SSG 08");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_nova");
Format(Items[desc], 64, "Nova");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_xm1014");
Format(Items[desc], 64, "XM1014");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_sawedoff");
Format(Items[desc], 64, "Sawed-Off");
PushArrayArray(array_primary, Items[0]);
Format(Items[ItemName], 64, "weapon_mag7");
Format(Items[desc], 64, "MAG-7");
PushArrayArray(array_primary, Items[0]);
// Secondary weapons
Format(Items[ItemName], 64, "weapon_deagle");
Format(Items[desc], 64, "Desert Eagle");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_elite");
Format(Items[desc], 64, "Dual Berettas");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_tec9");
Format(Items[desc], 64, "Tec-9");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_fiveseven");
Format(Items[desc], 64, "Five-SeveN");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_cz75a");
Format(Items[desc], 64, "CZ75-Auto");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_glock");
Format(Items[desc], 64, "Glock-18");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_usp_silencer");
Format(Items[desc], 64, "USP-S");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_p250");
Format(Items[desc], 64, "P250");
PushArrayArray(array_secondary, Items[0]);
Format(Items[ItemName], 64, "weapon_hkp2000");
Format(Items[desc], 64, "P2000");
PushArrayArray(array_secondary, Items[0]);
}
/* bool GetCookie(client)
{
char buffer[10];
GetClientCookie(client, remember, buffer, sizeof(buffer));
return StrEqual(buffer, "On");
} */